Conversation
The _search override disabled active_test for every account.journal search, so archived journals were returned everywhere. l10n_ar picks an export journal through a plain search, so an invoice for a foreign partner could be assigned to an archived journal. Archived journals stay reachable the standard way: a domain on active (what the Archived filter sends) or active_test=False in the context. The store restriction is not changed. Change note: con Multi Store instalado, los diarios archivados dejan de aparecer en las búsquedas de diarios. El filtro "Archivado" y el desarchivar un diario siguen funcionando igual.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
AccountJournal._searchforcesactive_test=Falseon every search, so with this module installed archived journals are returned everywhere. This drops that. The store restriction is untouched, docstring included.Why
l10n_ar._onchange_partner_journallooks for an export journal with a plain search. With this module installed it finds archived ones too, so an invoice for a foreign partner can end up assigned to an archived journal. Any other default or selector built on a journal search has the same problem.It also turns the 18.0 runbot red:
l10n_argot a test for this in odoo/odoo (e471c26fcc6a, 2026-08-18) and it fails only on a database with the full OBA set installed.Archived journals stay reachable the standard way, which is what #77 was after:
active(what the UI "Archived" filter sends) still returns them;active_test=Falsein the context still returns them;The only behaviour that changes is that an archived journal no longer shows up in m2o dropdowns (
name_search), which matches stock Odoo.Test plan
account_multi_store/tests/test_account_journal.py: an archived journal is not returned by a plain search, and is returned when asked for by domain or by context. It fails on 18.0 as is and passes with this change.TestArManual.test_foreign_partner_without_expo_journalfails with this module installed and passes with this change; on the same database without the module it passes either way.Internal reference: https://www.adhoc.inc/odoo/helpdesk.ticket/127730
cc @rov-adhoc — this drops the
_searchpart of #77. If the case behind it was seeing an archived journal in a dropdown, that is better solved withactive_test=Falsein the context of that field or action.