mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[14.0][IMP] add layout for clean template
This commit is contained in:
14
report_layout_config/templates/assets.xml
Normal file
14
report_layout_config/templates/assets.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_assets_common" inherit_id="web.report_assets_common">
|
||||
<xpath expr="." position="inside">
|
||||
<link
|
||||
href="/report_layout_config/static/src/scss/style.scss"
|
||||
rel="stylesheet"
|
||||
type="text/scss"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template
|
||||
id="external_layout_images_template"
|
||||
id="external_standard_layout_images_template"
|
||||
primary="True"
|
||||
inherit_id="web.external_layout_standard"
|
||||
>
|
||||
@@ -12,13 +12,12 @@
|
||||
<img
|
||||
t-if="company.full_header_img"
|
||||
t-att-src="image_data_uri(company.full_header_img)"
|
||||
style="max-height: 60px;"
|
||||
class="header-full-image"
|
||||
alt="Logo"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="col-9 text-right"
|
||||
style="margin-top:22px;"
|
||||
class="col-9 text-right header-image"
|
||||
t-field="company.report_header"
|
||||
name="report_header"
|
||||
/>
|
||||
@@ -31,59 +30,123 @@
|
||||
<img
|
||||
t-if="company.full_footer_img"
|
||||
t-att-src="image_data_uri(company.full_footer_img)"
|
||||
style="max-width:500px;"
|
||||
class="footer-image"
|
||||
alt="Footer logo"
|
||||
/>
|
||||
<div t-if="report_type == 'pdf'" class="text-muted">
|
||||
Page: <span class="page" /> / <span class="topage" />
|
||||
</div>
|
||||
Page: <span class="page" /> / <span class="topage" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="styles_company_report" inherit_id="web.styles_company_report">
|
||||
<xpath expr="//t[contains(@t-if, 'layout')]" position="after">
|
||||
<t
|
||||
t-elif="layout == 'report_layout_config.external_layout_images_template'"
|
||||
>
|
||||
&.o_report_layout_standard {
|
||||
h2 {
|
||||
color: <t t-esc='primary' />;
|
||||
}
|
||||
#informations strong {
|
||||
color: <t t-esc='secondary' />;
|
||||
}
|
||||
#total strong{
|
||||
color: <t t-esc='primary' />;
|
||||
}
|
||||
table {
|
||||
thead {
|
||||
color: <t t-esc='secondary' />;
|
||||
}
|
||||
}
|
||||
}
|
||||
</t>
|
||||
|
||||
<template
|
||||
id="external_clean_layout_images_template"
|
||||
primary="True"
|
||||
inherit_id="web.external_layout_clean"
|
||||
>
|
||||
<xpath expr="//div[contains(@t-attf-class, 'header')]" position="replace">
|
||||
<div class="header">
|
||||
<div class="row">
|
||||
<img
|
||||
t-if="company.full_header_img"
|
||||
t-att-src="image_data_uri(company.full_header_img)"
|
||||
class="header-full-image"
|
||||
alt="Logo"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="col-9 text-right header-image"
|
||||
t-field="company.report_header"
|
||||
name="report_header"
|
||||
/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[contains(@t-attf-class, 'footer')]" position="replace">
|
||||
<div class="footer o_standard_footer">
|
||||
<div class="text-center">
|
||||
<img
|
||||
t-if="company.full_footer_img"
|
||||
t-att-src="image_data_uri(company.full_footer_img)"
|
||||
class="footer-image"
|
||||
alt="Footer logo"
|
||||
/>
|
||||
<div t-if="report_type == 'pdf'" class="text-muted">
|
||||
Page: <span class="page" /> / <span class="topage" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="header_image">
|
||||
<div>
|
||||
<img
|
||||
t-if="company and company.full_header_img"
|
||||
t-att-src="image_data_uri(company.full_header_img)"
|
||||
style="max-height: 60px;"
|
||||
alt="Logo"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template id="footer_image">
|
||||
<div>
|
||||
<img
|
||||
t-if="company and company.full_footer_img"
|
||||
t-att-src="image_data_uri(company.full_footer_img)"
|
||||
style="max-width:420px;"
|
||||
alt="Footer logo"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<template id="styles_company_report" inherit_id="web.styles_company_report">
|
||||
<xpath expr="//t[contains(@t-elif, 'layout')]" position="after">
|
||||
<!-- next part is the same as in web/views/report_templates web.external_layout_standard -->
|
||||
<t
|
||||
t-elif="layout == 'report_layout_config.external_standard_layout_images_template'"
|
||||
>
|
||||
&.o_report_layout_standard {
|
||||
h2 {
|
||||
color: <t t-esc='primary' />;
|
||||
}
|
||||
#informations strong {
|
||||
color: <t t-esc='secondary' />;
|
||||
}
|
||||
#total strong{
|
||||
color: <t t-esc='primary' />;
|
||||
}
|
||||
table {
|
||||
thead {
|
||||
color: <t t-esc='secondary' />;
|
||||
}
|
||||
}
|
||||
}
|
||||
</t>
|
||||
<!-- next part is the same as in web/views/report_templates web.external_layout_clean -->
|
||||
<t
|
||||
t-elif="layout == 'report_layout_config.external_clean_layout_images_template'"
|
||||
>
|
||||
&.o_clean_footer {
|
||||
border-top: 3px solid <t t-esc='secondary' />;
|
||||
h4 {
|
||||
color: <t t-esc='secondary' />;
|
||||
}
|
||||
.pagenumber {
|
||||
border: 3px solid <t t-esc='primary' />;
|
||||
background-color: <t t-esc='secondary' />;
|
||||
}
|
||||
}
|
||||
&.o_report_layout_clean {
|
||||
h1, h2, h3 {
|
||||
color: <t t-esc='primary' />;
|
||||
}
|
||||
strong {
|
||||
color: <t t-esc='secondary' />;
|
||||
}
|
||||
table {
|
||||
thead {
|
||||
color: <t t-esc='secondary' />;
|
||||
tr th {
|
||||
border-top: 3px solid <t
|
||||
t-esc='secondary'
|
||||
/> !important;
|
||||
}
|
||||
}
|
||||
tbody {
|
||||
tr:last-child td {
|
||||
border-bottom: 3px solid <t t-esc='secondary' />;
|
||||
}
|
||||
}
|
||||
}
|
||||
#total {
|
||||
strong {
|
||||
color: <t t-esc='secondary' />;
|
||||
}
|
||||
}
|
||||
}
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user