[FIX] point_of_sale: prevent traceback while open session with the portal user
when the user allows multi employee per session and the portal user tries to access the pos with the URL /pos/ui?config_id=1 then the error will be generated. steps to reproduce: - Installed point_of_sale module. - In Configuration > Point of Sale > activate Multi Employees per Session option and save it. - In another window, do log in as a demo user and start the pos session. - From the Admin user, make Marc Demo as a portal user. - Then refresh the demo user session. - Traceback will be generated Applying these changes will resolve this issue. sentry - 3958755602 closes odoo/odoo#124662 X-original-commit: 49447781b95f18a87491e47c19e4e8a6167ccf1d Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
This commit is contained in:
@@ -28,6 +28,9 @@ class PosController(PortalAccount):
|
||||
:type config_id: str.
|
||||
:returns: object -- The rendered pos session.
|
||||
"""
|
||||
is_internal_user = request.env.user.has_group('base.group_user')
|
||||
if not is_internal_user:
|
||||
return request.not_found()
|
||||
domain = [
|
||||
('state', 'in', ['opening_control', 'opened']),
|
||||
('user_id', '=', request.session.uid),
|
||||
|
||||
Reference in New Issue
Block a user