Commit 3aaedbdb authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

Worklist.py: add property Reference and varable default _reference.

parent bda71cc4
...@@ -44,7 +44,7 @@ from Products.ERP5Type.id_as_reference import IdAsReferenceMixin ...@@ -44,7 +44,7 @@ from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
tales_re = re.compile(r'(\w+:)?(.*)') tales_re = re.compile(r'(\w+:)?(.*)')
class Worklist(IdAsReferenceMixin('worklist_'), XMLObject): class Worklist(IdAsReferenceMixin('_worklist'), XMLObject):
""" """
A ERP5 Worklist. A ERP5 Worklist.
""" """
...@@ -67,7 +67,7 @@ class Worklist(IdAsReferenceMixin('worklist_'), XMLObject): ...@@ -67,7 +67,7 @@ class Worklist(IdAsReferenceMixin('worklist_'), XMLObject):
actbox_icon = '' actbox_icon = ''
actbox_category = 'global' actbox_category = 'global'
guard = None guard = None
default_reference = ''
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
...@@ -78,6 +78,7 @@ class Worklist(IdAsReferenceMixin('worklist_'), XMLObject): ...@@ -78,6 +78,7 @@ class Worklist(IdAsReferenceMixin('worklist_'), XMLObject):
PropertySheet.XMLObject, PropertySheet.XMLObject,
PropertySheet.CategoryCore, PropertySheet.CategoryCore,
PropertySheet.DublinCore, PropertySheet.DublinCore,
PropertySheet.Reference,
PropertySheet.Worklist, PropertySheet.Worklist,
) )
...@@ -114,7 +115,7 @@ class Worklist(IdAsReferenceMixin('worklist_'), XMLObject): ...@@ -114,7 +115,7 @@ class Worklist(IdAsReferenceMixin('worklist_'), XMLObject):
res = [] res = []
res.append(self.getParentValue().getStateVariable()) res.append(self.getParentValue().getStateVariable())
for vdef in self.getParentValue().contentValues(portal_type="Variable"): for vdef in self.getParentValue().contentValues(portal_type="Variable"):
id = vdef.getId()### getRef id = vdef.getId()
if vdef.for_catalog: if vdef.for_catalog:
res.append(id) res.append(id)
res.sort() res.sort()
......
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