The wizard "update price" should not create accounting when valuation='manual_periodic'

Bug #1194406 reported by Numérigraphe on 2013-06-25
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Committed
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/ 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='real_time', not when valuation='manual_periodic'.

Lionel Sausin

Related branches

Amit Parik (amit-parik) on 2013-06-25
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
tags: added: maintenance

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
Will you be so kind as to inform us when this patch lands on the stable
versions and the trunk?
Lionel Sausin.

Le 19/07/2013 14:22, Foram Katharotiya (fka) a écrit :
> 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/'
--- stock/ 2013-04-17 13:20:21 +0000
+++ stock/ 2013-07-19 10:41:17 +0000
@@ -93,7 +93,7 @@
          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 or False
- if not account_valuation_id: raise osv.except_osv(_('Error!'), _('Specify valuation Account for Product Category: %s.') % (
+ if product_obj.valuation == 'real_time' and not account_valuation_id: raise osv.except_osv(_('Error!'), _('Specify valuation Account for Product Category: %s.') % (
          move_ids = []
          loc_ids =, uid,[('usage','=','internal')])
          for rec_id in ids:
@@ -108,7 +108,7 @@
                  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!"))
- if qty:
+ if qty and product_obj.valuation == 'real_time':
                      company_id = location.company_id and or False
                      if not company_id: raise osv.except_osv(_('Error!'), _('Please specify company in Location.'))


  - It has been Fixed in this branch
    revno: 9279
    revid: <email address hidden>

  -It will be available in 7.0 soon.


Changed in openobject-addons:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers