summaryrefslogtreecommitdiff
path: root/odoo/tools/convert.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-17 12:19:55 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-17 12:19:55 +0200
commitd8c0826b078788be03c2835b01c4fbd08a2cd398 (patch)
tree0bb5f9955ddc4ee7ec5ed58ec4f386618ae1f70b /odoo/tools/convert.py
parentcc641b3e2dda678c0d6928768c66047c2070ccb6 (diff)
parent37bca6ae5001d76789dc5c02bdbdfab9ddb557fa (diff)
[MERGE] forward port branch saas-11.3 up to 37bca6ae500
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 b98e586a62e..3c873597ae0 100644
--- a/odoo/tools/convert.py
+++ b/odoo/tools/convert.py
@@ -179,15 +179,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, {})