Skip to content

Commit

Permalink
[MIG] purchase_variant_configurator: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbottemanne committed Jan 9, 2024
1 parent 88e6845 commit 420051b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions purchase_variant_configurator/tests/test_purchase_order.py
Original file line number Diff line number Diff line change
@@ -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()
Expand Down Expand Up @@ -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": [
(
Expand Down Expand Up @@ -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": [
(
Expand Down Expand Up @@ -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
)
Expand Down

0 comments on commit 420051b

Please sign in to comment.