Hello,
I am trying to add custom CSS to a PDF Report that I have created. I just wanted to know the proper way of doing this. I have been able to successfully apply my CSS to the PDF report but when testing the installation of the module on a new build I get many errors during testing.
How I included my CSS in the Manifest:
'assets' : {
'web.report_assets_common' : [
'my_module/static/src/css/style.css' ,
],
}
Errors I get:
FAIL: TestReportsRendering.test_layout
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/tests/test_reports.py", line 367, in test_layout
self.assertEqual(
AssertionError: Lists differ: [['LT[82 chars]Page:', '/ 1', '1'], ['LTFigure', 'Some header[76 chars]'1']] != [['LT[82 chars]Page: 1 / 1'], ['LTFigure', 'Some header Text'[64 chars] 1']]
FAIL: TestReportsRendering.test_pdf_render_page_overflow
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/tests/test_reports.py", line 458, in test_pdf_render_page_overflow
self.assertEqual(len(pages), 6,
AssertionError: 4 != 6 : 6 pages are expected, 3 per record (you may ensure `nb_lines` has a correct value to generate an oveflow)
FAIL: TestReportsRendering.test_report_pdf_page_break
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/tests/test_reports.py", line 442, in test_report_pdf_page_break
self.assertEqual(pages_contents, expected_pages_contents)
AssertionError: Lists differ: [['LT[82 chars]Page:', '/ 2', '1'], ['LTFigure', 'Some header[306 chars]'2']] != [['LT[82 chars]Page: 1 / 2'], ['LTFigure', 'Some header Text'[282 chars] 2']]
FAIL: TestReportsRendering.test_thead_tbody_repeat
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/tests/test_reports.py", line 521, in test_thead_tbody_repeat
self.assertEqual(len(pages), 6, '6 pages are expected, 3 per record (you may ensure `nb_lines` has a correct value to generate an oveflow)')
AssertionError: 4 != 6 : 6 pages are expected, 3 per record (you may ensure `nb_lines` has a correct value to generate an oveflow)
These errors are only present when I have my CSS loaded in my manifest. Any guidance would be much appreciated.
Thanks,
Simon