[FIX] purchase: update order_lines date_planned
When we are trying to use the button 'set date to all order lines, we get a traceback saying, that update cannot be done, because it ensure that there's only one record. (After 9.0, there is no more this 'ensure_one'). This bug has been introduced in rev: https://github.com/odoo/odoo/commit/401a3cfaf6fd09f594e45c181e908900acba3777 To fix it, we iterate over the order lines, and do the update of each line.
This commit is contained in:
@@ -442,7 +442,9 @@ class PurchaseOrder(models.Model):
|
||||
@api.multi
|
||||
def action_set_date_planned(self):
|
||||
for order in self:
|
||||
order.order_line.update({'date_planned': order.date_planned})
|
||||
#DO NOT FORWARD PORT
|
||||
for line in order.order_line:
|
||||
line.update({'date_planned': order.date_planned})
|
||||
|
||||
|
||||
class PurchaseOrderLine(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user