The wizard "update price" should not create accounting when valuation='manual_periodic'
Bug #1194406 reported by
Numérigraphe
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Committed
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
When updating the standard price of a product with the wizard "update price", the code in stock/product.py creates accounting moves to reflect this change in accounting, regardless of the valuation setting of the product.
It should only create accounting moves when valuation=
Lionel Sausin
Related branches
lp://staging/~openerp-dev/openobject-addons/7.0-opw-594333-fka
- OpenERP Core Team: Pending requested
-
Diff: 21 lines (+2/-2)1 file modifiedstock/product.py (+2/-2)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: maintenance |
To post a comment you must log in.
Dear Foram Katharotiya,
Your patch solves the problem we met, though the wizard is very slow
(probably because the second test is a loop that is useless in this
context).
Will you be so kind as to inform us when this patch lands on the stable
versions and the trunk?
Thanks,
Lionel Sausin.
Le 19/07/2013 14:22, Foram Katharotiya (fka) a écrit :
product_ obj=self. browse( cr, uid, ids, context=context)[0]
account_ valuation = product_ obj.categ_ id.property_ stock_valuation _account_ id
account_ valuation_ id = account_valuation and account_ valuation. id or False valuation_ id: raise osv.except_ osv(_(' Error!' ), _('Specify valuation Account for Product Category: %s.') % (product_ obj.categ_ id.name) ) obj.valuation == 'real_time' and not account_ valuation_ id: raise osv.except_ osv(_(' Error!' ), _('Specify valuation Account for Product Category: %s.') % (product_ obj.categ_ id.name) ) obj.search( cr, uid,[(' usage', '=','internal' )])
qty = product. qty_available
diff = product. standard_ price - new_price
if not diff: raise osv.except_ osv(_(' Error!' ), _("No difference between standard price and new price!")) obj.valuation == 'real_time':
company_ id = location.company_id and location. company_ id.id or False
if not company_id: raise osv.except_ osv(_(' Error!' ), _('Please specify company in Location.'))
#
>
> I have attached the patch that fixes your problem of require valuation
> accounts on product categories
>
> Would you please check at your end and let me know with the result
> whether anything missing?
>
>
=== modified file 'stock/product.py'
--- stock/product.py 2013-04-17 13:20:21 +0000
+++ stock/product.py 2013-07-19 10:41:17 +0000
@@ -93,7 +93,7 @@
- if not account_
+ if product_
move_ids = []
loc_ids = location_
for rec_id in ids:
@@ -108,7 +108,7 @@
- if qty:
+ if qty and product_