From 0a7883dd878e09e975daed25030f801431a76d08 Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Mon, 15 Mar 2021 18:46:18 +0000 Subject: [PATCH] [FIX] sale: show discount popup for orders beginning with a section/note The popup to apply the discount of the first SO line to the other lines didn't appear when the first line was a section or a note. closes odoo/odoo#67907 X-original-commit: 995ba0c2033455a2092439e9728b3f731381c742 Signed-off-by: Victor Feyens (vfe) --- addons/sale/static/src/js/sale_order_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/static/src/js/sale_order_view.js b/addons/sale/static/src/js/sale_order_view.js index 6956f277e16..ef74cee9737 100644 --- a/addons/sale/static/src/js/sale_order_view.js +++ b/addons/sale/static/src/js/sale_order_view.js @@ -25,7 +25,7 @@ odoo.define('sale.SaleOrderView', function (require) { * (3) Discount is the same in all sale order line */ _onOpenDiscountWizard(ev) { - const orderLines = this.renderer.state.data.order_line.data; + const orderLines = this.renderer.state.data.order_line.data.filter(line => !line.data.display_type); const recordData = ev.target.recordData; const isEqualDiscount = orderLines.slice(1).every(line => line.data.discount === recordData.discount); if (orderLines.length >= 3 && recordData.sequence === orderLines[0].data.sequence && isEqualDiscount) {