[FIX] website_payment: access parent payment method

On the other routes (e.g. /my/, /my/contract/) payment information on the parent
contact are displayed but can not be access in the my payment route.
You get in a unconsistant situation where you can access the contract of the
company and its payment information but can not use this payment information.

opw-681491, opw-681502
This commit is contained in:
Martin Trigaux
2016-06-28 12:16:41 +02:00
parent cc4f8df99f
commit cbbc90fc2e
@@ -10,6 +10,7 @@ class website_payment(http.Controller):
acquirers = list(request.env['payment.acquirer'].search([('website_published', '=', True), ('registration_view_template_id', '!=', False)]))
partner = request.env.user.partner_id
payment_methods = partner.payment_method_ids
payment_methods |= partner.commercial_partner_id.sudo().payment_method_ids
values = {
'pms': payment_methods,
'acquirers': acquirers