Commit a1740426 authored by Romain Courteaud's avatar Romain Courteaud

Correct predicate portal type to "Predicate Group"


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2181 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f6ad3806
......@@ -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])))
......
......@@ -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])))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment