From e23b0a56bf4866c727e58b42a18bc8facf275c1a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 24 Mar 2018 16:19:02 +0100 Subject: [PATCH] [FIX] account_banking_mandate_sale: Fix error when no valid mandate for the partner Closes #459 --- account_banking_mandate_sale/__manifest__.py | 2 +- account_banking_mandate_sale/models/sale_order.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/account_banking_mandate_sale/__manifest__.py b/account_banking_mandate_sale/__manifest__.py index 031dd003d592..a2ce59f80523 100644 --- a/account_banking_mandate_sale/__manifest__.py +++ b/account_banking_mandate_sale/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Account Banking Mandate Sale', - 'version': '10.0.1.0.0', + 'version': '10.0.1.0.1', 'category': 'Banking addons', 'license': 'AGPL-3', 'summary': "Adds mandates on sale orders", diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py index 887f55602d90..93afaf989106 100644 --- a/account_banking_mandate_sale/models/sale_order.py +++ b/account_banking_mandate_sale/models/sale_order.py @@ -35,4 +35,4 @@ def payment_mode_change(self): ('state', '=', 'valid'), ('partner_id', '=', self.commercial_partner_id.id), ]) - self.mandate_id = mandates[0] + self.mandate_id = mandates[:1]