From e82a9ae0e1588799cb9bbe9062ef79cf8711b016 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 55fd420afab..f81f3a4051c 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -2333,10 +2333,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();