Skip to content

[17.0][FIX] account_*: Adapt tests to odoo new banks flow#1564

Merged
OCA-git-bot merged 4 commits intoOCA:17.0from
Tecnativa:17.0-fix-account_payment_partner-tests
Feb 27, 2026
Merged

[17.0][FIX] account_*: Adapt tests to odoo new banks flow#1564
OCA-git-bot merged 4 commits intoOCA:17.0from
Tecnativa:17.0-fix-account_payment_partner-tests

Conversation

@christian-ramos-tecnativa
Copy link
Copy Markdown

@christian-ramos-tecnativa christian-ramos-tecnativa commented Feb 26, 2026

The commit odoo/odoo@1794fce contains the next changes summarized:

  • SUPERUSER is not capable of make a bank account allowed (Unless is at module install), now the user needs any of the groups:
    • account.group_validate_bank_account
    • base.group_system
  • Now the partner_bank_id can contain non allow_out_payment banks, but the error will raise on post

This PR adapt the tests to the new bank flow
@Tecnativa TT61155
@carlos-lopez-tecnativa @pilarvargas-tecnativa @pedrobaeza @victoralmau

@christian-ramos-tecnativa
Copy link
Copy Markdown
Author

Will add here the fixes for other modules from the repo

@christian-ramos-tecnativa christian-ramos-tecnativa changed the title [17.0][FIX] account_payment_partner: Adapt tests to odoo new banks flow [17.0][FIX] account_*: Adapt tests to odoo new banks flow Feb 26, 2026
@pedrobaeza pedrobaeza added this to the 17.0 milestone Feb 26, 2026
Comment thread account_payment_partner/tests/test_account_payment_partner.py Outdated
# The partner bank should be set as odoo made posible
# to assign not allow_out_payment bank account
# more info https://github.com/odoo/odoo/commit/1794fce234735ed174599891435d4e2accc16324
self.assertTrue(move_form.partner_bank_id)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this and the next ones changing? We want to not have a bank account assigned. Maybe you need to change the parameter at company level, or test both.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the bank_partner in this case YourCompany has the bank_ids created with demo data https://github.com/OCA/bank-payment/blob/17.0/account_payment_mode/demo/payment_demo.xml#L36, before the change those banks account were not allowed so none of them get selected now it takes de first one https://github.com/odoo/odoo/blob/17.0/addons/account/models/account_move.py#L897

@christian-ramos-tecnativa christian-ramos-tecnativa force-pushed the 17.0-fix-account_payment_partner-tests branch from 66a0a44 to 76d6ce9 Compare February 26, 2026 15:42
@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-1564-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 9132548 into OCA:17.0 Feb 27, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at c70f793. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants