add canelled watermark

This commit is contained in:
MohamedGad100 2025-12-30 16:11:09 +02:00
parent 31ad5cca09
commit e94c80d431
1 changed files with 45 additions and 13 deletions

View File

@ -3,28 +3,60 @@
<template id="report_sponsorship_receipt_document">
<!-- Standard report container to provide <main> for PDF engine -->
<t t-call="web.html_container">
<style>
.watermark-canceled {
position: absolute !important;
top: 50% !important;
left: 50% !important;
margin-left: -250px !important;
margin-top: -80px !important;
width: 500px !important;
height: 160px !important;
color: #FAD3D4 !important;
font-size: 140px !important;
line-height: 160px !important;
text-align: center !important;
opacity: 0.4 !important;
-webkit-transform: rotate(35deg) !important;
-moz-transform: rotate(35deg) !important;
transform: rotate(35deg) !important;
z-index: 0 !important;
pointer-events: none !important;
font-weight: bold !important;
white-space: nowrap !important;
}
</style>
<!-- Iterate over all sponsorship records passed by ir.actions.report -->
<t t-foreach="docs" t-as="doc">
<!-- Reuse sale order header layout -->
<t t-call="sale_order_report.sale_order_report_header">
<div class="page" style="position: relative;">
<div class="page" style="position: relative; min-height: 800px; overflow: visible;">
<!-- Watermark for canceled sponsorships -->
<t t-if="doc.state == 'canceled'">
<div style="position: absolute;
inset: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
color: red;
font-size: 5rem;
opacity: 0.1;
transform: rotate(35deg);
transform-origin: center;
z-index: 0;
top: 300px;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: calc(100% - 250px);
display: table;
z-index: 999;
pointer-events: none;">
Canceled
<div style="display: table-cell; vertical-align: middle; text-align: center;">
<span style="color: #FAD3D4;
font-size: 280px;
opacity: 0.5;
-webkit-transform: rotate(-35deg);
-moz-transform: rotate(-35deg);
transform: rotate(-35deg);
font-weight: bold;
white-space: nowrap;
display: inline-block;">
ملغي
</span>
</div>
</div>
</t>