X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;ds=sidebyside;f=addons%2Fstock%2Fstock.py;h=39d5bb16b0864e26d82c4e4277b6d2c59e9811a6;hb=8974ee4d4e7d7720b88b4ab14e55eb7834bf380b;hp=26647d8118a82167872e3cedb6b78654e485826f;hpb=409000dc23d385ddae874b5eb04b2d37deeef4e7;p=odoo%2Fodoo.git diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 26647d8..39d5bb1 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2235,7 +2235,11 @@ class stock_move(osv.osv): pickings[move.picking_id.id] = 1 r = res.pop(0) product_uos_qty = self.pool.get('stock.move').onchange_quantity(cr, uid, [move.id], move.product_id.id, r[0], move.product_id.uom_id.id, move.product_id.uos_id.id)['value']['product_uos_qty'] - cr.execute('update stock_move set location_id=%s, product_qty=%s, product_uos_qty=%s where id=%s', (r[1], r[0],product_uos_qty, move.id)) + move.write({ + 'location_id': r[1], + 'product_qty': r[0], + 'product_uos_qty': product_uos_qty, + }) while res: r = res.pop(0)