Skip to content

Commit

Permalink
[FIX] account_avatax_oca: Pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobaeza authored and kobros-tech committed Dec 5, 2024
1 parent 87d68fa commit e8fc483
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions account_avatax_oca/models/account_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def compute_all(
avatax_amount = 0.0
raise exceptions.UserError(
_(
"Incorrect retrieval of Avatax amount for Invoice %(avatax_invoice)s:"
" product %(product.display_name)s, price_unit %(-price_unit)f"
" , quantity %(quantity)f"
"Incorrect retrieval of Avatax amount for Invoice "
"%(avatax_invoice)s: product %(product.display_name)s, "
"price_unit %(-price_unit)f , quantity %(quantity)f"
)
)
for tax_item in res["taxes"]:
Expand Down
10 changes: 6 additions & 4 deletions account_avatax_oca/models/avalara_salestax.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ class ExemptionCode(models.Model):

@api.depends("name", "code")
def _compute_display_name(self):
super()._compute_display_name()
res = super()._compute_display_name()
for exemption in self:
exemption.display_name = (
exemption.code
and f"({exemption.code}) {exemption.name}"
or exemption.name
)
return res


class AvalaraSalestax(models.Model):
Expand Down Expand Up @@ -93,8 +94,8 @@ def _get_avatax_supported_countries(self):
help="No tax calculation requests will be sent to the AvaTax web service.",
)
# TODO: Control - Disable Document Recording
# In order for this connector to be used in conjunction
# with other integrations to AvaTax, the user must be able to control which connector
# In order for this connector to be used in conjunction with other integrations to
# AvaTax, the user must be able to control which connector
# is used for recording documents to AvaTax.
# From a technical standpoint, simply use DocType: 'SalesOrder' on all calls
# and suppress any non-getTax calls (i.e. cancelTax, postTax).
Expand Down Expand Up @@ -246,7 +247,8 @@ def create_transaction(
if not shipping_address.date_validation:
raise UserError(
_(
"Please validate the shipping address for the partner %(partner.name)s."
"Please validate the shipping address for the partner "
"%(partner.name)s."
)
)

Expand Down

0 comments on commit e8fc483

Please sign in to comment.