mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] account_payment_sale: Compatibility with account_banking_sepa_direct_debit
Steps to reproduce the problem: - Set a payment mode with fixed journal and set the journal with bank account A. - Create a sales order and put bank account B. - Create invoice. - Bank account in invoice is A instead of B.
This commit is contained in:
committed by
Pedro M. Baeza
parent
b52ffec630
commit
02cd4e2381
@@ -14,7 +14,8 @@ class SaleOrder(models.Model):
|
||||
def _get_payment_mode_vals(self, vals):
|
||||
if self.payment_mode_id:
|
||||
vals['payment_mode_id'] = self.payment_mode_id.id
|
||||
if self.payment_mode_id.bank_account_link == 'fixed':
|
||||
if (self.payment_mode_id.bank_account_link == 'fixed' and
|
||||
self.payment_mode_id.payment_method_id.code == 'manual'):
|
||||
vals['partner_bank_id'] =\
|
||||
self.payment_mode_id.fixed_journal_id.bank_account_id.id
|
||||
return vals
|
||||
|
||||
Reference in New Issue
Block a user