Skip to content

[18.0][PORT] account_payment_partner: add flag to control partner_bank_id without payment mode#5

Closed
felipemotter wants to merge 3 commits into18.0from
18.0-fix-compute-partner-bank-no-payment-mode
Closed

[18.0][PORT] account_payment_partner: add flag to control partner_bank_id without payment mode#5
felipemotter wants to merge 3 commits into18.0from
18.0-fix-compute-partner-bank-no-payment-mode

Conversation

@felipemotter
Copy link
Copy Markdown

Summary

Port da feature para 18.0: flag keep_partner_bank_without_payment_mode no res.company.

  • Adiciona campo booleano na empresa que controla se o partner_bank_id é preservado ou limpo quando não há payment mode
  • Default True: mantém o banco auto-selecionado pelo core do Odoo
  • False: limpa o banco (comportamento legado)
  • Inclui view em Settings > Accounting > Customer Payments
  • Testes cobrindo ambos os cenários (flag habilitada/desabilitada) e refund sem payment mode

@felipemotter felipemotter force-pushed the 18.0-fix-compute-partner-bank-no-payment-mode branch from f558a69 to 78b34bd Compare February 17, 2026 10:47
@felipemotter felipemotter changed the title [18.0][IMP] account_payment_partner: add flag to control partner_bank_id without payment mode [18.0][PORT] account_payment_partner: add flag to control partner_bank_id without payment mode Feb 17, 2026
…thout payment mode

Add a company-level setting keep_partner_bank_without_payment_mode
(default True) that controls whether partner_bank_id is preserved or
cleared when no payment mode is set on an invoice.

When enabled (default), invoices without a payment mode keep the bank
account auto-selected by Odoo core. When disabled, the bank account is
cleared (legacy behavior).

This resolves the long-standing disagreement in OCA#1418
by letting each company choose the behavior that fits their workflow.
@felipemotter felipemotter force-pushed the 18.0-fix-compute-partner-bank-no-payment-mode branch 5 times, most recently from 3bb2bcc to c8fbc90 Compare February 17, 2026 11:31
@felipemotter felipemotter force-pushed the 18.0-fix-compute-partner-bank-no-payment-mode branch from c8fbc90 to 9a70e8e Compare February 17, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant