Skip to content
Snippets Groups Projects
Commit e4c654f8 authored by Arnold Moyaux's avatar Arnold Moyaux
Browse files

[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#38895

Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
parent f4dbee9b
Branches
Tags
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment