website_search_products: fix warnings
This commit is contained in:
parent
f1a3a75988
commit
46634fcdc0
2 changed files with 10 additions and 9 deletions
|
|
@ -4,6 +4,7 @@
|
|||
from odoo import http
|
||||
from odoo.http import request
|
||||
from odoo.addons.website.controllers.main import Website
|
||||
from werkzeug.utils import redirect
|
||||
|
||||
import logging
|
||||
|
||||
|
|
@ -22,7 +23,7 @@ class InventoryForm(http.Controller):
|
|||
has_internal = user.has_group("base.group_user")
|
||||
|
||||
if not has_portal and not has_internal:
|
||||
return http.redirect("/web")
|
||||
return redirect("/web")
|
||||
|
||||
# Fetch active products available in POS
|
||||
products = (
|
||||
|
|
@ -49,11 +50,11 @@ class WebsiteController(Website):
|
|||
# Redirect internal users to web, others to inventory search
|
||||
if user.has_group("base.group_user"):
|
||||
# Keep original redirect for internal users
|
||||
redirect = "/web"
|
||||
redirect_url = "/web"
|
||||
else:
|
||||
# Redirect portal users to inventory search
|
||||
redirect = "/inventory/search"
|
||||
redirect_url = "/inventory/search"
|
||||
|
||||
return http.redirect(redirect)
|
||||
return redirect(redirect_url)
|
||||
|
||||
return response
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue