diff --git a/website_search_products/controllers/controller.py b/website_search_products/controllers/controller.py index 65db252..ed2d861 100644 --- a/website_search_products/controllers/controller.py +++ b/website_search_products/controllers/controller.py @@ -4,7 +4,7 @@ from odoo import http from odoo.http import request from odoo.addons.website.controllers.main import Website -from werkzeug.utils import redirect +from werkzeug.utils import redirect as werkzeug_redirect import logging @@ -23,7 +23,7 @@ class InventoryForm(http.Controller): has_internal = user.has_group("base.group_user") if not has_portal and not has_internal: - return redirect("/web") + return werkzeug_redirect("/web") # Fetch active products available in POS products = ( @@ -55,6 +55,6 @@ class WebsiteController(Website): # Redirect portal users to inventory search redirect_url = "/inventory/search" - return redirect(redirect_url) + return werkzeug_redirect(redirect_url) return response