From faf1c6187b3cba42107d7548230c82d1f712bfd6 Mon Sep 17 00:00:00 2001 From: gaelTorrecillas Date: Wed, 6 Sep 2017 16:00:47 +0200 Subject: [PATCH] [fix] compability between pos_customer_display and pos_pricelist (#210) * [fix] compability between pos_customer_display and pos_pricelist --- pos_customer_display/__manifest__.py | 2 +- .../static/src/js/customer_display.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pos_customer_display/__manifest__.py b/pos_customer_display/__manifest__.py index ff15bce9..9acc5b06 100644 --- a/pos_customer_display/__manifest__.py +++ b/pos_customer_display/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'POS Customer Display', - 'version': '10.0.1.0.0', + 'version': '10.0.1.0.1', 'category': 'Point Of Sale', 'summary': 'Manage Customer Display device from POS front end', 'author': "Aurélien DUMAINE,Akretion,Odoo Community Association (OCA)", diff --git a/pos_customer_display/static/src/js/customer_display.js b/pos_customer_display/static/src/js/customer_display.js index eb224335..8438ce45 100644 --- a/pos_customer_display/static/src/js/customer_display.js +++ b/pos_customer_display/static/src/js/customer_display.js @@ -203,7 +203,9 @@ odoo.define('pos_customer_display', function(require) { var res = OrderlineSuper.prototype.set_quantity.call(this, quantity); if (quantity != 'remove') { var line = this; - this.pos.prepare_text_customer_display('add_update_line', {'line': line}); + if(this.selected){ + this.pos.prepare_text_customer_display('add_update_line', {'line': line}); + } } return res; }, @@ -212,7 +214,9 @@ odoo.define('pos_customer_display', function(require) { var res = OrderlineSuper.prototype.set_discount.call(this, discount); if (discount) { var line = this; - this.pos.prepare_text_customer_display('add_update_line', {'line': line}); + if(this.selected){ + this.pos.prepare_text_customer_display('add_update_line', {'line': line}); + } } return res; }, @@ -220,7 +224,9 @@ odoo.define('pos_customer_display', function(require) { set_unit_price: function(price){ var res = OrderlineSuper.prototype.set_unit_price.call(this, price); var line = this; - this.pos.prepare_text_customer_display('add_update_line', {'line': line}); + if(this.selected){ + this.pos.prepare_text_customer_display('add_update_line', {'line': line}); + } return res; },