File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 77import time
88import base64
99from lxml import etree
10+ import logging
11+
12+ _logger = logging .getLogger (__name__ )
1013
1114
1215class AccountTestInvoicingCommon (TransactionCase ):
@@ -35,7 +38,17 @@ def setUpClass(cls, chart_template_ref=None):
3538 chart_template = cls .env .ref (chart_template_ref )
3639 else :
3740 chart_template = cls .env .ref ('l10n_generic_coa.configurable_chart_template' , raise_if_not_found = False )
41+ if not chart_template :
42+ chart_template = cls .env ['account.chart.template' ].search ([], limit = 1 )
43+ if chart_template :
44+ _logger .info (
45+ "Generic CoA not found - Using %s" % chart_template .name
46+ )
3847 if not chart_template :
48+ _logger .warning (
49+ "Accounting Tests skipped - %s" %
50+ (chart_template_ref and ('CoA "%s" not found' % chart_template_ref ) or 'No template found.' ,)
51+ )
3952 cls .tearDownClass ()
4053 # skipTest raises exception
4154 cls .skipTest (cls , "Accounting Tests skipped because the user's company has no chart of accounts." )
You can’t perform that action at this time.
0 commit comments