Add counter

This commit is contained in:
2026-04-06 09:50:15 +02:00
parent 199b8aec12
commit b78e64f9f1

View File

@@ -51,9 +51,12 @@ class PartyExecution(ModelSQL,ModelView):
Shipment = Pool().get('stock.shipment.in') Shipment = Pool().get('stock.shipment.in')
shipments = Shipment.search([ shipments = Shipment.search([
('controller', '!=', None), ('controller', '!=', None),
('to_location.country', '!=', None),
('to_location.country.region', 'child_of', [area.id]),
]) ])
execution = cls()
execution.area = area
shipments = [
shipment for shipment in shipments
if execution.matches_shipment(shipment)]
total = len(shipments) total = len(shipments)
if not total: if not total:
return Decimal('0') return Decimal('0')