[FIX] Fixed yaml custom tags refactoring from base_module_record.

Serialization for those tags have probably not been used yet.

bzr revid: jth@openerp.com-20101026094509-s34a7et489f7qy3y
This commit is contained in:
Julien Thewys
2010-10-26 11:45:09 +02:00
parent 94ddb28efa
commit 0f428905d8
+3 -3
View File
@@ -4,7 +4,7 @@ import logging
class YamlTag(object):
"""
Superclass for constructors of custom tags defined in yaml file.
__str__ are overriden in subclass and used for serialization in module recorder.
__str__ is overriden in subclass and used for serialization in module recorder.
"""
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
@@ -89,14 +89,14 @@ class Eval(YamlTag):
self.expression = expression
super(Eval, self).__init__()
def __str__(self):
return 'eval(%s)' % (str(self.expr,))
return '!eval %s' % str(self.expression)
class Ref(YamlTag):
def __init__(self, expr="False", *args, **kwargs):
self.expr = expr
super(Ref, self).__init__(*args, **kwargs)
def __str__(self):
return 'ref(%s)' % (str(self.expr,))
return 'ref(%s)' % repr(self.expr)
class IrSet(YamlTag):
def __init__(self):