From c511a13c195c60b68ffbf0fd91c269eec3b028f6 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Fri, 3 Dec 2010 14:52:26 +0530 Subject: [PATCH] [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 --- addons/mrp/stock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/mrp/stock.py b/addons/mrp/stock.py index caed38654ac..90b98b093ae 100644 --- a/addons/mrp/stock.py +++ b/addons/mrp/stock.py @@ -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