[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) <vfe@odoo.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user