From db719b30d6b90d488033dca515aaeec6fa1962be Mon Sep 17 00:00:00 2001 From: Martin Quinteros Date: Fri, 30 May 2025 11:34:33 -0300 Subject: [PATCH] [FIX] product_catalog_tree_sale_renting: Only evaluate is_rental_order if parent model is sale.order --- .../models/product_catalog_mixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_catalog_tree_sale_renting/models/product_catalog_mixin.py b/product_catalog_tree_sale_renting/models/product_catalog_mixin.py index 86962bf7..ae5711c1 100644 --- a/product_catalog_tree_sale_renting/models/product_catalog_mixin.py +++ b/product_catalog_tree_sale_renting/models/product_catalog_mixin.py @@ -7,7 +7,7 @@ class ProductCatalogMixin(models.AbstractModel): def action_add_from_catalog(self): action = super().action_add_from_catalog() - if self.is_rental_order: + if self._name == "sale.order" and self.is_rental_order: tree_view_id = self.env.ref('product_catalog_tree.product_view_tree_catalog').id action['views'] = [view for view in action['views'] if view != (tree_view_id, 'tree')] return action