From 990b7356b6d3e5b8f1a36fb9f954b5913a6e6dd6 Mon Sep 17 00:00:00 2001 From: tfo Date: Fri, 6 Apr 2018 11:23:13 +0200 Subject: [PATCH 1/2] [CLA] Wink signs CCLA Done at #24083 --- doc/cla/corporate/wink.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/cla/corporate/wink.md diff --git a/doc/cla/corporate/wink.md b/doc/cla/corporate/wink.md new file mode 100644 index 00000000000..59b22c1b64b --- /dev/null +++ b/doc/cla/corporate/wink.md @@ -0,0 +1,15 @@ +Belgium, 2018-04-06 + +WINK SA/NV agrees to the terms of the Odoo Corporate Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Thomas Fossoul tfossoul@wink.be https://github.com/tfossoulw + +List of contributors: + +Thomas Fossoul tfossoul@wink.be https://github.com/tfossoulw From e5fd52d28c2758ab81aee083320b27f8ef68d095 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 6 Apr 2018 10:44:22 +0200 Subject: [PATCH 2/2] [FIX] purchase: button_approve in a multi recordset fails Closes #24079 --- addons/purchase/models/purchase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index 88faeee4001..398c2b61bee 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -324,8 +324,8 @@ class PurchaseOrder(models.Model): def button_approve(self, force=False): self.write({'state': 'purchase', 'date_approve': fields.Date.context_today(self)}) self._create_picking() - if self.company_id.po_lock == 'lock': - self.write({'state': 'done'}) + self.filtered( + lambda p: p.company_id.po_lock == 'lock').write({'state': 'done'}) return {} @api.multi