lims_report_html: improves html results report

This commit is contained in:
Adrián Bernardi 2020-05-15 11:33:01 -03:00
parent 54e4581802
commit 5fc82f1962
4 changed files with 1269 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
html {
font-family: sans-serif;
font-family: 'Liberation Sans';
}
body {
font-size: 10px;
margin: 0;
}
h1 {
font-size: 15px;
margin-top: 0.3em;
margin-bottom: 0.3em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
h2 {
font-size: 12px;
margin-top: 0;
margin-bottom: 0.3em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
p {
margin-top: 0;
margin-bottom: 0.3em;
margin-left: 0;
margin-right: 0;
}
table {
border: None;
}
.text-left{text-align:left}
.text-right{text-align:right}
.text-center{text-align:center}

View File

@ -104,7 +104,8 @@ class ResultReport(metaclass=PoolMeta):
content = cls.render_results_report_template(action, template,
record=record, records=[record], data=data)
if action.extension == 'pdf':
documents.append(PdfGenerator(content).render_html())
documents.append(PdfGenerator(content, side_margin=1,
extra_vertical_margin=30).render_html())
else:
documents.append(content)
if action.extension == 'pdf':

View File

@ -86,8 +86,8 @@ for name in os.listdir('.'):
subpackage = package
for data_pattern in (info.get('xml', []) + ['tryton.cfg', 'view/*.xml',
'locale/*.po', 'locale/override/*.po', 'report/*.fodt',
'report/*.fods', 'report/*.html', 'icons/*.svg',
'tests/*.rst']):
'report/*.fods', 'report/*.html', 'report/stylesheet/*.css',
'icons/*.svg', 'tests/*.rst']):
data.append(data_pattern)
if data:
package_data[subpackage] = data