From fed282b84e1bee3402d3eaa1321b3ced2bbff253 Mon Sep 17 00:00:00 2001 From: Quentin Dupont Date: Fri, 12 Jan 2024 15:28:45 +0100 Subject: [PATCH 1/2] [IMP] Remove false sale order line on x2m on mrp sale grouped --- mrp_sale_grouped/wizard/x2m_matrix_grouped_sales.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrp_sale_grouped/wizard/x2m_matrix_grouped_sales.py b/mrp_sale_grouped/wizard/x2m_matrix_grouped_sales.py index 345b6dee..e6b355eb 100644 --- a/mrp_sale_grouped/wizard/x2m_matrix_grouped_sales.py +++ b/mrp_sale_grouped/wizard/x2m_matrix_grouped_sales.py @@ -19,7 +19,7 @@ def _default_line_ids(self): orders = grouped_sale_prod.mapped("order_ids").filtered( lambda o: o.state in ["draft", "sent"] ) - return orders.mapped("order_line") + return orders.mapped("order_line").filtered(lambda x: not x.display_type) def save_close(self): return From 8c6debd76c41c74122015f95c9ec4bca43a56823 Mon Sep 17 00:00:00 2001 From: Quentin Dupont Date: Sun, 14 Jan 2024 18:43:35 +0100 Subject: [PATCH 2/2] Fix wizard if there are notes or section on sale order --- mrp_sale_grouped/wizard/bom_print_purchase_list_wizard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mrp_sale_grouped/wizard/bom_print_purchase_list_wizard.py b/mrp_sale_grouped/wizard/bom_print_purchase_list_wizard.py index 50f1832f..02644b69 100644 --- a/mrp_sale_grouped/wizard/bom_print_purchase_list_wizard.py +++ b/mrp_sale_grouped/wizard/bom_print_purchase_list_wizard.py @@ -103,7 +103,9 @@ def _default_line_ids(self): boms_and_quantities = {} for order in order_ids: - for order_line in order.order_line: + for order_line in order.order_line.filtered( + lambda x: not x.display_type + ): if not order_line.product_id.bom_ids: missing_boms[order_line.product_id] = order_line.product_id.name else: