wpint: try to shrink the number of customs lines, if needed
python-inema has a method that tries to combine multiple customs lines into one, if the HTS of those lines is identical. We forgot to use it so far.
This commit is contained in:
parent
f85e288cf8
commit
539faec1cf
|
@ -191,6 +191,7 @@ class DPDeliveryCarrier(models.Model):
|
||||||
else:
|
else:
|
||||||
wpi_content = []
|
wpi_content = []
|
||||||
total_value = 0
|
total_value = 0
|
||||||
|
wpi_content = wpi.shrink_contents_if_needed(wpi_content)
|
||||||
wpi_item = wpi.build_item(service.code, wpi_sender, wpi_recipient, weight*1000, total_value,
|
wpi_item = wpi.build_item(service.code, wpi_sender, wpi_recipient, weight*1000, total_value,
|
||||||
'EUR', customer_reference=pickings.name, contents=wpi_content)
|
'EUR', customer_reference=pickings.name, contents=wpi_content)
|
||||||
# actually create the order + download the label
|
# actually create the order + download the label
|
||||||
|
|
Loading…
Reference in New Issue