diff options
| author | Arnold Moyaux <arm@odoo.com> | 2019-10-16 15:01:09 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-16 17:17:09 +0000 |
| commit | e89c818e5a8fb94bdfbd7c8146579b8ffc4ac68b (patch) | |
| tree | c635b83fcbdfc32c2238c6d888c9f77262a76520 | |
| parent | e5c455f1b67bc613a9b5f1480387b1c7c85cc94c (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>
| -rw-r--r-- | addons/mrp/models/stock_rule.py | 2 |
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, |
