Repository navigation
[19.0][FIX] payroll_account: preserve existing entries on reset, recalculation and confirmation - #1
Open
votrelec wants to merge 2 commits into
Conversation
…ation and confirmation
votrelec
marked this pull request as ready for review
November 9, 2026 13:16
votrelec
force-pushed
the
fix/19-posted-payroll-lifecycle
branch
from
November 9, 2026 15:56
613cb5c to
824c725
Compare
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.
With an existing accounting entry, direct salary-line, worked-time and input edits can diverge from the journal entry. Recalculation/reset also retain an outdated entry, while confirmation with
without_compute_sheet=Truecan create another entry and replace the original link.Lock and check the parent before financial child creation/edit/deletion/reassignment, payroll identity/state/link changes, recalculation, reset and confirmation. A shared abstract guard covers the three child models, including context defaults and mixed batches. Parent access is checked before SQL locks. Descriptions remain editable. Checking confirmation separately covers flags that skip calculation. Draft edits, native cancellation and
refund_sheet()remain available; hash-restricted cancellation performs its internal detach after the explicit reversal.This targets the migration branch behind OCA/payroll#269, rather than resubmitting the complete migration to OCA's base branch.
Validation on Odoo 19, isolated fresh databases with only core dependencies and the OCA payroll/accounting modules:
ef16a76b00462717d982b6a4f45082723255b1bfreproduce exactly 3 failures and no errors.