From 5089921bd275d92757367fe7e1b1480f8930ab9a Mon Sep 17 00:00:00 2001 From: Szeka Wong Date: Fri, 16 Sep 2016 15:14:56 +0200 Subject: [PATCH] Replace get_user_variables (=deprecated) with get_all_user_python_expression. Add call on template render function. --HG-- branch : odoo8 --- py3o_report_modif.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py3o_report_modif.py b/py3o_report_modif.py index 84028446..8683ea25 100644 --- a/py3o_report_modif.py +++ b/py3o_report_modif.py @@ -83,10 +83,11 @@ class py3o_report(report_sxw): #TODO: Find a way to avoid calling Template t = Template(in_temp.name, out_temp.name) # Remove 'py3o.' - user_variable = [x[5:] for x in t.get_user_variables()] + user_variable = [x[5:] for x in t.get_all_user_python_expression()] print user_variable values = self.get_values(cr, uid, ids, data, context) + t.render(values) print values #WARNING: We rely on the fact that there is a for loop on the report