From b855cbfbab58f34dfd28c9e2e5b8f8f90bfe47e1 Mon Sep 17 00:00:00 2001 From: pedrambiria Date: Fri, 10 Feb 2023 09:06:29 +0000 Subject: [PATCH] [FIX] point_of_sale: reset NumberBuffer after scanning a barcode Before this commit: if you scan a barcode to add a product and then change its quantity, it will use previos `NumberBuffer` that have been used before. The solution is to reset the `NumberBuffer` after scanning a barcode. opw-3170518 closes odoo/odoo#112765 X-original-commit: 1100b518f54c0b8cf29a312e768c1494635059a6 Signed-off-by: Trinh Jacky (trj) Signed-off-by: Pedram Bi Ria (pebr) --- .../static/src/js/Screens/ProductScreen/ProductScreen.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js b/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js index f2313003095..c215b787de3 100644 --- a/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js +++ b/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js @@ -299,6 +299,7 @@ export class ProductScreen extends ControlButtonsMixin(LegacyComponent) { }); } this.currentOrder.add_product(product, options); + this.numberBuffer.reset(); } _barcodePartnerAction(code) { const partner = this.env.pos.db.get_partner_by_barcode(code.code);