From 420051b9d74a6a822e2a0c2398209bb5c53fb672 Mon Sep 17 00:00:00 2001 From: Alexandra Bottemanne Date: Mon, 8 Jan 2024 19:46:57 +0100 Subject: [PATCH] [MIG] purchase_variant_configurator: Migration to 16.0 --- .../tests/test_purchase_order.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/purchase_variant_configurator/tests/test_purchase_order.py b/purchase_variant_configurator/tests/test_purchase_order.py index ebc01ef78..ab6744c34 100644 --- a/purchase_variant_configurator/tests/test_purchase_order.py +++ b/purchase_variant_configurator/tests/test_purchase_order.py @@ -1,10 +1,10 @@ # Copyright 2016 ACSONE SA/NV # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html -from odoo.tests.common import SavepointCase +from odoo.tests.common import TransactionCase -class TestPurchaseOrder(SavepointCase): +class TestPurchaseOrder(TransactionCase): @classmethod def setUpClass(cls): super(TestPurchaseOrder, cls).setUpClass() @@ -114,6 +114,7 @@ def test_onchange_product_tmpl_id(self): def test_onchange_product_attribute_ids(self): product = self.product_product.create( { + "name": "Test product 01", "product_tmpl_id": self.product_template_yes.id, "product_attribute_ids": [ ( @@ -198,6 +199,7 @@ def test_can_create_product_variant(self): def test_onchange_product_id(self): product = self.product_product.create( { + "name": "Test product 02", "product_tmpl_id": self.product_template_yes.id, "product_attribute_ids": [ ( @@ -289,8 +291,8 @@ def test_button_confirm(self): order.write({"order_line": [(4, line_1.id), (4, line_2.id)]}) order.button_confirm() - order.flush() - order.invalidate_cache() + order.flush_recordset() + order.invalidate_recordset() order_line_without_product = order.order_line.filtered( lambda x: not x.product_id )