website/controllers/webclient.py

15 lines
501 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import http
from odoo.http import request
from odoo.addons.web.controllers.webclient import WebClient
class WebsiteWebClient(WebClient):
@http.route()
def bundle(self, bundle_name, **bundle_params):
if 'website_id' in bundle_params:
request.update_context(website_id=int(bundle_params['website_id']))
return super().bundle(bundle_name, **bundle_params)