mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
ccf9d3bc6b064732b6932b637a20644321893256
The computation of partner_bank_id has not been migrated properly
since the move from account.invoice to account.move.
Before, we had an onchange on partner_id that did the following:
- If no partner or no company, remove payment mode
- If type = in_invoice, remove partner_bank_id as well
- If partner and company,
- If type = in_invoice, set payment mode from partner
- if payment mode's payment method has bank account required,
set the partner_bank_id to the commercial partner's bank
- else set partner_bank_id to False
- If type = out_invoice, set payment mode from partner and
do not assign partner_bank_id
We also had an onchange on payment_mode_id that did the following:
- If payment mode and its payment_type=outbound and its payment method
has bank account required, set partner_bank_id to False
- If no payment mode, set partner_bank_id to False
Now that partner_bank_id is a computed field, we shouldn't set its value
to False if the move is not a vendor bill or doesn't have a payment mode.
The computation of partner_bank_id must instead reflect the conditions we
used to have, that is:
- If we don't have a payment_mode, set value to False
- If we have a payment mode
- If type=in_invoice and payment mode's payment method has not bank
account required, set partner_bank_id to False (as setting the bank account
from the partner is done in the call to super)
- If type=out_invoice
- if payment mode's payment method has bank account required
- set partner_bank_id to the bank account linked to the fixed journal
of payment mode if defined
- do not set anything if that isn't the case since setting the bank account
from the company is done in the call to super)
- if payment mode's payment method does not have bank account required,
set partner_bank_id to False
Closes: #1091
bank-payment
TODO: add repo description.
Available addons
| addon | version | maintainers | summary |
|---|---|---|---|
| account_banking_mandate | 16.0.1.0.2 | Banking mandates | |
| account_banking_pain_base | 16.0.1.0.0 | Base module for PAIN file generation | |
| account_banking_sepa_credit_transfer | 16.0.1.0.0 | Create SEPA XML files for Credit Transfers | |
| account_banking_sepa_direct_debit | 16.0.1.0.0 | Create SEPA files for Direct Debit | |
| account_payment_mode | 16.0.1.1.0 | Account Payment Mode | |
| account_payment_order | 16.0.1.1.1 | Account Payment Order | |
| account_payment_order_grouped_output | 16.0.1.0.1 | Account Payment Order - Generate grouped moves | |
| account_payment_partner | 16.0.1.2.0 | Adds payment mode on partners and invoices | |
| account_payment_purchase | 16.0.1.0.0 | Adds Bank Account and Payment Mode on Purchase Orders | |
| account_payment_purchase_stock | 16.0.1.0.0 | Integrate Account Payment Purchase with Stock | |
| account_payment_sale | 16.0.1.0.0 | Adds payment mode on sale orders |
Licenses
This repository is licensed under AGPL-3.0.
However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA)
policy. Consult each module's __manifest__.py file, which contains a license key
that explains its license.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Description
Languages
Python
58.9%
HTML
41%
