From 70beefc48f634a102844592f3f1ceb91944cff95 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Mon, 18 Sep 2023 11:43:52 +0200 Subject: [PATCH] [FIX] product_abc_classification: Fix tests --- product_abc_classification/tests/common.py | 7 ++++++- .../tests/test_abc_classification_profile.py | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/product_abc_classification/tests/common.py b/product_abc_classification/tests/common.py index 4900770fdce2..d4c24f0cdf40 100644 --- a/product_abc_classification/tests/common.py +++ b/product_abc_classification/tests/common.py @@ -1,6 +1,7 @@ # Copyright 2021 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo.fields import Command from odoo.tests.common import TransactionCase @@ -118,6 +119,10 @@ def _create_variant(cls, size_value): return cls.env["product.product"].create( { "product_tmpl_id": cls.product_template.id, - "product_template_attribute_value_ids": [(6, 0, size_value.ids)], + "product_template_attribute_value_ids": [ + Command.set( + size_value.pav_attribute_line_ids.product_template_value_ids.ids + ) + ], } ) diff --git a/product_abc_classification/tests/test_abc_classification_profile.py b/product_abc_classification/tests/test_abc_classification_profile.py index 51691913cf2b..68044ba97bfe 100644 --- a/product_abc_classification/tests/test_abc_classification_profile.py +++ b/product_abc_classification/tests/test_abc_classification_profile.py @@ -4,6 +4,7 @@ from psycopg2 import IntegrityError from odoo.exceptions import ValidationError +from odoo.tools.misc import mute_logger from .common import ABCClassificationCase @@ -185,6 +186,7 @@ def test_04(self): } ) + @mute_logger("odoo.sql_db") def test_05(self): """ Data: @@ -282,6 +284,7 @@ def test_06(self): ) self.assertTrue(new_profile) + @mute_logger("odoo.sql_db") def test_07(self): """ Data: