diff --git a/product/ERP5/Document/Delivery.py b/product/ERP5/Document/Delivery.py
index 4fd88bf7f0693b4c6e78f4227b768b05889c1658..e66ae871372faf9ec2de63b18a01873a49859937 100644
--- a/product/ERP5/Document/Delivery.py
+++ b/product/ERP5/Document/Delivery.py
@@ -133,7 +133,7 @@ class Delivery(XMLObject, ImmobilisationDelivery):
         aggregate = self.Delivery_zGetTotal(**kw)[0]
         result = aggregate.total_price or 0
       method = self._getTypeBasedMethod('getTotalPrice')
-      if method is None:
+      if method is not None:
         return method(result)
       return result