[FIX] sale_order_dates: infinite recurssion in effective_date computation

This is due to the below revision
c1cfbf6436

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
This commit is contained in:
Denis Ledoux
2016-11-15 19:51:05 +01:00
parent dece72d010
commit c81a63393d
+1 -1
View File
@@ -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):