From eca4f44c7da83d194eed993d38b9f565e05a8b77 Mon Sep 17 00:00:00 2001 From: oihane Date: Mon, 15 Dec 2014 18:02:50 +0100 Subject: [PATCH] [FIX] Manufacturing orders from procurements are unable to confirm --- procurement_mrp_no_confirm/models/procurement_order.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/procurement_mrp_no_confirm/models/procurement_order.py b/procurement_mrp_no_confirm/models/procurement_order.py index f649e9669..ca3996903 100644 --- a/procurement_mrp_no_confirm/models/procurement_order.py +++ b/procurement_mrp_no_confirm/models/procurement_order.py @@ -30,3 +30,12 @@ class ProcurementOrder(models.Model): production = production_obj.browse(vals['production_id']) production.no_confirm = True return super(ProcurementOrder, self).write(vals) + + @api.multi + def make_mo(self): + res = super(ProcurementOrder, self).make_mo() + for procurement in self: + if (procurement.production_id and + procurement.production_id.no_confirm): + procurement.production_id.no_confirm = False + return res