diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index e6c7bb260ca..ce89363dcf9 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -966,7 +966,6 @@ var ClientListScreenWidget = ScreenWidget.extend({ this.renderElement(); this.details_visible = false; this.old_client = this.pos.get_order().get_client(); - this.new_client = this.old_client; this.$('.back').click(function(){ self.gui.back(); @@ -1016,6 +1015,10 @@ var ClientListScreenWidget = ScreenWidget.extend({ self.clear_search(); }); }, + hide: function () { + this._super(); + this.new_client = null; + }, barcode_client_action: function(code){ if (this.editing_client) { this.$('.detail.barcode').val(code.code); @@ -1058,7 +1061,7 @@ var ClientListScreenWidget = ScreenWidget.extend({ clientline = clientline.childNodes[1]; this.partner_cache.cache_node(partner.id,clientline); } - if( partners === this.new_client ){ + if( partner === this.old_client ){ clientline.classList.add('highlight'); }else{ clientline.classList.remove('highlight');