mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract: remove l10n_generic_coa dependencie
This commit is contained in:
committed by
Carlos Roca
parent
8848227914
commit
c1589b04f6
@@ -8,14 +8,57 @@ class ContractMulticompanyCase(TestContractBase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
chart_template = cls.env.ref("l10n_generic_coa.configurable_chart_template")
|
||||
cls.company_obj = cls.env["res.company"]
|
||||
cls.company_1 = cls.env.ref("base.main_company")
|
||||
vals = {"name": "Company 2"}
|
||||
cls.company_2 = cls.company_obj.create(vals)
|
||||
chart_template.try_loading(company=cls.company_2)
|
||||
cls.env.user.company_ids |= cls.company_2
|
||||
|
||||
cls.env["account.journal"].create(
|
||||
{
|
||||
"name": "Journal purchase test 1",
|
||||
"code": "JP1",
|
||||
"type": "purchase",
|
||||
"company_id": cls.company_2.id,
|
||||
}
|
||||
)
|
||||
account_payable_type = cls.env["account.account.type"].create(
|
||||
{
|
||||
"name": "Payable account type",
|
||||
"type": "payable",
|
||||
"internal_group": "liability",
|
||||
}
|
||||
)
|
||||
account_expense_type = cls.env["account.account.type"].create(
|
||||
{
|
||||
"name": "Expense account type",
|
||||
"type": "other",
|
||||
"internal_group": "expense",
|
||||
}
|
||||
)
|
||||
payable_account = cls.env["account.account"].create(
|
||||
{
|
||||
"name": "Payable Account",
|
||||
"code": "PAY",
|
||||
"user_type_id": account_payable_type.id,
|
||||
"reconcile": True,
|
||||
"company_id": cls.company_2.id,
|
||||
}
|
||||
)
|
||||
expense_account = cls.env["account.account"].create(
|
||||
{
|
||||
"name": "Expense Account",
|
||||
"code": "EXP",
|
||||
"user_type_id": account_expense_type.id,
|
||||
"reconcile": False,
|
||||
"company_id": cls.company_2.id,
|
||||
}
|
||||
)
|
||||
cls.partner.with_company(
|
||||
cls.company_2
|
||||
).property_account_payable_id = payable_account.id
|
||||
cls.product_1.with_company(
|
||||
cls.company_2
|
||||
).property_account_expense_id = expense_account.id
|
||||
cls.contract_mc = (
|
||||
cls.env["contract.contract"]
|
||||
.with_company(cls.company_2)
|
||||
|
||||
Reference in New Issue
Block a user