mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
FIX crash when selecting a customer that has a direct debit payment mode but no mandate
Hide many fields when payment_order_ok is False on a payment_mode Fix payment line communication when the move line is not linked to an invoice (problem found when porting donation_debit_debit to v9)
This commit is contained in:
committed by
Enric Tobella
parent
e158ddf7ce
commit
480d49ef79
@@ -59,7 +59,8 @@ class AccountInvoice(models.Model):
|
||||
('state', '=', 'valid'),
|
||||
('partner_id', '=', self.commercial_partner_id.id),
|
||||
])
|
||||
self.mandate_id = mandates[0]
|
||||
if mandates:
|
||||
self.mandate_id = mandates[0]
|
||||
else:
|
||||
self.mandate_id = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user