From a1740426ebcd85988b10e4fc2d1f882fd2d9da53 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Mon, 10 Jan 2005 14:54:35 +0000 Subject: [PATCH] Correct predicate portal type to "Predicate Group" git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2181 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Resource.py | 4 ++-- product/ERP5/Document/SupplyLine.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/product/ERP5/Document/Resource.py b/product/ERP5/Document/Resource.py index 04b106152b..b625c3471e 100755 --- a/product/ERP5/Document/Resource.py +++ b/product/ERP5/Document/Resource.py @@ -606,12 +606,12 @@ class Resource(XMLMatrix, CoreResource, Variated): self._baseSetQuantityStepList(value) value = self.getQuantityStepList() value.sort() - for pid in self.contentIds(filter={'portal_type': 'Predicate'}): + for pid in self.contentIds(filter={'portal_type': 'Predicate Group'}): self.deleteContent(pid) if len(value) > 0: value = [None] + value + [None] for i in range(0, len(value) - 1): - p = self.newContent(id = 'quantity_range_%s' % i, portal_type = 'Predicate') + p = self.newContent(id = 'quantity_range_%s' % i, portal_type = 'Predicate Group') p.setCriterionPropertyList(('quantity', )) p.setCriterion('quantity', min=value[i], max=value[i+1]) p.setTitle('%s <= quantity < %s' % (repr(value[i]),repr(value[i+1]))) diff --git a/product/ERP5/Document/SupplyLine.py b/product/ERP5/Document/SupplyLine.py index 293f693d45..b77ff3c14a 100755 --- a/product/ERP5/Document/SupplyLine.py +++ b/product/ERP5/Document/SupplyLine.py @@ -274,11 +274,11 @@ Une ligne tarifaire.""" self._baseSetQuantityStepList(value) value = self.getQuantityStepList() value.sort() - for pid in self.contentIds(filter={'portal_type': 'Predicate'}): + for pid in self.contentIds(filter={'portal_type': 'Predicate Group'}): self.deleteContent(pid) value = [None] + value + [None] for i in range(0, len(value) - 1): - p = self.newContent(id = 'quantity_range_%s' % i, portal_type = 'Predicate') + p = self.newContent(id = 'quantity_range_%s' % i, portal_type = 'Predicate Group') p.setCriterionPropertyList(('quantity', )) p.setCriterion('quantity', min=value[i], max=value[i+1]) p.setTitle('%s <= quantity < %s' % (repr(value[i]),repr(value[i+1]))) -- 2.30.9