diff --git a/product/ERP5/Document/Delivery.py b/product/ERP5/Document/Delivery.py index b84f13164b3b6ac100c83f9f3feeee930270a32f..a1af7e87c8c3fda1aafa272760887a93e0f0223d 100644 --- a/product/ERP5/Document/Delivery.py +++ b/product/ERP5/Document/Delivery.py @@ -116,7 +116,7 @@ class Delivery(XMLObject, ImmobilisationDelivery): security.declareProtected( Permissions.AccessContentsInformation, 'getTotalPrice') - def getTotalPrice(self, fast=1, src__=0, **kw): + def getTotalPrice(self, fast=0, src__=0, **kw): """ Returns the total price for this order if the `fast` argument is set to a true value, then it use SQLCatalog to compute the price, otherwise it sums the total @@ -139,7 +139,7 @@ class Delivery(XMLObject, ImmobilisationDelivery): security.declareProtected(Permissions.AccessContentsInformation, 'getTotalQuantity') - def getTotalQuantity(self, fast=1, src__=0, **kw): + def getTotalQuantity(self, fast=0, src__=0, **kw): """ Returns the total quantity of this order. if the `fast` argument is set to a true value, then it use SQLCatalog to compute the quantity, otherwise it sums the total diff --git a/product/ERP5/Document/OrderLine.py b/product/ERP5/Document/OrderLine.py index e4f2e7636d4ee619a162897b4331eee0f9303fea..39be6ed6a929e857d197bd7e4164c68f32e83066 100644 --- a/product/ERP5/Document/OrderLine.py +++ b/product/ERP5/Document/OrderLine.py @@ -80,11 +80,13 @@ class OrderLine(DeliveryLine): transactional_variable[call_method_key] = result return result - def _getTotalPrice(self, context, fast=1): - """ + def _getTotalPrice(self, context, fast=0): + """Returns the total price for this order line. + if hasLineContent: return sum of lines total price if hasCellContent: return sum of cells total price else: return quantity * price + if fast is argument true, then a SQL method will be used. """ base_id = 'movement' if self.hasLineContent(): @@ -104,11 +106,13 @@ class OrderLine(DeliveryLine): security.declareProtected(Permissions.AccessContentsInformation, 'getTotalQuantity') - def getTotalQuantity(self, fast=1): - """ + def getTotalQuantity(self, fast=0): + """Returns the total quantity of this order line. + if hasLineContent: return sum of lines total quantity if hasCellContent: return sum of cells total quantity else: return quantity + if fast argument is true, then a SQL method will be used. """ base_id = 'movement' if self.hasLineContent():