Commit 0fb3609e authored by Rafael Monnerat's avatar Rafael Monnerat

Introduced a new method. This Type Name Definition is used everywhere in this...

Introduced a new method. This Type Name Definition is used everywhere in this file, very hard to guess the meaning in others places. This method should centralize the definition in one place. This file will be be updated to use this method instead local definition everywhere.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32250 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 90456dad
...@@ -587,6 +587,15 @@ class BaseTemplateItem(Implicit, Persistent): ...@@ -587,6 +587,15 @@ class BaseTemplateItem(Implicit, Persistent):
obj._code = None obj._code = None
return obj return obj
def getTemplateTypeName(self):
"""
Get a meaningfull class Name without 'TemplateItem'. Used to
present to the user.
XXX: -12 used here is -len('TemplateItem')
"""
return self.__class__.__name__[:-12]
class ObjectTemplateItem(BaseTemplateItem): class ObjectTemplateItem(BaseTemplateItem):
""" """
This class is used for generic objects and as a subclass. This class is used for generic objects and as a subclass.
......
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