[FIX]stock_landed_costs: Fixed wrong costs on landed costs with many products
authorGrover Menacho <grover.menacho@poiesisconsulting.com>
Wed, 17 Sep 2014 19:13:48 +0000 (15:13 -0400)
committerGrover Menacho <grover.menacho@poiesisconsulting.com>
Wed, 17 Sep 2014 19:13:48 +0000 (15:13 -0400)
addons/stock_landed_costs/stock_landed_costs.py

index 8933cec..ad72937 100644 (file)
@@ -204,7 +204,7 @@ class stock_landed_cost(osv.osv):
                     else:
                         quant_dict[quant.id] += diff
                 for key, value in quant_dict.items():
-                    quant_obj.write(cr, uid, quant.id, {'cost': value}, context=context)
+                    quant_obj.write(cr, uid, key, {'cost': value}, context=context)
                 qty_out = 0
                 for quant in line.move_id.quant_ids:
                     if quant.location_id.usage != 'internal':