diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index af932caf884..637f6bd5a2f 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -376,6 +376,21 @@ class pos_session(osv.osv): return True + def open_frontend_cb(self, cr, uid, ids, context=None): + if not context: + context = {} + + if not ids: + return {} + + context.update({'session_id' : ids[0]}) + return { + 'type' : 'ir.actions.client', + 'name' : 'Start Point Of Sale', + 'tag' : 'pos.ui', + 'context' : context, + } + # def get_current_session(self, cr, uid, context=None): # # TODO: Remove this code and use a wizard in the front-end # current_user = self.pool.get('res.users').browse(cr, uid, uid, context=context) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index f16673e019e..b65a662196c 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -863,6 +863,7 @@