summaryrefslogtreecommitdiff
path: root/addons/product/tests
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-02-13 16:26:06 +0000
committerSébastien Theys <seb@odoo.com>2019-02-15 08:52:26 +0000
commitcc985a2bc4821f41afb1a5a70d809f86768218b2 (patch)
treeddf84d5965faee9ff92c3a7a7b3a5374da878c1e /addons/product/tests
parentb87a07c501bdfe331a9598ec833f2332531aa992 (diff)
[FIX] product: fix product configurator speed using prefetch/compute
Take advantage of prefetch and api.multi, instead of calling plenty of methods that didn't cache their result and did separate queries for each record. opw-1923999 task-1922055 PR: #30274
Diffstat (limited to 'addons/product/tests')
-rw-r--r--addons/product/tests/test_product_attribute_value_config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/product/tests/test_product_attribute_value_config.py b/addons/product/tests/test_product_attribute_value_config.py
index 3dbdfba3b04..26ca920f3e6 100644
--- a/addons/product/tests/test_product_attribute_value_config.py
+++ b/addons/product/tests/test_product_attribute_value_config.py
@@ -204,8 +204,8 @@ class TestProductAttributeValueConfig(TestProductAttributeValueSetup):
self.assertEqual(len(variant), 0)
# also test _has_valid_attributes (case ok):
- valid_value_ids = self.computer._get_valid_product_attribute_values()._without_no_variant_attributes()
- valid_attribute_ids = self.computer._get_valid_product_attributes()._without_no_variant_attributes()
+ valid_value_ids = self.computer.valid_product_attribute_value_wnva_ids
+ valid_attribute_ids = self.computer.valid_product_attribute_wnva_ids
self.assertTrue(ok_variant._has_valid_attributes(valid_attribute_ids, valid_value_ids))
# also test _has_valid_attributes (case not ok):