From a64c16aac5226a598e95c734f8e494c5d2f8a9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 21 Nov 2013 14:33:09 +0100 Subject: [PATCH] [FIX] payment.acquirer: now passing xml_id instead of id for the template to render. Indeed render accepts view ID, but the qweb engine does not handle IDs, only xml_ids. Using the view xml_id field allows to avoid having a hack in the server. bzr revid: tde@openerp.com-20131121133309-qq2alstapq5sonkm --- addons/payment_acquirer/models/payment_acquirer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/payment_acquirer/models/payment_acquirer.py b/addons/payment_acquirer/models/payment_acquirer.py index bfb3c745ace..69a026cba81 100644 --- a/addons/payment_acquirer/models/payment_acquirer.py +++ b/addons/payment_acquirer/models/payment_acquirer.py @@ -130,7 +130,8 @@ class PaymentAcquirer(osv.Model): 'tx_values': tx_values, 'context': context, } - return self.pool['ir.ui.view'].render(cr, uid, acquirer.view_template_id.id, qweb_context, engine='ir.qweb', context=context) + # because render accepts view ids but not qweb -> need to find the xml_id + return self.pool['ir.ui.view'].render(cr, uid, acquirer.view_template_id.xml_id, qweb_context, engine='ir.qweb', context=context) def get_form_action_url(self, cr, uid, id, context=None): acquirer = self.browse(cr, uid, id, context=context)