Skip to content

[FIX] account_multi_store: keep active_test on data load with tests - #114

Closed
fw-bot-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-18.0-h-127730-rov-8805-fw
Closed

fw-bot-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-18.0-h-127730-rov-8805-fw

Conversation

@fw-bot-adhoc

Copy link
Copy Markdown

What

AccountJournal._search forces active_test=False on every search, so with this module installed any plain search on account.journal also returns archived journals. This keeps that behaviour, except while module data is being loaded with tests enabled.

Why

Archived journals have to stay reachable from a plain search: that is what lets them be seen and unarchived from the store form, which is why the override was added in #77.

The side effect is on the test side. l10n_ar got a test upstream (e471c26fcc6a, 2026-08-18) that archives the export journal and invoices a foreign partner; _onchange_partner_journal finds the archived journal anyway and assigns it, so the test fails and the 18.0 runbot goes red on the [18.0] All trigger, where this module is installed.

Also, _search no longer mutates the domain list it receives.

Test plan

  • pre-commit run --files on the changed file: passed.
  • Test runs are left to CI, including TestArManual.test_foreign_partner_without_expo_journal on the full 18.0 database.

Internal reference: https://www.adhoc.inc/odoo/helpdesk.ticket/127730

Forward-Port-Of: #113

- AccountJournal._search only forces active_test=False when it is not
  loading module data with tests enabled
- Do not mutate the caller domain list in _search

Change note: Ajuste interno en la carga de datos de los diarios durante las pruebas automáticas. No cambia el comportamiento del sistema para los usuarios.

X-original-commit: 401e068
@roboadhoc

Copy link
Copy Markdown

Pull request status dashboard

@fw-bot-adhoc

Copy link
Copy Markdown
Author

@rov-adhoc @cav-adhoc cherrypicking of pull request #113 failed.

stdout:

CONFLICT (modify/delete): account_multi_store/models/account_journal.py deleted in 0b88fffc536f9dc22ceb97c3234814536d37558b and modified in 1ab3904fe80254b721df0b2b159433efdbb9f411.  Version 1ab3904fe80254b721df0b2b159433efdbb9f411 of account_multi_store/models/account_journal.py left in tree.

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

:shipit: you can use git-fw to re-do the forward-port for you locally.

⚠️ after resolving this conflict, you will need to merge it via @roboadhoc.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

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.

3 participants