summaryrefslogtreecommitdiff
path: root/addons/website_payment/controllers
diff options
context:
space:
mode:
authorDamien Bouvy <dbo@odoo.com>2016-08-03 09:42:38 +0200
committerDamien Bouvy <dbo@odoo.com>2016-08-03 09:42:38 +0200
commit4014563e3fcd4e206655745481dfc0a45fd8a7ae (patch)
tree68781f427f4c5e0316ea315d61273362cfbc39ce /addons/website_payment/controllers
parent9d4efc81a6d7563c50d099c426ec5cba43cf11a9 (diff)
[FIX] website_payment: stop treating _registration_render result as a list
I assume this was necessary before the migration of payment because an api.one wrapper was added by the auto-guess api feature. Since payment has been migrated, this decorator is no longer present and the result of _registration_render is no longer encapsulated in a list. Therefore, taking the zeroth element was akin to taking only the first character of the rendered html. Usually \n, which is not useful but which also prevented the crash to be easily visible.
Diffstat (limited to 'addons/website_payment/controllers')
-rw-r--r--addons/website_payment/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_payment/controllers/main.py b/addons/website_payment/controllers/main.py
index a3487e5052d..afcc77e9ff9 100644
--- a/addons/website_payment/controllers/main.py
+++ b/addons/website_payment/controllers/main.py
@@ -16,7 +16,7 @@ class website_payment(http.Controller):
'acquirers': acquirers
}
for acquirer in acquirers:
- acquirer.form = acquirer.sudo()._registration_render(request.env.user.partner_id.id, {'error': {}, 'error_message': [], 'return_url': '/my/payment_method', 'json': False, 'bootstrap_formatting': True})[0]
+ acquirer.form = acquirer.sudo()._registration_render(request.env.user.partner_id.id, {'error': {}, 'error_message': [], 'return_url': '/my/payment_method', 'json': False, 'bootstrap_formatting': True})
return request.website.render("website_payment.pay_methods", values)
@http.route(['/website_payment/delete/'], methods=['POST'], type='http', auth="user", website=True)