mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] product_contract: code improvements
This commit is contained in:
@@ -3,15 +3,23 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.tests.common import TransactionCase
|
||||
from odoo.tests.common import SavepointCase
|
||||
|
||||
|
||||
class TestProductTemplate(TransactionCase):
|
||||
def setUp(self):
|
||||
super(TestProductTemplate, self).setUp()
|
||||
self.service_product = self.env.ref("product.product_product_1")
|
||||
self.consu_product = self.env.ref("product.product_product_5")
|
||||
self.contract = self.env["contract.template"].create({"name": "Test"})
|
||||
class TestProductTemplate(SavepointCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(
|
||||
context=dict(
|
||||
cls.env.context,
|
||||
tracking_disable=True,
|
||||
no_reset_password=True,
|
||||
)
|
||||
)
|
||||
cls.service_product = cls.env.ref("product.product_product_1")
|
||||
cls.consu_product = cls.env.ref("product.product_product_5")
|
||||
cls.contract = cls.env["contract.template"].create({"name": "Test"})
|
||||
|
||||
def test_change_is_contract(self):
|
||||
"""It should verify that the property_contract_template_id
|
||||
|
||||
Reference in New Issue
Block a user