summaryrefslogtreecommitdiff
path: root/odoo/tools/convert.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-16 18:11:09 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-16 18:11:09 +0200
commitcecb1ec77d56fefdab53f3ef0bdda9a9c51c14be (patch)
tree8fce4f85f31765bc6956c1a3c9175b3f52db79b3 /odoo/tools/convert.py
parent624c30a3b7880c798565f8c04cb1582eb617e12a (diff)
parent556b59bce19c67ac23b0644d216c4fad876c6823 (diff)
[MERGE] forward port branch saas-14 up to 556b59bce19
Diffstat (limited to 'odoo/tools/convert.py')
-rw-r--r--odoo/tools/convert.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/odoo/tools/convert.py b/odoo/tools/convert.py
index c2c25f55fad..13ef5bb5d99 100644
--- a/odoo/tools/convert.py
+++ b/odoo/tools/convert.py
@@ -177,15 +177,16 @@ def _eval_xml(self, node, env):
elif node.tag == "function":
args = []
a_eval = node.get('eval','')
+ model_str = node.get('model', '')
# FIXME: should probably be exclusive
if a_eval:
- self.idref['ref'] = self.id_get
- args = safe_eval(a_eval, self.idref)
+ idref2 = _get_idref(self, env, model_str, self.idref)
+ args = safe_eval(a_eval, idref2)
for n in node:
return_val = _eval_xml(self, n, env)
if return_val is not None:
args.append(return_val)
- model = env[node.get('model', '')]
+ model = env[model_str]
method = node.get('name')
# this one still depends on the old API
return odoo.api.call_kw(model, method, args, {})