summaryrefslogtreecommitdiff
path: root/odoo/tools/convert.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-17 15:50:59 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-17 15:50:59 +0200
commitd785adba6c09b0773bdd874182f450ba2ebe7c6d (patch)
tree5189f5dc30c84515eda62c4d6a512f552ae8f900 /odoo/tools/convert.py
parent8968a620105e2e79f2aa9d8db36b5408b89e92ee (diff)
parentc545783b95b15f65a9798003b614f75685dc434e (diff)
[MERGE] forward port branch 12.0 up to c545783b95b
Diffstat (limited to 'odoo/tools/convert.py')
-rw-r--r--odoo/tools/convert.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/odoo/tools/convert.py b/odoo/tools/convert.py
index e677560979e..0b612f7b9ff 100644
--- a/odoo/tools/convert.py
+++ b/odoo/tools/convert.py
@@ -178,18 +178,20 @@ def _eval_xml(self, node, env):
return res
elif node.tag == "function":
a_eval = node.get('eval')
+ model_str = node.get('model')
if a_eval:
- self.idref['ref'] = self.id_get
+ idref2 = _get_idref(self, env, model_str, self.idref)
+ args = safe_eval(a_eval, idref2)
# ensure the args are a list (sometimes folks eval a tuple which
# is inconvenient when trying to concatenate w/ a list)
- args = list(safe_eval(a_eval, self.idref))
+ args = list(safe_eval(a_eval, idref2))
else:
args = [
r for r in (_eval_xml(self, n, env) for n in node)
if r is not None
]
- model = env[node.get('model')]
+ model = env[model_str]
method_name = node.get('name')
method = getattr(model, method_name)