From 58eb9e71b04f687811a0686380ab817884b21038 Mon Sep 17 00:00:00 2001 From: Lindsay Date: Fri, 28 Jan 2022 14:47:25 +0100 Subject: [PATCH] [FIX] Trigger the auto compute if flag changes but not the computed_value --- .../models/abc_classification_profile.py | 1 - .../tests/test_abc_classification_profile.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/product_abc_classification_sale_stock/models/abc_classification_profile.py b/product_abc_classification_sale_stock/models/abc_classification_profile.py index b635836e302..c38641fc6e4 100644 --- a/product_abc_classification_sale_stock/models/abc_classification_profile.py +++ b/product_abc_classification_sale_stock/models/abc_classification_profile.py @@ -229,7 +229,6 @@ def _sale_stock_data_to_vals(self, sale_stock_data, create=False): { "product_id": sale_stock_data.product.id, "profile_id": sale_stock_data.profile.id, - "auto_apply_computed_value": sale_stock_data.profile.auto_apply_computed_value } ) return res diff --git a/product_abc_classification_sale_stock/tests/test_abc_classification_profile.py b/product_abc_classification_sale_stock/tests/test_abc_classification_profile.py index 1789ac41085..6976a034599 100644 --- a/product_abc_classification_sale_stock/tests/test_abc_classification_profile.py +++ b/product_abc_classification_sale_stock/tests/test_abc_classification_profile.py @@ -275,3 +275,4 @@ def test_02(self): self.assertEqual(len(levels.sale_stock_level_history_ids), 1) self.stock_profile._compute_abc_classification() self.assertEqual(len(levels.sale_stock_level_history_ids), 2) +