summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorArnold Moyaux <arm@odoo.com>2019-10-16 15:01:09 +0000
committerfw-bot <otis@odoo.com>2019-10-16 17:17:09 +0000
commite89c818e5a8fb94bdfbd7c8146579b8ffc4ac68b (patch)
treec635b83fcbdfc32c2238c6d888c9f77262a76520 /addons
parente5c455f1b67bc613a9b5f1480387b1c7c85cc94c (diff)
[FIX] mrp: missing cast string to date
Usecase to repdroduce: - Create a manufactured product with route manufacture and a RR - Run the scheduler. Orderpoint will prepare procurement values's date as string. Other module could possibly also use string as date and a call to from_string will not break anything if the value is already a date or a datetime. closes odoo/odoo#38900 X-original-commit: e4c654f8e5e768288226c725a1018ae31e8f5606 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/mrp/models/stock_rule.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp/models/stock_rule.py b/addons/mrp/models/stock_rule.py
index cb8966f263a..8ab0657df99 100644
--- a/addons/mrp/models/stock_rule.py
+++ b/addons/mrp/models/stock_rule.py
@@ -84,7 +84,7 @@ class StockRule(models.Model):
'bom_id': bom.id,
'date_deadline': fields.Datetime.to_string(self._get_date_planned(product_id, company_id, values)),
'date_planned_finished': values['date_planned'],
- 'date_planned_start': values['date_planned'] - relativedelta(hours=1),
+ 'date_planned_start': fields.Datetime.from_string(values['date_planned']) - relativedelta(hours=1),
'procurement_group_id': False,
'propagate_cancel': self.propagate_cancel,
'propagate_date': self.propagate_date,