Skip to content

Commit ecb0e2d

Browse files
committed
Merge PR #2038 into 16.0
Signed-off-by HaraldPanten
2 parents 6d23ee2 + c9c0883 commit ecb0e2d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

account_netting/tests/test_account_netting.py

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ class TestAccountNetting(common.TransactionCase):
1616
def setUpClass(cls):
1717
super().setUpClass()
1818
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
19+
if not cls.env.company.chart_template_id:
20+
# Load a CoA if there's none in current company
21+
coa = cls.env.ref("l10n_generic_coa.configurable_chart_template", False)
22+
if not coa:
23+
# Load the first available CoA
24+
coa = cls.env["account.chart.template"].search(
25+
[("visible", "=", True)], limit=1
26+
)
27+
coa.try_loading(company=cls.env.company, install_demo=False)
1928
res_users_account_manager = cls.env.ref("account.group_account_manager")
2029
partner_manager = cls.env.ref("base.group_partner_manager")
2130
cls.env.user.write(

0 commit comments

Comments
 (0)