Skip to content

Commit

Permalink
Merge PR #838 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by alexis-via
  • Loading branch information
OCA-git-bot committed Oct 23, 2023
2 parents 32a0e49 + 59c6cbe commit 8aacf8a
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions account_invoice_facturx/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,18 +641,16 @@ def _set_iline_product_attributes(self, iline, trade_product, ns):
product_charact, ns["ram"] + "Value"
)
product_charact_value.text = attrib_value
if (
hasattr(product, "hs_code_id")
and product.type in ("product", "consu")
and product.get_hs_code_recursively()
):
product_classification = etree.SubElement(
trade_product, ns["ram"] + "DesignatedProductClassification"
)
product_classification_code = etree.SubElement(
product_classification, ns["ram"] + "ClassCode", listID="HS"
)
product_classification_code.text = product.hs_code_id.local_code
if hasattr(product, "hs_code_id") and product.type in ("product", "consu"):
hs_code = product.get_hs_code_recursively()
if hs_code:
product_classification = etree.SubElement(
trade_product, ns["ram"] + "DesignatedProductClassification"
)
product_classification_code = etree.SubElement(
product_classification, ns["ram"] + "ClassCode", listID="HS"
)
product_classification_code.text = hs_code.local_code
# origin_country_id and hs_code_id are provided
# by the OCA module product_harmonized_system
if (
Expand Down

0 comments on commit 8aacf8a

Please sign in to comment.