[FIX]: mrp: "Consume products" in Production order creates 2 records
lp bug: https://launchpad.net/bugs/667327 fixed bzr revid: rpa@tinyerp.com-20101203092226-xe490fnzq027sapt
This commit is contained in:
@@ -113,6 +113,9 @@ class StockMove(osv.osv):
|
||||
production_obj.force_production(cr, uid, [prod.id])
|
||||
wf_service.trg_validate(uid, 'mrp.production', prod.id, 'button_produce', cr)
|
||||
for new_move in new_moves:
|
||||
if new_move == move.id:
|
||||
#This move is already there in move lines of production order
|
||||
continue
|
||||
production_obj.write(cr, uid, production_ids, {'move_lines': [(4, new_move)]})
|
||||
res.append(new_move)
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user