[FIX] mrp: when producing, wrong stock move where created when there was a produciton lot on the 'product to consume' move

lp bug: https://launchpad.net/bugs/740047 fixed

bzr revid: qdp-launchpad@openerp.com-20110330095628-3kynl4yrz423cmqg
This commit is contained in:
Quentin (OpenERP) 2011-03-30 11:56:28 +02:00
parent ab56c9a9ae
commit 7fa3dd42a7
1 changed files with 1 additions and 1 deletions

View File

@ -728,7 +728,7 @@ class mrp_production(osv.osv):
if consumed_qty == 0:
consumed_qty = production_qty * f.product_qty / production.product_qty
if consumed_qty > 0:
stock_mov_obj.action_consume(cr, uid, [raw_product.id], consumed_qty, production.location_src_id.id, context=context)
stock_mov_obj.action_consume(cr, uid, [raw_product.id], consumed_qty, raw_product.location_id.id, context=context)
if production_mode == 'consume_produce':
# To produce remaining qty of final product