[FIX] account_banking_mandate_sale: Fix error when no valid mandate for the partner

Closes #459
This commit is contained in:
Pedro M. Baeza
2018-03-24 16:19:02 +01:00
committed by OCA-git-bot
parent e391e6cd8d
commit 6cc9582c9a
2 changed files with 2 additions and 2 deletions

View File

@@ -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",

View File

@@ -35,4 +35,4 @@ class SaleOrder(models.Model):
('state', '=', 'valid'),
('partner_id', '=', self.commercial_partner_id.id),
])
self.mandate_id = mandates[0]
self.mandate_id = mandates[:1]