Skip to content

Commit

Permalink
Merge pull request #1122 from terrabit-ro/16.0-fix-notice
Browse files Browse the repository at this point in the history
[16.0][FIX] fix notice
  • Loading branch information
dhongu authored Oct 31, 2024
2 parents 6096dc1 + c23206b commit 1d94133
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion l10n_ro_stock_account_notice/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +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
)
valued_type = self.env.context.get("valued_type", self.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 1d94133

Please sign in to comment.