From cc2eb5ea0f0ebadee9bd7758972f6b0752092144 Mon Sep 17 00:00:00 2001 From: GabbasovDinar Date: Mon, 27 Aug 2018 08:27:48 +0000 Subject: [PATCH] [IMP] point_of_sale: better merge detection If sells 1. product A 2. product B 3. product A the lines of product A were not merged Closes #25540 closes odoo/odoo#26602 --- addons/point_of_sale/static/src/js/models.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index acda4a77e7a..161d9d37df2 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -2343,10 +2343,11 @@ exports.Order = Backbone.Model.extend({ } if (to_merge_orderline){ to_merge_orderline.merge(line); + this.select_orderline(to_merge_orderline); } else { this.orderlines.add(line); + this.select_orderline(this.get_last_orderline()); } - this.select_orderline(this.get_last_orderline()); if(line.has_product_lot){ this.display_lot_popup();