|
|
@ -1,7 +1,7 @@ |
|
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
<!--Apply the watermark to the pdf report with mentioned specifications--> |
|
|
|
<odoo> |
|
|
|
<template id="pdf_watermark_report" inherit_id="web.external_layout_standard"> |
|
|
|
<template id="pdf_watermark_report_external" inherit_id="web.external_layout_standard"> |
|
|
|
<xpath expr="//div[hasclass('row')][last()]" position="after"> |
|
|
|
<t t-if="company.watermark"> |
|
|
|
<div class="row" |
|
|
@ -27,4 +27,108 @@ |
|
|
|
</t> |
|
|
|
</xpath> |
|
|
|
</template> |
|
|
|
</odoo> |
|
|
|
<template id="pdf_watermark_report_boxed" inherit_id="web.external_layout_boxed"> |
|
|
|
<xpath expr="//div[hasclass('row')][last()]" position="after"> |
|
|
|
<t t-if="company.watermark"> |
|
|
|
<div class="row" |
|
|
|
style="height:200px; width:300px;margin-left:30%;margin-top:50%;"> |
|
|
|
<div class="col-6" name="watermark"> |
|
|
|
<span t-attf-style="-webkit-transform:rotate(-{{company.rotating_angle}}deg);color:{{company.color_picker}};font-size:{{company.font_size}}px;text-align:center;position:absolute;text-align:center;opacity:0.25;"> |
|
|
|
<t t-if="company.watermark_type == 'text'"> |
|
|
|
<t t-esc="company.content_text"/> |
|
|
|
</t> |
|
|
|
<t t-if="company.watermark_type == 'image'"> |
|
|
|
<img t-if="company.background_image" |
|
|
|
t-att-src="image_data_uri(company.background_image)" |
|
|
|
style="position:absolute;height:200px; width:300px; opacity: 1;"/> |
|
|
|
</t> |
|
|
|
<t t-if="company.watermark_type == 'logo'"> |
|
|
|
<img t-if="company.logo" |
|
|
|
t-att-src="image_data_uri(company.logo)" |
|
|
|
style="position:absolute;height:200px; width:300px; opacity: 1;"/> |
|
|
|
</t> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
</xpath> |
|
|
|
</template> |
|
|
|
<template id="pdf_watermark_report_bold" inherit_id="web.external_layout_bold"> |
|
|
|
<xpath expr="//div[hasclass('row')][last()]" position="after"> |
|
|
|
<t t-if="company.watermark"> |
|
|
|
<div class="row" |
|
|
|
style="height:200px; width:300px;margin-left:30%;margin-top:50%;"> |
|
|
|
<div class="col-6" name="watermark"> |
|
|
|
<span t-attf-style="-webkit-transform:rotate(-{{company.rotating_angle}}deg);color:{{company.color_picker}};font-size:{{company.font_size}}px;text-align:center;position:absolute;text-align:center;opacity:0.25;"> |
|
|
|
<t t-if="company.watermark_type == 'text'"> |
|
|
|
<t t-esc="company.content_text"/> |
|
|
|
</t> |
|
|
|
<t t-if="company.watermark_type == 'image'"> |
|
|
|
<img t-if="company.background_image" |
|
|
|
t-att-src="image_data_uri(company.background_image)" |
|
|
|
style="position:absolute;height:200px; width:300px; opacity: 1;"/> |
|
|
|
</t> |
|
|
|
<t t-if="company.watermark_type == 'logo'"> |
|
|
|
<img t-if="company.logo" |
|
|
|
t-att-src="image_data_uri(company.logo)" |
|
|
|
style="position:absolute;height:200px; width:300px; opacity: 1;"/> |
|
|
|
</t> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
</xpath> |
|
|
|
</template> |
|
|
|
<template id="pdf_watermark_report_striped" inherit_id="web.external_layout_striped"> |
|
|
|
<xpath expr="//div[hasclass('o_background_header')][last()]" position="after"> |
|
|
|
<t t-if="company.watermark"> |
|
|
|
<div class="row" |
|
|
|
style="height:200px; width:300px;margin-left:30%;margin-top:50%;"> |
|
|
|
<div class="col-6" name="watermark"> |
|
|
|
<span t-attf-style="-webkit-transform:rotate(-{{company.rotating_angle}}deg);color:{{company.color_picker}};font-size:{{company.font_size}}px;text-align:center;position:absolute;text-align:center;opacity:0.25;"> |
|
|
|
<t t-if="company.watermark_type == 'text'"> |
|
|
|
<t t-esc="company.content_text"/> |
|
|
|
</t> |
|
|
|
<t t-if="company.watermark_type == 'image'"> |
|
|
|
<img t-if="company.background_image" |
|
|
|
t-att-src="image_data_uri(company.background_image)" |
|
|
|
style="position:absolute;height:200px; width:300px; opacity: 1;"/> |
|
|
|
</t> |
|
|
|
<t t-if="company.watermark_type == 'logo'"> |
|
|
|
<img t-if="company.logo" |
|
|
|
t-att-src="image_data_uri(company.logo)" |
|
|
|
style="position:absolute;height:200px; width:300px; opacity: 1;"/> |
|
|
|
</t> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
</xpath> |
|
|
|
</template> |
|
|
|
<template id="pdf_watermark_report_internal" inherit_id="web.internal_layout"> |
|
|
|
<xpath expr="//div[hasclass('row')][last()]" position="after"> |
|
|
|
<t t-if="company.watermark"> |
|
|
|
<div class="row" |
|
|
|
style="height:200px; width:300px;margin-left:30%;margin-top:50%;"> |
|
|
|
<div class="col-6" name="watermark"> |
|
|
|
<span t-attf-style="-webkit-transform:rotate(-{{company.rotating_angle}}deg);color:{{company.color_picker}};font-size:{{company.font_size}}px;text-align:center;position:absolute;text-align:center;opacity:0.25;"> |
|
|
|
<t t-if="company.watermark_type == 'text'"> |
|
|
|
<t t-esc="company.content_text"/> |
|
|
|
</t> |
|
|
|
<t t-if="company.watermark_type == 'image'"> |
|
|
|
<img t-if="company.background_image" |
|
|
|
t-att-src="image_data_uri(company.background_image)" |
|
|
|
style="position:absolute;height:200px; width:300px; opacity: 1;"/> |
|
|
|
</t> |
|
|
|
<t t-if="company.watermark_type == 'logo'"> |
|
|
|
<img t-if="company.logo" |
|
|
|
t-att-src="image_data_uri(company.logo)" |
|
|
|
style="position:absolute;height:200px; width:300px; opacity: 1;"/> |
|
|
|
</t> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
</xpath> |
|
|
|
</template> |
|
|
|
</odoo> |