Skip to content

Commit

Permalink
Merge PR #280 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 Jul 24, 2024
2 parents e0b5c75 + b497dcc commit 25823f6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion intrastat_product/models/intrastat_product_declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,12 @@ def _get_weight_and_supplunits(self, inv_line, hs_code, notedict):
elif source_uom.category_id == product.uom_id.category_id:
# We suppose that, on product.template,
# the 'weight' field is per uom_id
weight = product.weight * source_uom._compute_quantity(
# Test if module product_net_weight from OCA/product-attribute is installed
if hasattr(product, "net_weight"):
product_weight = product.net_weight
else:
product_weight = product.weight
weight = product_weight * source_uom._compute_quantity(
line_qty, product.uom_id
)
else:
Expand Down

0 comments on commit 25823f6

Please sign in to comment.