Commit 13c3d304 authored by Romain Courteaud's avatar Romain Courteaud

Add DefaultTitleOrIdGetter generated methods.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2647 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7215d3a7
...@@ -2056,6 +2056,22 @@ def createValueAccessors(klass, id): ...@@ -2056,6 +2056,22 @@ def createValueAccessors(klass, id):
if not hasattr(klass, accessor_name): if not hasattr(klass, accessor_name):
setattr(klass, accessor_name, accessor) setattr(klass, accessor_name, accessor)
accessor = Value.DefaultTitleOrIdGetter(accessor_name, id)
accessor_name = 'getDefault' + UpperCase(id) + 'TitleOrId'
if not hasattr(klass, accessor_name):
setattr(klass, accessor_name, accessor)
klass.security.declareProtected(Permissions.AccessContentsInformation, accessor_name)
accessor_name = 'get' + UpperCase(id) + 'TitleOrId'
if not hasattr(klass, accessor_name):
setattr(klass, accessor_name, accessor)
klass.security.declareProtected(Permissions.AccessContentsInformation, accessor_name)
accessor_name = '_categoryGetDefault' + UpperCase(id) + 'TitleOrId'
if not hasattr(klass, accessor_name):
setattr(klass, accessor_name, accessor)
accessor_name = '_categoryGet' + UpperCase(id) + 'TitleOrId'
if not hasattr(klass, accessor_name):
setattr(klass, accessor_name, accessor)
accessor_name = 'getDefault' + UpperCase(id) + 'Property' accessor_name = 'getDefault' + UpperCase(id) + 'Property'
accessor = Value.DefaultIdGetter(accessor_name, id) accessor = Value.DefaultIdGetter(accessor_name, id)
if not hasattr(klass, accessor_name): if not hasattr(klass, accessor_name):
......
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