From e94b2f8a3e84a5695873da35bdc44cc1a848a5ae Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL <sylvain.legal@akretion.com> Date: Mon, 2 May 2016 12:12:52 +0200 Subject: [PATCH] [FIX] point_of_sale: display select button on client list after scanning Before this, if you where on the customer selection screen and scanned a customer barcode the customer would be shown, but you were not able to select him. This correctly sets ClientListScreenWidget.new_client to the scanned partner which makes the button toggle. Closes #11874 --- addons/point_of_sale/static/src/js/screens.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 15fba3f19752..d9eeb7683b43 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1023,7 +1023,9 @@ var ClientListScreenWidget = ScreenWidget.extend({ if (this.editing_client) { this.$('.detail.barcode').val(code.code); } else if (this.pos.db.get_partner_by_barcode(code.code)) { - this.display_client_details('show',this.pos.db.get_partner_by_barcode(code.code)); + var partner = this.pos.db.get_partner_by_barcode(code.code); + this.new_client = partner; + this.display_client_details('show', partner); } }, perform_search: function(query, associate_result){ -- GitLab