[FIX]intrastat declaration - weight is optional for hs codes with supplementary unit

This commit is contained in:
Luc De Meyer
2022-10-14 18:01:26 +02:00
parent 6f5edb8c6f
commit 9c3c2ec802

View File

@@ -413,14 +413,15 @@ class IntrastatProductDeclaration(models.Model):
line_qty, pce_uom
)
else:
line_notes = [
_(
"Conversion from unit of measure '%s' to 'Kg' "
"is not implemented yet. It is needed for product '%s'."
)
% (source_uom.name, product.display_name)
]
self._format_line_note(inv_line, notedict, line_notes)
if not (intrastat_unit_id and suppl_unit_qty):
line_notes = [
_(
"Conversion from unit of measure '%s' to 'Kg' "
"is not implemented yet. It is needed for product '%s'."
)
% (source_uom.name, product.display_name)
]
self._format_line_note(inv_line, notedict, line_notes)
return weight, suppl_unit_qty
return weight, suppl_unit_qty