[MIG] product_contract: Migration to 16.0

This commit is contained in:
Rad0van
2023-06-08 18:22:40 +02:00
committed by Abraham Anes
parent fe8ed89bc6
commit 1b930d402e
10 changed files with 94 additions and 69 deletions

View File

@@ -3,10 +3,10 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from odoo.tests.common import SavepointCase
from odoo.tests.common import TransactionCase
class TestProductTemplate(SavepointCase):
class TestProductTemplate(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()

View File

@@ -6,10 +6,10 @@ from dateutil.relativedelta import relativedelta
from odoo.exceptions import UserError, ValidationError
from odoo.fields import Date
from odoo.tests.common import SavepointCase
from odoo.tests.common import TransactionCase
class TestSaleOrder(SavepointCase):
class TestSaleOrder(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
@@ -342,7 +342,7 @@ class TestSaleOrder(SavepointCase):
self.order_line1.contract_id = self.contract
self.sale.action_confirm()
self.contract.is_terminated = True
self.sale.action_cancel()
self.sale._action_cancel()
with self.assertRaises(ValidationError):
self.sale.action_draft()
self.contract.is_terminated = False