From f0a883e6d6b942fc54dea0db0bcb8f3f33170098 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 24 Sep 2012 12:26:13 +0200 Subject: [PATCH 1/5] [FIX] point_of_sale: Show the opening_control & closing_control bzr revid: stw@openerp.com-20120924102613-twii7ba34wctx6c6 --- addons/point_of_sale/point_of_sale_view.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 9c92145ed89..d88e1f73cc2 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -896,8 +896,11 @@ - + + + @@ -917,7 +920,7 @@ -
+
From 24a4e57171fd0ce371260370226f4c90607f390b Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 24 Sep 2012 13:53:20 +0200 Subject: [PATCH 2/5] [FIX] point_of_sale: show the opening cash control bzr revid: stw@openerp.com-20120924115320-nkbfhfnyab4bhxrc --- addons/point_of_sale/point_of_sale_view.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index d88e1f73cc2..131909a1fd3 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -896,11 +896,7 @@ - - - + From 4f74d0aee15da72d386b03ba721b8ac67c4ea5a5 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 27 Sep 2012 14:19:54 +0200 Subject: [PATCH 3/5] [FIX] point_of_sale: show the cash_register_balance when we are in closing_control bzr revid: stw@openerp.com-20120927121954-1safkpgurh4nu9kc --- addons/point_of_sale/point_of_sale_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index c08695ee993..5b30ced93dd 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -934,7 +934,7 @@
- + From ff211c375a2bc589082d6dd05484fd01c2068d6e Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 27 Sep 2012 14:20:22 +0200 Subject: [PATCH 4/5] [FIX] point_of_sale: return the session id in the context for the call of the pos.ui bzr revid: stw@openerp.com-20120927122022-fy2gx1z1xtkk14xt --- addons/point_of_sale/point_of_sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 590718b48f0..920e70b7b7d 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -439,10 +439,10 @@ class pos_session(osv.osv): context = {} if not ids: return {} - context.update({'session_id' : ids[0]}) + context.update({'active_id': ids[0]}) return { 'type' : 'ir.actions.client', - 'name' : 'Start Point Of Sale', + 'name' : _('Start Point Of Sale'), 'tag' : 'pos.ui', 'context' : context, } From 3bd0b43e8103193bb1461bbf1877eeaaf405a9f1 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 1 Oct 2012 11:52:54 +0200 Subject: [PATCH 5/5] [FIX] point_of_sale: We use a callback for the 'Validate & Open Session' button, because we want to open the PoS UI. [FIX] point_of_sale: Hide/Show the opening/closing cash control bzr revid: stw@openerp.com-20121001095254-bcteq9amp0eurn3g --- addons/point_of_sale/point_of_sale.py | 23 +++++++++++++++++++++ addons/point_of_sale/point_of_sale_view.xml | 13 ++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 920e70b7b7d..dfd0d73ad55 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -348,6 +348,29 @@ class pos_session(osv.osv): statement.unlink(context=context) return True + + def open_cb(self, cr, uid, ids, context=None): + """ + call the Point Of Sale interface and set the pos.session to 'opened' (in progress) + """ + if context is None: + context = dict() + + if isinstance(ids, (int, long)): + ids = [ids] + + this_record = self.browse(cr, uid, ids[0], context=context) + this_record._workflow_signal('open') + + context.update(active_id=this_record.id) + + return { + 'type' : 'ir.actions.client', + 'name' : _('Start Point Of Sale'), + 'tag' : 'pos.ui', + 'context' : context, + } + def wkf_action_open(self, cr, uid, ids, context=None): # second browse because we need to refetch the data from the DB for cash_register_id for record in self.browse(cr, uid, ids, 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 5b30ced93dd..66b7e3b6eb5 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -862,7 +862,7 @@
-