Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dhongu committed Oct 30, 2024
1 parent 809ea9a commit c23206b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions l10n_ro_stock_account_notice/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ def _compute_account_id(self):
l10n_ro_lines_for_notice = self.filtered(
lambda x: x.product_id.type == "product" and x.is_l10n_ro_record
)
move_id = self.mapped("move_id")[0]
valued_type = self.env.context.get("valued_type", move_id.move_type)
valued_type = False
for line in self:
valued_type = line.move_id.move_type
break

valued_type = self.env.context.get("valued_type", valued_type)
remaining = self.with_context(valued_type=valued_type)
invoice_in_notice_lines = self.env["account.move.line"].with_context(
valued_type="invoice_in_notice"
Expand Down

0 comments on commit c23206b

Please sign in to comment.