From 4aa45f0a50cf056318bc96b05f4d272505a8bf69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 8 Sep 2021 09:42:31 +0200 Subject: [PATCH] Pass a list of shipment cost to Warning.format --- account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account.py b/account.py index 3cc565a830..f44b04f1e0 100644 --- a/account.py +++ b/account.py @@ -232,7 +232,7 @@ class ShipmentCost(Workflow, ModelSQL, ModelView): parties = shipment_cost.parties all_shipments = shipment_cost.all_shipments if not all_shipments: - key = Warning.format('post no shipment', shipment_cost) + key = Warning.format('post no shipment', [shipment_cost]) if Warning.check(key): raise NoShipmentWarning( key, @@ -245,7 +245,7 @@ class ShipmentCost(Workflow, ModelSQL, ModelView): continue if other.parties & parties: key = Warning.format( - 'post same parties', shipment_cost) + 'post same parties', [shipment_cost]) if Warning.check(key): raise SamePartiesWarning( key,