diff options
| author | HDA (OpenERP) <hda@tinyerp.com> | 2010-04-15 14:13:48 +0530 |
|---|---|---|
| committer | HDA (OpenERP) <hda@tinyerp.com> | 2010-04-15 14:13:48 +0530 |
| commit | 4ebe2703d7385e35cbd44bff2d7228803ffb3ce4 (patch) | |
| tree | 036affcbb978dffeaa697181e0e7ac6251c83429 /bin/tools | |
| parent | 2cd495e9c4877a46b95b8b0bb55abcf1b5c8d6d3 (diff) | |
| parent | c6be656b4f897c4c66db8aaa4f677673a8b35d42 (diff) | |
Merged with diagram branch
bzr revid: hda@tinyerp.com-20100415084348-x4x6nmumqm3l3qdu
Diffstat (limited to 'bin/tools')
| -rw-r--r-- | bin/tools/config.py | 2 | ||||
| -rw-r--r-- | bin/tools/misc.py | 2 | ||||
| -rw-r--r-- | bin/tools/yaml_import.py | 9 | ||||
| -rw-r--r-- | bin/tools/yaml_tag.py | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/bin/tools/config.py b/bin/tools/config.py index 670c20af1af..18e9f61373e 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -77,7 +77,7 @@ class configmanager(object): 'secure' : False, 'syslog' : False, 'log_level': logging.INFO, - 'assert_exit_level': logging.WARNING, # level above which a failed assert will be raised + 'assert_exit_level': logging.ERROR, # level above which a failed assert will be raised 'cache_timeout': 100000, 'login_message': False, 'list_db' : True, diff --git a/bin/tools/misc.py b/bin/tools/misc.py index ff20966857e..56672047163 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -907,7 +907,7 @@ def get_languages(): 'es_AR': u'Spanish (AR) / Español (AR)', 'es_ES': u'Spanish / Español', 'et_EE': u'Estonian / Eesti keel', - 'fa_IR': u'Persian / Iran, Islamic Republic of', + 'fa_IR': u'Persian / فارس', 'fi_FI': u'Finland / Suomi', 'fr_BE': u'French (BE) / Français (BE)', 'fr_CH': u'French (CH) / Français (CH)', diff --git a/bin/tools/yaml_import.py b/bin/tools/yaml_import.py index e77999a49f1..76fc2e442ca 100644 --- a/bin/tools/yaml_import.py +++ b/bin/tools/yaml_import.py @@ -348,7 +348,8 @@ class YamlInterpreter(object): python, statements = node.items()[0] model = self.get_model(python.model) statements = statements.replace("\r\n", "\n") - code_context = {'self': model, 'cr': self.cr, 'uid': self.uid, 'log': log, 'context': self.context} + code_context = {'model': model, 'cr': self.cr, 'uid': self.uid, 'log': log, 'context': self.context} + code_context.update({'self': model}) # remove me when no !python block test uses 'self' anymore try: code = compile(statements, self.filename, 'exec') eval(code, {'ref': self.get_id}, code_context) @@ -399,10 +400,10 @@ class YamlInterpreter(object): param_model = self.get_model(param.get('model', model)) if 'search' in param: q = eval(param['search'], self.eval_context) - ids = param_model.search(cr, uid, q) + ids = param_model.search(self.cr, self.uid, q) value = self._get_first_result(ids) elif 'eval' in param: - local_context = {'obj': lambda x: param_model.browse(self.cr, self.uid, x, context)} + local_context = {'obj': lambda x: param_model.browse(self.cr, self.uid, x, self.context)} local_context.update(self.id_map) value = eval(param['eval'], self.eval_context, local_context) else: @@ -590,7 +591,7 @@ class YamlInterpreter(object): _, fields = node.items()[0] res = {} for fieldname, expression in fields.items(): - if isinstance(expression, Eval): + if is_eval(expression): value = eval(expression.expression, self.eval_context) else: value = expression diff --git a/bin/tools/yaml_tag.py b/bin/tools/yaml_tag.py index 97b29db1ac0..cdc892d9b80 100644 --- a/bin/tools/yaml_tag.py +++ b/bin/tools/yaml_tag.py @@ -15,7 +15,7 @@ class YamlTag(object): return "<%s %s>" % (self.__class__.__name__, sorted(self.__dict__.items())) class Assert(YamlTag): - def __init__(self, model, id, severity=logging.ERROR, string="NONAME", **kwargs): + def __init__(self, model, id, severity=logging.WARNING, string="NONAME", **kwargs): self.model = model self.id = id self.severity = severity @@ -29,7 +29,7 @@ class Record(YamlTag): super(Record, self).__init__(**kwargs) class Python(YamlTag): - def __init__(self, model, severity=logging.ERROR, name="", **kwargs): + def __init__(self, model, severity=logging.WARNING, name="", **kwargs): self.model= model self.severity = severity self.name = name |
