From 8b693955615f19cccff72ad2940c2c640f5f23d1 Mon Sep 17 00:00:00 2001 From: Frederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com> Date: Wed, 5 Nov 2014 20:02:49 +0100 Subject: [PATCH] [FIX] point_of_sale: the order should not be displayed in the print screen, and the order should not reprint itself automatically after the first time we go on the print screen --- addons/point_of_sale/static/src/js/screens.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 63caa5f82ae2..3a09233d3b27 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -919,8 +919,8 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa module.ReceiptScreenWidget = module.ScreenWidget.extend({ template: 'ReceiptScreenWidget', - show_numpad: true, - show_leftpane: true, + show_numpad: false, + show_leftpane: false, show: function(){ this._super(); @@ -939,7 +939,10 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }); this.refresh(); - this.print(); + + if (!this.pos.get('selectedOrder')._printed) { + this.print(); + } // // The problem is that in chrome the print() is asynchronous and doesn't @@ -964,6 +967,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }, 2000); }, print: function() { + this.pos.get('selectedOrder')._printed = true; window.print(); }, finishOrder: function() { -- GitLab