Merge PR #580 into 12.0

Signed-off-by dreispt
This commit is contained in:
OCA-git-bot
2021-01-19 18:44:13 +00:00

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