[FIX] stock_account: give a list of ids to write()

bzr revid: qdp-launchpad@openerp.com-20131205100516-298sillxikfkhr9r
This commit is contained in:
Quentin (OpenERP) 2013-12-05 11:05:16 +01:00
parent ca140808e7
commit 9a0a04c809
1 changed files with 2 additions and 2 deletions

View File

@ -247,8 +247,8 @@ class stock_move(osv.osv):
average_valuation_price += q.qty * q.cost
average_valuation_price = average_valuation_price / move.product_qty
# Write the standard price, as SUPERUSER_ID because a warehouse manager may not have the right to write on products
product_obj.write(cr, SUPERUSER_ID, move.product_id.id, {'standard_price': average_valuation_price}, context=context)
self.write(cr, uid, move.id, {'price_unit': average_valuation_price}, context=context)
product_obj.write(cr, SUPERUSER_ID, [move.product_id.id], {'standard_price': average_valuation_price}, context=context)
self.write(cr, uid, [move.id], {'price_unit': average_valuation_price}, context=context)
def product_price_update_before_done(self, cr, uid, ids, context=None):
product_obj = self.pool.get('product.product')