Skip to content
Snippets Groups Projects
Commit 77b06b59 authored by Xavier Morel's avatar Xavier Morel
Browse files

[FIX] extraction of a class's full name, use datamodel attributes instead of string munging

bzr revid: xmo@openerp.com-20110321080632-xpqbwwnjrqk31hly
parent 375b44e1
No related branches found
No related tags found
No related merge requests found
......@@ -198,9 +198,7 @@ controllers_path = {}
class ControllerType(type):
def __init__(cls, name, bases, attrs):
super(ControllerType, cls).__init__(name, bases, attrs)
# TODO forgive me this hack and find me a clean way to get the absolute name of a class
cls.fullname = re.search("'(.+)'",repr(cls)).group(1)
controllers_class[cls.fullname] = cls
controllers_class["%s.%s" % (cls.__module__, cls.__name__)] = cls
class Controller(object):
__metaclass__ = ControllerType
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment