Add counter
This commit is contained in:
@@ -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')
|
||||||
|
|||||||
Reference in New Issue
Block a user