From 9c6ae3cf6c3772fcfd2127022cacc8f3233fea0a Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 19 May 2015 13:41:32 +0200 Subject: [PATCH] [FIX] mrp_operations: adapt the date_planned of the WO when date_planned of MO is changed Changing the scheduled date (date_planned) of the MO triggers a computation of the scheduled date of the associated WO in order to keep the data consistent. Fixes #6694 opw-639771 --- addons/mrp_operations/mrp_operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index d841e344a9e..f77d5cf839f 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -354,7 +354,7 @@ class mrp_production(osv.osv): for po in self.browse(cr, uid, ids, context=context): direction[po.id] = cmp(po.date_start, vals.get('date_start', False)) result = super(mrp_production, self).write(cr, uid, ids, vals, context=context) - if (vals.get('workcenter_lines', False) or vals.get('date_start', False)) and update: + if (vals.get('workcenter_lines', False) or vals.get('date_start', False) or vals.get('date_planned', False)) and update: self._compute_planned_workcenter(cr, uid, ids, context=context, mini=mini) for d in direction: if direction[d] == 1: