Skip to content

Commit

Permalink
[FIX] l10n_br_sale: Amounts case without OP Fiscal
Browse files Browse the repository at this point in the history
  • Loading branch information
mbcosta committed Feb 6, 2025
1 parent 53e00fb commit d43c2ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion l10n_br_sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ def _get_amount_lines(self):
)
def _compute_amounts(self):
"""Compute the total amounts of the SO."""
for order in self:
result = super()._compute_amounts()
for order in self.filtered(lambda ln: ln.fiscal_operation_id):
order._compute_fiscal_amount()
return result

# TODO v16 override _compute_tax_totals ?

Expand Down
2 changes: 1 addition & 1 deletion l10n_br_sale/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _get_protected_fields(self):
def _compute_amount(self):
"""Compute the amounts of the SO line."""
result = super()._compute_amount()
for line in self:
for line in self.filtered(lambda ln: ln.fiscal_operation_id):
# Update taxes fields
line._update_fiscal_taxes()
# Call mixin compute method
Expand Down

0 comments on commit d43c2ee

Please sign in to comment.