Skip to content

Commit

Permalink
[FIX] Check if product has attribute IPITrib
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokibastos committed Nov 16, 2023
1 parent de30d85 commit 708d07e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions l10n_br_nfe/wizards/import_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def _get_taxes_from_xml_product(self, product):
pICMS = icms_choice.pICMS
if hasattr(icms_choice, "vICMS"):
vICMS = icms_choice.vICMS
ipi_trib = product.imposto.IPI.IPITrib
if ipi_trib is not None:
if hasattr(product.imposto.IPI, "IPITrib"):
ipi_trib = product.imposto.IPI.IPITrib
if hasattr(ipi_trib, "pIPI"):
pIPI = ipi_trib.pIPI
if hasattr(ipi_trib, "vIPI"):
Expand Down

0 comments on commit 708d07e

Please sign in to comment.