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:
Harald Welte 2021-04-27 17:42:52 +02:00
parent f85e288cf8
commit 539faec1cf
1 changed files with 1 additions and 0 deletions

View File

@ -191,6 +191,7 @@ class DPDeliveryCarrier(models.Model):
else:
wpi_content = []
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,
'EUR', customer_reference=pickings.name, contents=wpi_content)
# actually create the order + download the label