Skip to content

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

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

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

Conversation

@rov-adhoc

@rov-adhoc rov-adhoc commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

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

@roboadhoc

Copy link
Copy Markdown

Pull request status dashboard

@rov-adhoc rov-adhoc changed the title [FIX] account_multi_store: keep archived journals out of journal search [FIX] account_multi_store: keep active_test on data load with tests Sep 18, 2026
- 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.
@cav-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

This branch was successfully deployed

1 active deployment
merge — 1ab3904f Deployed Sep 18, 2026 by roboadhoc
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.

3 participants