From 5008ef3ba4f2ac923debe0ea1cc948ac7275d2f9 Mon Sep 17 00:00:00 2001 From: Sergio Teruel Date: Thu, 14 Nov 2019 13:43:58 +0100 Subject: [PATCH] [IMP] contract: Fix test crash with other modules --- contract/__manifest__.py | 2 +- contract/tests/test_contract.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/contract/__manifest__.py b/contract/__manifest__.py index 8e8f662b6..274ab7326 100644 --- a/contract/__manifest__.py +++ b/contract/__manifest__.py @@ -9,7 +9,7 @@ { 'name': 'Recurring - Contracts Management', - 'version': '12.0.4.2.4', + 'version': '12.0.4.2.5', 'category': 'Contract Management', 'license': 'AGPL-3', 'author': "OpenERP SA, " diff --git a/contract/tests/test_contract.py b/contract/tests/test_contract.py index f86675370..74adae517 100644 --- a/contract/tests/test_contract.py +++ b/contract/tests/test_contract.py @@ -18,7 +18,13 @@ class TestContractBase(common.SavepointCase): def setUpClass(cls): super().setUpClass() 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_2 = cls.env.ref('product.product_product_2') cls.product_1.taxes_id += cls.env['account.tax'].search(