[FIX] To be able to force existing lot

This commit is contained in:
Sergio Lop Sanz
2020-12-24 13:06:43 +01:00
committed by GitHub
parent c8eed0205d
commit 50febca19a

View File

@@ -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,
})