summaryrefslogtreecommitdiff
path: root/odoo/tools/convert.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-17 09:59:53 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-17 10:00:11 +0200
commit5f17daae4069fca9d65d35c74cac548c48a17d59 (patch)
treef863d478169e9ed339f34385e5b2c3d2820207c9 /odoo/tools/convert.py
parent587357432e13bf80f341ca33cc798b633b2208c5 (diff)
parentdaf9763e6ecbaadb8f92b14fd2fadc310c54c690 (diff)
[MERGE] forward report branch 11.0 up to daf9763e6ec
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 16dd569239f..94b1c26b1ce 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, {})