website_search_products: fix redirect
This commit is contained in:
parent
46634fcdc0
commit
67554c95f5
1 changed files with 3 additions and 3 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
from odoo import http
|
from odoo import http
|
||||||
from odoo.http import request
|
from odoo.http import request
|
||||||
from odoo.addons.website.controllers.main import Website
|
from odoo.addons.website.controllers.main import Website
|
||||||
from werkzeug.utils import redirect
|
from werkzeug.utils import redirect as werkzeug_redirect
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ class InventoryForm(http.Controller):
|
||||||
has_internal = user.has_group("base.group_user")
|
has_internal = user.has_group("base.group_user")
|
||||||
|
|
||||||
if not has_portal and not has_internal:
|
if not has_portal and not has_internal:
|
||||||
return redirect("/web")
|
return werkzeug_redirect("/web")
|
||||||
|
|
||||||
# Fetch active products available in POS
|
# Fetch active products available in POS
|
||||||
products = (
|
products = (
|
||||||
|
|
@ -55,6 +55,6 @@ class WebsiteController(Website):
|
||||||
# Redirect portal users to inventory search
|
# Redirect portal users to inventory search
|
||||||
redirect_url = "/inventory/search"
|
redirect_url = "/inventory/search"
|
||||||
|
|
||||||
return redirect(redirect_url)
|
return werkzeug_redirect(redirect_url)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue