[FIX] base: generic test for reports for l10n too
A lot of localization are inheriting reports and changing them. This should be tested in a generic test like /base.test_reports to avoid possible tracebacks. closes odoo/odoo#82312 Related: odoo/enterprise#23299 Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import odoo.tests
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@odoo.tests.tagged('post_install', '-at_install')
|
||||
@odoo.tests.tagged('post_install', '-at_install', 'post_install_l10n')
|
||||
class TestReports(odoo.tests.TransactionCase):
|
||||
def test_reports(self):
|
||||
domain = [('report_type', 'like', 'qweb')]
|
||||
@@ -24,10 +24,12 @@ class TestReports(odoo.tests.TransactionCase):
|
||||
report_records = report_model.search([], limit=10)
|
||||
if not report_records:
|
||||
_logger.info("no record found skipping report %s", report.report_name)
|
||||
if not report.multi:
|
||||
report_records = report_records[:1]
|
||||
|
||||
# Test report generation
|
||||
report._render_qweb_html(report_records.ids)
|
||||
if not report.multi:
|
||||
for record in report_records:
|
||||
report._render_qweb_html(record.ids)
|
||||
else:
|
||||
report._render_qweb_html(report_records.ids)
|
||||
else:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user