Skip to content

[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
14.0-refactor-make-it-simplier-imp
Open

[IMP] account_operating_unit: fields operating_unit_id are not related anymore#3
sebastienbeau wants to merge 1 commit into14.0-refactor-make-it-simplierfrom
14.0-refactor-make-it-simplier-imp

Conversation

@sebastienbeau
Copy link
Copy Markdown
Member

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.

…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.
@ak-git-bot ak-git-bot added the mod:account_operating_unit Module account_operating_unit label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:account_operating_unit Module account_operating_unit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants