diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index e6610ce1190..a8aedf15295 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -114,7 +114,7 @@ class MrpProduction(models.Model): help="Date at which you plan to start the production.", index=True, required=True, store=True) date_planned_finished = fields.Datetime( - 'Planned End Date', + 'Scheduled End Date', default=_get_default_date_planned_finished, compute='_compute_dates_planned', inverse='_set_date_planned_finished', help="Date at which you plan to finish the production.", @@ -995,7 +995,7 @@ class MrpProduction(models.Model): start_date = max(start_date, datetime.datetime.now()) workorder_ids.leave_id.unlink() else: - workorder_ids = self.workorder_ids + workorder_ids = self.workorder_ids.filtered(lambda wo: not wo.date_planned_start) for workorder in workorder_ids: workcenters = workorder.workcenter_id | workorder.workcenter_id.alternative_workcenter_ids diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index 64f4236d810..8adf557a51c 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -153,47 +153,46 @@ -
+
-
+
+ ('state', 'in', ['draft', 'confirmed', 'to_close'])]}"/>