[IMP] account_operating_unit: fields operating_unit_id are not related anymore#3
Open
sebastienbeau wants to merge 1 commit into14.0-refactor-make-it-simplierfrom
Open
Conversation
…d anymore Previously, operating_unit_id on account.move was a related field from account.journal, and on account.move.line a related field from account.move, making all three models tightly coupled. This change decouples the three models: - account.journal: unchanged, still the source of truth - account.move: plain field, populated from the journal at creation time via onchange and create override. Further changes to the journal's operating unit do not affect existing moves. - account.move.line: plain field, populated from the move at creation time via create override. Changes to the move's operating unit propagate to lines that still share the same value, preserving any line-level customization.
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.
Previously, operating_unit_id on account.move was a related field from account.journal, and on account.move.line a related field from account.move, making all three models tightly coupled.
This change decouples the three models: