| 1 |
|
| 2 |
|
| 3 |
from odoo.addons.sale.controllers import portal as sale_portal |
| 4 |
from odoo.http import request |
| 5 |
|
| 6 |
|
| 7 |
class CustomerPortal(sale_portal.CustomerPortal): |
| 8 |
|
| 9 |
def _get_payment_values(self, order_sudo, website_id=None, **kwargs): |
| 10 |
""" Override of `sale` to inject the `website_id` into the kwargs. |
| 11 |
|
| 12 |
:param sale.order order_sudo: The sales order being paid. |
| 13 |
:param int website_id: The website on which the order was made, if any, as a `website` id. |
| 14 |
:param dict kwargs: Locally unused keywords arguments. |
| 15 |
:return: The payment-specific values. |
| 16 |
:rtype: dict |
| 17 |
""" |
| 18 |
if not website_id: |
| 19 |
if order_sudo.website_id: |
| 20 |
website_id = order_sudo.website_id.id |
| 21 |
elif request.website: |
| 22 |
website_id = request.website.id |
| 23 |
|
| 24 |
return super()._get_payment_values(order_sudo, website_id=website_id, **kwargs) |