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
Atchuthan Ubendran
parent
0d72bf368a
commit
513bab9379
@@ -4,7 +4,7 @@
|
||||
|
||||
{
|
||||
"name": "Account Payment Sale",
|
||||
"version": "13.0.1.1.0",
|
||||
"version": "13.0.1.1.1",
|
||||
"category": "Banking addons",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Adds payment mode on sale orders",
|
||||
|
||||
@@ -26,7 +26,10 @@ 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[
|
||||
"invoice_partner_bank_id"
|
||||
] = self.payment_mode_id.fixed_journal_id.bank_account_id.id
|
||||
|
||||
Reference in New Issue
Block a user