From 042d19040b0d6c4bc8d3ed026359dc43f29618c8 Mon Sep 17 00:00:00 2001 From: Benoit Date: Thu, 8 Feb 2024 22:18:47 +0100 Subject: [PATCH] [FIX] product_route_profile: prevent triggering inverse method Set route_ids as readonly to avoid triggering inverse method and changing the route_profile_id when adding force_route_profile_id --- product_route_profile/tests/test_product_route_profile.py | 1 + product_route_profile/views/product_template.xml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/product_route_profile/tests/test_product_route_profile.py b/product_route_profile/tests/test_product_route_profile.py index a45ee6c2f5d0..cb7545bb3cc3 100644 --- a/product_route_profile/tests/test_product_route_profile.py +++ b/product_route_profile/tests/test_product_route_profile.py @@ -55,6 +55,7 @@ def test_2_force_route_profile(self): self.product.with_company( self.env.company ).force_route_profile_id = self.route_profile_2.id + self.assertEqual(self.product.route_profile_id, self.route_profile_1) self.assertEqual( self.product.with_company(self.env.company).route_ids, self.route_profile_2.route_ids, diff --git a/product_route_profile/views/product_template.xml b/product_route_profile/views/product_template.xml index 33c49e431c0c..41c5d7edc601 100644 --- a/product_route_profile/views/product_template.xml +++ b/product_route_profile/views/product_template.xml @@ -11,6 +11,12 @@ {'invisible': True} + + 1 + + + 1 +