website_search_products: fix redirect

This commit is contained in:
Luis 2026-02-04 09:28:51 +01:00
parent 46634fcdc0
commit 67554c95f5

View file

@ -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