Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] account_avatax_oca: fix unbalanced error on save #377

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions account_avatax_oca/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,6 @@ def _compute_hide_exemption(self):
"Also, it will show Tax based on shipping address button",
)

@api.depends(
"line_ids.debit",
"line_ids.credit",
"line_ids.currency_id",
"line_ids.amount_currency",
"line_ids.amount_residual",
"line_ids.amount_residual_currency",
"line_ids.payment_id.state",
"avatax_amount",
)
def _compute_amount(self):
res = super()._compute_amount()
for inv in self:
if inv.avatax_amount:
inv.amount_tax = abs(inv.avatax_amount)
inv.amount_total = inv.amount_untaxed + inv.amount_tax
sign = inv.move_type in ["in_refund", "out_refund"] and -1 or 1
inv.amount_total_signed = inv.amount_total * sign
return res

@api.depends("tax_on_shipping_address", "partner_id", "partner_shipping_id")
def _compute_tax_address_id(self):
for invoice in self:
Expand Down
Loading