From 73569da5e8c377a31955f0d6e35158ec85e394b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 3 Feb 2014 16:31:02 +0100 Subject: [PATCH] [IMP] point_of_sale: open cashbox on payment validation and not on payment method selection bzr revid: fva@openerp.com-20140203153102-kfdaoaoo50mbudpk --- addons/point_of_sale/static/src/js/screens.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 7860de8b328..cbd6779f33c 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -936,12 +936,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa document.body.addEventListener('keyup', this.hotkey_handler); - if( this.pos.config.iface_cashdrawer - && this.pos.get('selectedOrder').get('paymentLines').find( function(pl){ - return pl.cashregister.journal.type === 'cash'; - })){ - this.pos.proxy.open_cashbox(); - } this.add_action_button({ @@ -1145,6 +1139,13 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa return; } + if( this.pos.config.iface_cashdrawer + && this.pos.get('selectedOrder').get('paymentLines').find( function(pl){ + return pl.cashregister.journal.type === 'cash'; + })){ + this.pos.proxy.open_cashbox(); + } + if(options.invoice){ // deactivate the validation button while we try to send the order this.pos_widget.action_bar.set_button_disabled('validation',true);