[FIX] mrp: The start date of a manufacturing order is never set.
Issues ------ All manufacturing orders are not having a start date This commit ----------- - Fix not updating start date on manufacturing orders. X-original-commit: 2e5da1130f4a7056f746a4cce6ba75bf699dbe62 Part-of: odoo/odoo#143850
This commit is contained in:
committed by
Arnold Moyaux
parent
18b4902a19
commit
17a3306d8b
@@ -591,6 +591,11 @@ class MrpWorkorder(models.Model):
|
||||
if wo.state in ('done', 'cancel'):
|
||||
continue
|
||||
|
||||
if wo.production_id.state != 'progress':
|
||||
wo.production_id.write({
|
||||
'date_start': fields.Datetime.now()
|
||||
})
|
||||
|
||||
if wo.product_tracking == 'serial' and wo.qty_producing == 0:
|
||||
wo.qty_producing = 1.0
|
||||
elif wo.qty_producing == 0:
|
||||
@@ -601,10 +606,6 @@ class MrpWorkorder(models.Model):
|
||||
wo._prepare_timeline_vals(wo.duration, fields.Datetime.now())
|
||||
)
|
||||
|
||||
if wo.production_id.state != 'progress':
|
||||
wo.production_id.write({
|
||||
'date_start': fields.Datetime.now()
|
||||
})
|
||||
if wo.state == 'progress':
|
||||
continue
|
||||
date_start = fields.Datetime.now()
|
||||
|
||||
Reference in New Issue
Block a user