From c81a63393d7b67971d7fd2ca223e317d7b3d3260 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 15 Nov 2016 19:45:52 +0100 Subject: [PATCH] [FIX] sale_order_dates: infinite recurssion in effective_date computation This is due to the below revision c1cfbf6436323923517c3b633931d65016970eea Which used the `write` method on the `order` instead of assigning the value in the variable `order.effective_date` to set the value, as it should be done in the new API opw-693800 --- addons/sale_order_dates/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_order_dates/models/sale_order.py b/addons/sale_order_dates/models/sale_order.py index 75176271e48..e2ea8b893bb 100644 --- a/addons/sale_order_dates/models/sale_order.py +++ b/addons/sale_order_dates/models/sale_order.py @@ -46,7 +46,7 @@ class SaleOrder(models.Model): for pick in order.picking_ids: dates_list.append(fields.Datetime.from_string(pick.date)) if dates_list: - order.write({'effective_date': fields.Datetime.to_string(min(dates_list))}) + order.effective_date = fields.Datetime.to_string(min(dates_list)) @api.onchange('requested_date') def onchange_requested_date(self):