From b8decb3ec8c0baa6dd725aecf50c811cc764a6cc Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 3 May 2022 08:23:35 +0200 Subject: [PATCH] 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. --- models/shipcloud_delivery_carrier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/shipcloud_delivery_carrier.py b/models/shipcloud_delivery_carrier.py index 62d11c0..dca03b5 100644 --- a/models/shipcloud_delivery_carrier.py +++ b/models/shipcloud_delivery_carrier.py @@ -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']