[16.0][FIX] contract: remove circular dependency on recurring_next_date#1462
Open
maisim wants to merge 1 commit into
Open
[16.0][FIX] contract: remove circular dependency on recurring_next_date#1462maisim wants to merge 1 commit into
maisim wants to merge 1 commit into
Conversation
Honeyxilia
reviewed
Jun 12, 2026
Honeyxilia
left a comment
There was a problem hiding this comment.
Live testing OK (as a technical user)
Just a remark about a change
e6f1eed to
a93ae4f
Compare
Break the cascade that overwrites user-edited recurring_next_date on contract lines whenever the contract was saved. Three changes (aligned with the 18.0 logic): 1. abstract_contract_line: remove contract_id.recurring_next_date from @api.depends of _compute_recurring_next_date. Only contract_id.line_recurrence remains. 2. contract_line: remove _compute_next_period_date_start override that had cross-line dependencies (contract_id.last_date_invoiced, contract_id.contract_line_ids.last_date_invoiced). 3. contract_line: make date_end a plain (non-computed) field and remove _compute_date_end, breaking the cascade: contract.date_end -> line.date_end -> npds -> rnd. Add regression tests.
a93ae4f to
62d826b
Compare
fcayre
approved these changes
Jun 17, 2026
fcayre
left a comment
Member
There was a problem hiding this comment.
Code review + live test ok, thanks !
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.
Break the cascade that overwrites user-edited recurring_next_date on contract lines whenever the contract was saved.
Three changes (aligned with the 18.0 logic):
abstract_contract_line: remove contract_id.recurring_next_date from @api.depends of _compute_recurring_next_date. Only contract_id.line_recurrence remains.
contract_line: remove _compute_next_period_date_start override that had cross-line dependencies (contract_id.last_date_invoiced, contract_id.contract_line_ids.last_date_invoiced).
contract_line: make date_end a plain (non-computed) field and remove _compute_date_end, breaking the cascade: contract.date_end -> line.date_end -> npds -> rnd.
Add regression tests.
Fixes #1411