Skip to content

Commit

Permalink
[UPD] ssi_financial_accounting_operating_unit
Browse files Browse the repository at this point in the history
* Memperbaiki constrains OU pd account.move
  • Loading branch information
andhit-r committed Jan 1, 2025
1 parent fa3a088 commit 08484d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _onchange_journal(self):
):
self.operating_unit_id = self.journal_id.operating_unit_ids[0]
for line in self.line_ids:
line.operating_unit_id = self.journal_id.operating_unit_id
line.operating_unit_id = self.journal_id.operating_unit_ids[0]

@api.constrains("operating_unit_id", "journal_id")
def _check_journal_operating_unit(self):
Expand All @@ -58,7 +58,7 @@ def _check_journal_operating_unit(self):
move.journal_id.operating_unit_ids
and move.operating_unit_id
and move.operating_unit_id.id
not in [move.journal_id.operating_unit_id.id]
not in move.journal_id.operating_unit_ids.ids
):
# Change journal_id if create move from other model. e.g., sale.order
if (
Expand Down

0 comments on commit 08484d3

Please sign in to comment.