mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract_sale_generation: Change SavepointCase to TransactionCase
This commit is contained in:
committed by
Jesús Feliciano Valdez Cruz [Vauxoo]
parent
0730d45f09
commit
7761bc1cf3
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Contracts Management - Recurring Sales",
|
"name": "Contracts Management - Recurring Sales",
|
||||||
"version": "15.0.1.0.2",
|
"version": "15.0.1.0.3",
|
||||||
"category": "Contract Management",
|
"category": "Contract Management",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "ACSONE SA/NV, PESOL, Odoo Community Association (OCA)",
|
"author": "ACSONE SA/NV, PESOL, Odoo Community Association (OCA)",
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
from odoo.tests.common import SavepointCase
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
from .common import ContractSaleCommon, to_date
|
from .common import ContractSaleCommon, to_date
|
||||||
|
|
||||||
|
|
||||||
class TestContractSale(ContractSaleCommon, SavepointCase):
|
class TestContractSale(ContractSaleCommon, TransactionCase):
|
||||||
def test_check_discount(self):
|
def test_check_discount(self):
|
||||||
with self.assertRaises(ValidationError):
|
with self.assertRaises(ValidationError):
|
||||||
self.contract_line.write({"discount": 120})
|
self.contract_line.write({"discount": 120})
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ from freezegun.api import freeze_time
|
|||||||
|
|
||||||
from odoo import fields
|
from odoo import fields
|
||||||
from odoo.tests import Form
|
from odoo.tests import Form
|
||||||
from odoo.tests.common import SavepointCase
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
from .common import ContractSaleCommon
|
from .common import ContractSaleCommon
|
||||||
|
|
||||||
today = "2020-01-15"
|
today = "2020-01-15"
|
||||||
|
|
||||||
|
|
||||||
class TestContractSale(ContractSaleCommon, SavepointCase):
|
class TestContractSale(ContractSaleCommon, TransactionCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
|
|||||||
Reference in New Issue
Block a user