Browse Source

Only 'available' moves in the picking when generating customs info

If we perform a partial shipment, we must only generate customs
information for those items which we are actually going to transfer.
master
Harald Welte 2 months ago
parent
commit
b8decb3ec8
  1. 2
      models/shipcloud_delivery_carrier.py

2
models/shipcloud_delivery_carrier.py

@ -152,7 +152,7 @@ class SCDeliveryCarrier(models.Model): @@ -152,7 +152,7 @@ class SCDeliveryCarrier(models.Model):
return res
def build_sc_customs_decl(self, picking, explanation, currency='EUR'):
items = [self.build_sc_customs_item(x) for x in picking.move_lines]
items = [self.build_sc_customs_item(x) for x in picking.move_lines if picking.state == 'assigned']
total = 0.0
for i in items:
total += i['value_amount']

Loading…
Cancel
Save