From 9989894f7a8760e4d78135605e5839c2e31dd67e Mon Sep 17 00:00:00 2001 From: Henrik Norlin Date: Mon, 25 Sep 2023 14:48:02 +0200 Subject: [PATCH] [FIX] product_pack: Allow to ignore pack_component_price for non_detailed pack. --- product_pack/models/product_template.py | 6 +++++- product_pack/views/product_template_views.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/product_pack/models/product_template.py b/product_pack/models/product_template.py index f1afebc8..d9af04cb 100644 --- a/product_pack/models/product_template.py +++ b/product_pack/models/product_template.py @@ -124,7 +124,11 @@ def _is_pack_to_be_handled(self): ) is_pack |= self.pack_ok and ( (self.pack_type == "detailed" and self.pack_component_price == "totalized") - or self.pack_type == "non_detailed" + or ( + self.pack_type == "non_detailed" + and + self.pack_component_price != "ignored" + ) ) return is_pack diff --git a/product_pack/views/product_template_views.xml b/product_pack/views/product_template_views.xml index ab54fb69..b0a908a1 100644 --- a/product_pack/views/product_template_views.xml +++ b/product_pack/views/product_template_views.xml @@ -29,7 +29,7 @@ />