Add counter
This commit is contained in:
@@ -51,9 +51,12 @@ class PartyExecution(ModelSQL,ModelView):
|
||||
Shipment = Pool().get('stock.shipment.in')
|
||||
shipments = Shipment.search([
|
||||
('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)
|
||||
if not total:
|
||||
return Decimal('0')
|
||||
|
||||
Reference in New Issue
Block a user