From 1225b09300da4a1f2c44d618805dcb857d63ceb7 Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Thu, 3 Oct 2013 16:30:00 +0200 Subject: [PATCH] [view] -touchscreen interface --- __openerp__.py | 2 +- pos_membership.py | 26 +++++++++++++++++++++++++- view/pos_membership.xml | 17 +++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 view/pos_membership.xml diff --git a/__openerp__.py b/__openerp__.py index a73d3bb..f5f10b5 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -45,7 +45,7 @@ #'static/src/css/pos_nohover.css', # this css has no hover effects (for resistive touchscreens) ], 'qweb': ['static/src/xml/pos.xml'], - 'update_xml': [], + 'update_xml': ['view/pos_membership.xml'], 'demo_xml': [], 'test': [], 'installable': True, diff --git a/pos_membership.py b/pos_membership.py index 6e75dd7..5f62352 100644 --- a/pos_membership.py +++ b/pos_membership.py @@ -11,7 +11,7 @@ # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ReMembership is distributed in the hope that it will be useful, +# POS Membership is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. @@ -39,6 +39,30 @@ STATE = [ ] +class pos_session(osv.osv): + _inherit = 'pos.session' + + def open_cb(self, cr, uid, ids, context=None): + """ + Avoid 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 { + } +pos_session() + + + class pos_order(osv.osv): _inherit = 'pos.order' diff --git a/view/pos_membership.xml b/view/pos_membership.xml new file mode 100644 index 0000000..257a147 --- /dev/null +++ b/view/pos_membership.xml @@ -0,0 +1,17 @@ + + + + + + + pos.session.form + pos.session + + + + 1 + + + + + -- 2.20.1