[19.0][FIX] account_lock_date_update: redirect unreconciled warning to account.move - #9
Open
dnplkndll wants to merge 3 commits into
Open
[19.0][FIX] account_lock_date_update: redirect unreconciled warning to account.move#9dnplkndll wants to merge 3 commits into
dnplkndll wants to merge 3 commits into
Conversation
dnplkndll
force-pushed
the
19.0-fix-lock-date-unreconciled-redirect
branch
2 times, most recently
from
May 20, 2026 14:03
2820ef0 to
0bd7569
Compare
Co-authored-by: Don Kendall <dkendall@ledoweb.com>
dnplkndll
force-pushed
the
19.0-fix-lock-date-unreconciled-redirect
branch
from
May 21, 2026 19:45
0bd7569 to
01f6cad
Compare
…drop redundant ACL test, trim menu sequence) Per @victoralmau's review (TT58567) on OCA#2244: - tests: TransactionCase + manual context/user -> BaseCommon + new_test_user; run the positive flow under @users("test_lock_date_user") instead of per-call with_user(). - drop test_01_update_without_access — the ir.model.access.csv ACL already prevents a non-manager from creating the wizard (framework-tested). - views: remove the explicit menu sequence (eval=70) — default ordering.
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 changed
Catches the
RedirectWarningraised bycompany._validate_locks()whenfiscalyear_lock_dateorhard_lock_dateis set and unreconciled bankstatement lines exist in the period, and rewrites the action target from
account.bank.statement.linetoaccount.move.In Odoo 19 core,
account.bank.statement.linehas no standalone list/formviews — statement lines are embedded within journal entries. The core action
returned by
_get_unreconciled_statement_lines_redirect_action()thereforefails at render time when clicked.
Fix (
_fix_redirect_warning):res_id): resolves the statement line andreplaces with
account.moveform pointing toline.move_id.id): resolves all statement line IDsand replaces with
account.movelist domain onmove_id.ids.Tests
test_03_unreconciled_lines_redirect_to_account_move— creates anunreconciled bank statement line, locks past its date, asserts the
raised
RedirectWarningpoints toaccount.move.test_04_no_unreconciled_lines_succeeds— locks to a far-past datewith no bank statement lines; asserts
execute()succeeds and thedate is written.
Notes
This PR is the ledoent fork mirror of the fix proposed in
OCA#2244. The first commit is elemire's port of
the module; the second commit is the fix + tests.