From a6b278310de35263d00c6e14eb07fd8353d13bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 20 Aug 2008 14:18:10 +0000 Subject: [PATCH] the pricing sort method of resource must follow Movement_getPriceCalculationOperandDict sort methods (use section and not nodes) git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23066 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Resource.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/product/ERP5/Document/Resource.py b/product/ERP5/Document/Resource.py index 5883300f4c..076d7c938b 100644 --- a/product/ERP5/Document/Resource.py +++ b/product/ERP5/Document/Resource.py @@ -560,10 +560,10 @@ class Resource(XMLMatrix, Variated): return p def _pricingSortMethod(self, a, b): - # Simple method : the one that defines a destination wins - if a.getDestination(): - return -1 # a defines a destination and wins - return 1 # a defines no destination ans loses + # Simple method : the one that defines a destination section wins + if a.getDestinationSection(): + return -1 # a defines a destination section and wins + return 1 # a defines no destination section and loses security.declareProtected(Permissions.AccessContentsInformation, 'getPriceParameterDict') -- 2.30.9