Browse Source

[IMP] contract: Fix test crash with other modules

13.0-mig-contract
Sergio Teruel 5 years ago
committed by Administrator
parent
commit
6849f76eb5
  1. 8
      contract/tests/test_contract.py

8
contract/tests/test_contract.py

@ -18,7 +18,13 @@ class TestContractBase(common.SavepointCase):
def setUpClass(cls): def setUpClass(cls):
super().setUpClass() super().setUpClass()
cls.today = fields.Date.today() cls.today = fields.Date.today()
cls.partner = cls.env.ref('base.res_partner_2')
cls.pricelist = cls.env['product.pricelist'].create({
'name': 'pricelist for contract test',
})
cls.partner = cls.env['res.partner'].create({
'name': 'partner test contract',
'property_product_pricelist': cls.pricelist.id,
})
cls.product_1 = cls.env.ref('product.product_product_1') cls.product_1 = cls.env.ref('product.product_product_1')
cls.product_2 = cls.env.ref('product.product_product_2') cls.product_2 = cls.env.ref('product.product_product_2')
cls.product_1.taxes_id += cls.env['account.tax'].search( cls.product_1.taxes_id += cls.env['account.tax'].search(

Loading…
Cancel
Save