[FIX] point_of_sale: open POS dashboard when no sessions on /pos/web

When you go to /pos/web and there is no open session that belongs to the
current user the controller redirected to an old action called
action_pos_session_opening that was removed in
48ab50ed0d. This replaces that action
with action_client_pos_menu which just redirects to the POS dashboard.
This commit is contained in:
Joren Van Onder
2015-12-28 13:05:41 +01:00
parent 21e2e85790
commit e89541be44
+1 -1
View File
@@ -18,7 +18,7 @@ class PosController(http.Controller):
PosSession = request.registry['pos.session']
pos_session_ids = PosSession.search(cr, uid, [('state','=','opened'),('user_id','=',session.uid)], context=context)
if not pos_session_ids:
return werkzeug.utils.redirect('/web#action=point_of_sale.action_pos_session_opening')
return werkzeug.utils.redirect('/web#action=point_of_sale.action_client_pos_menu')
PosSession.login(cr, uid, pos_session_ids, context=context)
return request.render('point_of_sale.index')