From 50febca19ad801e9c0700cba1804d11b29c39bb3 Mon Sep 17 00:00:00 2001 From: Sergio Lop Sanz Date: Thu, 24 Dec 2020 13:06:43 +0100 Subject: [PATCH] [FIX] To be able to force existing lot --- mrp_auto_create_lot/models/mrp_workorder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrp_auto_create_lot/models/mrp_workorder.py b/mrp_auto_create_lot/models/mrp_workorder.py index bee6a124f..6816c6518 100644 --- a/mrp_auto_create_lot/models/mrp_workorder.py +++ b/mrp_auto_create_lot/models/mrp_workorder.py @@ -9,7 +9,7 @@ class MrpWorkorder(models.Model): @api.multi def record_production(self): - if self.product_id.auto_create_lot: + if not self.final_lot_id and self.product_id.auto_create_lot: self.final_lot_id = self.env['stock.production.lot'].create({ 'product_id': self.product_id.id, })