summaryrefslogtreecommitdiff
path: root/addons/purchase/purchase.py
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-07-27 11:01:34 +0200
committerNicolas Martinelli <nim@odoo.com>2016-07-27 15:19:28 +0200
commit2cf80e00752c68e443b0cd442ee50f7d6daaa455 (patch)
treeedf5b2790c40071937c078aefb635a04f88dd250 /addons/purchase/purchase.py
parent931e5567b67841b8373679102ce74cb767ea33f9 (diff)
[IMP] purchase: set scheduled date of lines
Commit 4326d864 removes the inverse function of the `date_planned`. This is necessary to avoid unexpected changes of the scheduled dates. However, this removes the ability to set the scheduled dates of all lines at once. This commit introduces back the functionality thanks to a new button. This way, the functionality remains without unexpected behavior.
Diffstat (limited to 'addons/purchase/purchase.py')
-rw-r--r--addons/purchase/purchase.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index be0757f3c2d..15ff35b13a6 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -470,6 +470,11 @@ class PurchaseOrder(models.Model):
result['res_id'] = self.invoice_ids.id
return result
+ @api.multi
+ def action_set_date_planned(self):
+ for order in self:
+ order.order_line.update({'date_planned': order.date_planned})
+
class PurchaseOrderLine(models.Model):
_name = 'purchase.order.line'