Merge pull request #4190 from expsa/dev_odex25_donation

Dev odex25 donation
This commit is contained in:
MohamedGad100 2025-08-13 12:18:50 +03:00 committed by GitHub
commit 1db07c9f19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 726 additions and 477 deletions

View File

@ -8,77 +8,29 @@
</t>
<div class="header">
<table class="header-table table-condensed table-sm">
<tr class="text-center">
<table class="header-table table-condensed table-sm" style="width: 100%;">
<tr class="text-right">
<td class="header-cell">
<img t-att-src="'/sale_order_report/static/src/img/header.png'"
class="header-image" />
<img t-att-src="'/sale_order_report/static/src/img/report-header.png'"
class="header-image" style="max-width: 100%;" />
</td>
</tr>
</table>
<table
style="border:0pt white;width:100%;height: 50px;color:black; margin-top:10pt;"
class="table-condensed table-sm">
<tr style="padding:1pt;margin:0pt;font-weight: bold;text-align:center;">
<tr style="padding:1pt;margin:0pt;font-weight: bold;text-align:right;">
<td class="col-1 text-right arabic"
style="font-size: 15px !important; color: #2ecc71;font-weight:bold;"
width="100%">
<img t-att-src="'/sale_order_report/static/src/img/header2.png'"
<img t-att-src="'/sale_order_report/static/src/img/report-header-2.png'"
style="object-fit:fill;"
width="100%" />
</td>
</tr>
</table>
<!-- <table style="border:1pt solid white;width:100%;font-size:12px;"
width="100%">-->
<!-- <tr>-->
<!-- <td>-->
<!-- <img t-att-src="'/sale_order_report/static/src/img/header.png'"/>-->
<!-- </td>-->
<!-- </tr>-->
<!-- </table>-->
<!-- <div align="center">-->
<!-- <h5><span style="color: #569c6c;font-size: 2rem;" class="col-1 text-center
arabic">سند تبرع إلكترونى</span></h5>-->
<!-- </div>-->
<!-- <table style="border:0pt white;width:100%;height: 50px;color:black;
margin-top:10pt;" class="table-condensed table-sm">-->
<!-- <tr style="padding:1pt;margin:0pt;font-weight:
bold;text-align:center;background-color:#DCDCDC;">-->
<!-- <td class="col-1 text-right arabic" style="font-size: 2rem !important; color:
#569c6c;font-weight:bold;">بعطائك..أدركت حاجتهم </td>-->
<!-- </tr>-->
<!-- </table>-->
<div align="right">
<h5>
<span style="font-size: 2rem;text-align:right;color:#2bab98"
class="col-1 text-center arabic">مرحباً
</span>
<span dir="rtl" style="font-size: 2rem;text-align:right"
class="col-1 text-center arabic" t-esc="doc.order_name" />
</h5>
</div>
<div align="right">
<h6>
<span style="font-size: 1rem;text-align:right"
class="col-1 text-center arabic">نشكر لكم تبرعكم
الكريم,بلغكم الله مرافقه النبي صلى الله عليه وسلم فى الجنه
</span>
</h6>
</div>
<div align="right">
<h6>
<span style="font-size: 1rem;text-align:right"
class="col-1 text-center arabic">ونتشرف بتكرار
زيارتكم, واستمرار دعمكم
</span>
</h6>
</div>
<!-- The content below was moved to the report body -->
</div>
<div class="article o_report_layout_standard">
@ -87,7 +39,7 @@
<div class="footer">
<div align="center" style="border:0pt white;width:100%;height:50px;color:black; margin-top:0pt;margin-bottom:10pt;padding-bottom:17pt">
<img t-att-src="'/sale_order_report/static/src/img/footer.png'" style="object-fit:fill;width:90%;height:500%;" width="90%" height="500%" align="center"/>
<img t-att-src="'/sale_order_report/static/src/img/report-footer.png'" style="object-fit:fill;width:90%;height:500%;" width="90%" height="500%" align="center"/>
</div>
</div>
</template>
@ -193,435 +145,83 @@
<template id="report_saleorder_document_custom">
<t t-call="sale_order_report.sale_order_report_header">
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />
<t t-set="address">
<div t-field="doc.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<p t-if="doc.partner_id.vat"><t
t-out="doc.company_id.account_fiscal_country_id.vat_label or 'Tax ID'" /> : <span
t-field="doc.partner_id.vat" />
</p>
</t>
<t
t-if="doc.partner_shipping_id == doc.partner_invoice_id
and doc.partner_invoice_id != doc.partner_id
or doc.partner_shipping_id != doc.partner_invoice_id">
<t t-set="information_block">
<strong>
<t t-if="doc.partner_shipping_id == doc.partner_invoice_id">
Invoicing and Shipping Address:
</t>
<t t-else="">
Invoicing Address:
</t>
</strong>
<div t-field="doc.partner_invoice_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}' />
<t t-if="doc.partner_shipping_id != doc.partner_invoice_id">
<strong>Shipping Address:</strong>
<div t-field="doc.partner_shipping_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}' />
</t>
</t>
</t>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="page">
<div class="oe_structure" />
<div class="oe_structure"/>
<div class="row mt-4 mb-4" id="informations">
<t t-if="lang == 'ar_001'">
<div t-if="doc.client_order_ref" class="col-auto col-3 mw-100 mb-2"
name="informations_reference">
<strong>مرجعك :</strong>
<p class="m-0" t-field="doc.client_order_ref" />
</div>
<div t-if="doc.date_order" class="col-auto col-3 mw-100 mb-2"
name="informations_date"
align="right">
<strong style="font-family:GretaArabicBold"
t-if="doc.state in ['draft', 'sent']">تاريخ الطلب :</strong>
<strong dir="rtl" class="arabic" style="font-family:GretaArabicBold"
t-else="">تاريخ التبرع :</strong>
<p class="m-0" t-field="doc.date_order"
t-options='{"widget": "date"}' />
</div>
<div t-if="doc.validity_date and doc.state in ['draft', 'sent']"
class="col-auto col-3 mw-100 mb-2"
name="expiration_date">
<strong style="font-family:GretaArabicBold">تاريخ الإنتهاء :</strong>
<p class="m-0" t-field="doc.validity_date" />
</div>
</t>
<t t-else="">
<div t-if="doc.client_order_ref" class="col-auto col-3 mw-100 mb-2"
name="informations_reference">
<strong>مرجعك :</strong>
<p class="m-0" t-field="doc.client_order_ref" />
</div>
<div t-if="doc.date_order" class="col-auto col-3 mw-100 mb-2"
name="informations_date"
align="right">
<strong style="font-family:GretaArabicBold"
t-if="doc.state in ['draft', 'sent']">تاريخ الطلب :</strong>
<strong dir="rtl" class="arabic" style="font-family:GretaArabicBold"
t-else="">تاريخ التبرع :</strong>
<p class="m-0" t-field="doc.date_order"
t-options='{"widget": "date"}' />
</div>
<div t-if="doc.validity_date and doc.state in ['draft', 'sent']"
class="col-auto col-3 mw-100 mb-2"
name="expiration_date">
<strong style="font-family:GretaArabicBold">تاريخ الإنتهاء :</strong>
<p class="m-0" t-field="doc.validity_date" />
</div>
</t>
<!-- New content from image -->
<div style="text-align: right; margin-bottom: 20px; padding-top: 300px;">
<div style="font-size: 1.5rem; color: #6B6B6A; font-weight: bold;">مرحباً <span style="color: #387F75;" t-esc="doc.partner_id.name or 'فاعل خير'"/></div>
<div style="font-size: 1.5rem; margin-top: 10px; color: #6B6B6A;">
بكل امتنان نشكر لك تبرعك الكريم، ونسأل الله أن يجعلك ممن يرافقون النبي ﷺ في الجنة.
</div>
<div style="font-size: 1.5rem; color: #6B6B6A;">
ونتشرف دائما باستقبال عطائك المستمر لدعم أبنائكم الأيتام.
</div>
</div>
<!-- Is there a discount on at least one line? -->
<t t-set="lines_to_report" t-value="doc._get_order_lines_to_report()" />
<t t-set="display_discount" t-value="any(l.discount for l in lines_to_report)" />
<t t-if="lang == 'ar_001'">
<table dir="rtl" class="table table-sm o_main_table mt-4">
<!-- In case we want to repeat the header, remove "display:
table-row-group" -->
<thead style="display: table-row-group;text-align:right;">
<tr style="text-align:right">
<div style="text-align: right; margin-bottom: 20px;">
<span style="font-size: 1.5rem; color: #8F9090;">[رقم الطلب: <t t-esc="doc.name"/>]</span>
<span style="font-size: 1.5rem; color: #8F9090;">(<t t-esc="doc.date_order" t-options='{"widget": "date", "format": "dd MMMM yyyy"}'/>)</span>
</div>
<th style="text-align:right " name="th_description"
class="text-start " align="right">
التبرع
</th>
<th style="text-align:right" name="th_quantity" class="text-end">
الكميه</th>
<th style="text-align:right" name="th_priceunit"
class="text-end">السعر</th>
<th style="text-align:right" name="th_discount"
t-if="display_discount" class="text-end"
groups="product.group_discount_per_so_line">
<span>خصم.%</span>
</th>
<th name="th_subtotal" class="text-start"
style="text-align:right">
<span
groups="account.group_show_line_subtotals_tax_included">المبلغ
الكلى</span>
<span
groups="account.group_show_line_subtotals_tax_excluded">
المبلغ</span>
</th>
</tr>
</thead>
<tbody class="sale_tbody">
<t t-set="current_subtotal" t-value="0" />
<t t-foreach="lines_to_report" t-as="line">
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded" />
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_total"
groups="account.group_show_line_subtotals_tax_included" />
<tr style="text-align:right"
t-att-class="'bg-200 fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type">
<td style="text-align:right" name="td_name">
<span t-field="line.name" />
</td>
<td style="text-align:right" name="td_quantity"
class="text-end">
<span t-field="line.product_uom_qty" />
<span t-field="line.product_uom" />
</td>
<td style="text-align:right" name="td_priceunit"
class="text-start">
<span t-field="line.price_unit" />
</td>
<td style="text-align:right" t-if="display_discount"
class="text-start"
groups="product.group_discount_per_so_line">
<span t-field="line.discount" />
</td>
<td style="text-align:right"
t-if="not line.is_downpayment" name="td_subtotal"
class="text-start o_price_total">
<span t-field="line.price_total"
groups="account.group_show_line_subtotals_tax_included" />
<span t-field="line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded" />
</td>
</t>
<t t-elif="line.display_type == 'line_section'">
<td name="td_section_line" colspan="99">
<span t-field="line.name" />
</td>
<t t-set="current_section" t-value="line" />
<t t-set="current_subtotal" t-value="0" />
</t>
<t t-elif="line.display_type == 'line_note'">
<td name="td_note_line" colspan="99">
<span t-field="line.name" />
</td>
</t>
<table class="table table-bordered" style="text-align: right;">
<thead>
<tr style="background-color: white;">
<th style="text-align: right; width: 50%; font-size: 1.5rem; padding: 8px; color: #6B6B6A; font-weight: bold;">نوع التبرع</th>
<th style="text-align: center; width: 25%; font-size: 1.5rem; padding: 8px; color: #6B6B6A; font-weight: bold;">الكمية</th>
<th style="text-align: center; width: 25%; font-size: 1.5rem; padding: 8px; color: #6B6B6A; font-weight: bold;">المبلغ</th>
</tr>
</thead>
<tbody>
<t t-set="lines_to_report" t-value="doc._get_order_lines_to_report()" />
<t t-foreach="lines_to_report" t-as="line">
<t t-if="not line.display_type">
<tr>
<td style="text-align: right; padding: 8px; font-size: 1.5rem; color: #387F75; font-weight: bold;"><span t-field="line.name"/></td>
<td style="text-align: center; padding: 8px; font-size: 1.5rem; color: #387F75; font-weight: bold;"><span t-field="line.product_uom_qty" t-options='{"widget": "integer"}'/></td>
<td style="text-align: center; padding: 8px; font-size: 1.5rem; color: #387F75; font-weight: bold;"><span t-field="line.price_subtotal"/></td>
</tr>
<t
t-if="current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section') and not line.is_downpayment">
<tr class="is-subtotal text-end">
<td name="td_section_subtotal" colspan="99">
<strong class="mr16">Subtotal</strong>
<span
t-out="current_subtotal"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'
/>
</td>
</tr>
</t>
</t>
</tbody>
</table>
<div class="clearfix" name="so_total_summary">
<div id="total" class="row" name="total">
<div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ml-auto">
<table class="table table-sm">
<tr class="border-black o_subtotal" style="">
<td name="td_amount_untaxed_label"><strong>Subtotal</strong></td>
<td name="td_amount_untaxed" class="text-right">
<span t-field="doc.amount_untaxed"/>
</td>
</tr>
<t t-foreach="doc.amount_by_group" t-as="amount_by_group">
<tr style="">
<t t-if="amount_by_group[5] == 1 and doc.amount_untaxed == amount_by_group[2]">
<td name="td_amount_by_group_label_3">
<span t-esc="amount_by_group[0]"/>
<span>&amp;nbsp;<span>on</span>&amp;nbsp;<t t-esc="amount_by_group[2]" t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/></span>
</td>
<td name="td_amount_by_group_3" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
<t t-else ="">
<td name="td_amount_by_group_label">
<span t-esc="amount_by_group[0]"/>
</td>
<td name="td_amount_by_group" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
</tr>
</t>
<tr class="border-black o_total">
<td name="td_amount_total_label"><strong>Total</strong></td>
<td name="td_amount_total" class="text-right">
<span t-field="doc.amount_total"/>
</td>
</tr>
</table>
</div>
</div>
</div>
</t>
<t t-else="">
<table class="table table-sm o_main_table mt-4">
<!-- In case we want to repeat the header, remove "display:
table-row-group" -->
<thead style="display: table-row-group;text-align:right;">
<tr style="text-align:right">
<th name="th_subtotal" class="text-start"
style="text-align:right">
<span
groups="account.group_show_line_subtotals_tax_included">المبلغ
الكلى</span>
<span
groups="account.group_show_line_subtotals_tax_excluded">
المبلغ</span>
</th>
<th style="text-align:right" name="th_discount"
t-if="display_discount" class="text-end"
groups="product.group_discount_per_so_line">
<span>خصم.%</span>
</th>
<th style="text-align:right" name="th_priceunit"
class="text-end">السعر</th>
<th style="text-align:right" name="th_quantity" class="text-end">
الكميه</th>
<th style="text-align:right " name="th_description"
class="text-end " align="right">
التبرع
</th>
</tr>
</thead>
<tbody class="sale_tbody">
<t t-set="current_subtotal" t-value="0" />
<t t-foreach="lines_to_report" t-as="line">
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded" />
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_total"
groups="account.group_show_line_subtotals_tax_included" />
<tr style="text-align:right"
t-att-class="'bg-200 fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type">
<td style="text-align:right"
t-if="not line.is_downpayment" name="td_subtotal"
class="text-start o_price_total">
<span t-field="line.price_total"
groups="account.group_show_line_subtotals_tax_included" />
<span t-field="line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded" />
</td>
<td style="text-align:right" t-if="display_discount"
class="text-start"
groups="product.group_discount_per_so_line">
<span t-field="line.discount" />
</td>
<td style="text-align:right" name="td_priceunit"
class="text-end">
<span t-field="line.price_unit" />
</td>
<td style="text-align:right" name="td_quantity"
class="text-end">
<span t-field="line.product_uom_qty" />
<span t-field="line.product_uom" />
</td>
<td style="text-align:right" name="td_name">
<span t-field="line.name" />
</td>
</t>
<t t-elif="line.display_type == 'line_section'">
<td name="td_section_line" colspan="99">
<span t-field="line.name" />
</td>
<t t-set="current_section" t-value="line" />
<t t-set="current_subtotal" t-value="0" />
</t>
<t t-elif="line.display_type == 'line_note'">
<td name="td_note_line" colspan="99">
<span t-field="line.name" />
</td>
</t>
</tr>
<t
t-if="current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section') and not line.is_downpayment">
<tr class="is-subtotal text-end">
<td name="td_section_subtotal" colspan="99">
<strong class="mr16">Subtotal</strong>
<span
t-out="current_subtotal"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'
/>
</td>
</tr>
</t>
<!-- Summary Row: المجموع -->
<tr>
<td style="text-align: right; padding: 8px; font-size: 1.5rem; color: #6B6B6A; font-weight: bold;"><strong>المجموع:</strong></td>
<td style="text-align: center; padding: 8px;font-size: 1.5rem; color: #387F75; font-weight: bold;">
<strong><span t-esc="sum(line.product_uom_qty for line in lines_to_report if not line.display_type)"/></strong>
</td>
<td style="text-align: center; padding: 8px; font-size: 1.5rem; color: #387F75; font-weight: bold;">
<strong><span t-field="doc.amount_untaxed"/></strong>
</td>
</tr>
<!-- Payment Method Row: وسيلة الدفع -->
<tr>
<td style="text-align: right; padding: 8px; font-size: 1.5rem; color: #6B6B6A; font-weight: bold;" colspan="2">
<strong>
<span style="margin-left: 10px;">وسيلة الدفع:</span>
</strong>
</td>
<td style="text-align: center; padding: 8px; font-size: 1.5rem; color: #387F75; font-weight: bold;">
<t t-if="doc.transaction_ids">
<span t-esc="doc.transaction_ids[0].acquirer_id.name"/>
</t>
</t>
</tbody>
</table>
<div class="clearfix" name="so_total_summary">
<div id="total" class="row" name="total">
<div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ml-auto">
<table class="table table-sm">
<tr class="border-black o_subtotal" style="">
<td name="td_amount_untaxed_label"><strong>Subtotal</strong></td>
<td name="td_amount_untaxed" class="text-right">
<span t-field="doc.amount_untaxed"/>
</td>
</tr>
<t t-foreach="doc.amount_by_group" t-as="amount_by_group">
<tr style="">
<t t-if="amount_by_group[5] == 1 and doc.amount_untaxed == amount_by_group[2]">
<td name="td_amount_by_group_label_3">
<span t-esc="amount_by_group[0]"/>
<span>&amp;nbsp;<span>on</span>&amp;nbsp;<t t-esc="amount_by_group[2]" t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/></span>
</td>
<td name="td_amount_by_group_3" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
<t t-else ="">
<td name="td_amount_by_group_label">
<span t-esc="amount_by_group[0]"/>
</td>
<td name="td_amount_by_group" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
</tr>
</t>
<tr class="border-black o_total">
<td name="td_amount_total_label"><strong>Total</strong></td>
<td name="td_amount_total" class="text-right">
<span t-field="doc.amount_total"/>
</td>
</tr>
</table>
</div>
</div>
</div>
</t>
<div t-if="doc.signature" class="mt-4 ml64 mr4" name="signature">
<div class="offset-8">
<strong>التوقيع</strong>
</div>
<div class="offset-8">
<img t-att-src="image_data_uri(doc.signature)"
style="max-height: 4cm; max-width: 8cm;" />
</div>
<div class="offset-8 text-center">
<p t-field="doc.signed_by" />
</div>
</div>
<div>
<p
t-if="doc.fiscal_position_id and not is_html_empty(doc.fiscal_position_id.sudo().note)"
id="fiscal_position_remark">
<strong>Fiscal Position Remark:</strong>
<span t-field="doc.fiscal_position_id.sudo().note" />
</p>
</div>
<t t-else="">
<span>غير محدد</span>
</t>
</td>
</tr>
<!-- Adding total row from the blank template -->
<tr>
<td style="text-align: right; padding: 8px; font-size: 1.5rem; color: #6B6B6A; font-weight: bold;" colspan="2">
<strong>
<span style="margin-left: 10px;">الإجمالي:</span>
</strong>
</td>
<td style="text-align: center; padding: 8px; font-size: 1.5rem; color: #387F75; font-weight: bold;">
<span t-field="doc.amount_total"/>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</template>

View File

@ -0,0 +1,649 @@
<odoo>
<template id="sale_order_report_header">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id" />
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company" />
</t>
<div class="header">
<table class="header-table table-condensed table-sm">
<tr class="text-center">
<td class="header-cell">
<img t-att-src="'/sale_order_report/static/src/img/header.png'"
class="header-image" />
</td>
</tr>
</table>
<table
style="border:0pt white;width:100%;height: 50px;color:black; margin-top:10pt;"
class="table-condensed table-sm">
<tr style="padding:1pt;margin:0pt;font-weight: bold;text-align:center;">
<td class="col-1 text-right arabic"
style="font-size: 15px !important; color: #2ecc71;font-weight:bold;"
width="100%">
<img t-att-src="'/sale_order_report/static/src/img/header2.png'"
style="object-fit:fill;"
width="100%" />
</td>
</tr>
</table>
<!-- <table style="border:1pt solid white;width:100%;font-size:12px;"
width="100%">-->
<!-- <tr>-->
<!-- <td>-->
<!-- <img t-att-src="'/sale_order_report/static/src/img/header.png'"/>-->
<!-- </td>-->
<!-- </tr>-->
<!-- </table>-->
<!-- <div align="center">-->
<!-- <h5><span style="color: #569c6c;font-size: 2rem;" class="col-1 text-center
arabic">سند تبرع إلكترونى</span></h5>-->
<!-- </div>-->
<!-- <table style="border:0pt white;width:100%;height: 50px;color:black;
margin-top:10pt;" class="table-condensed table-sm">-->
<!-- <tr style="padding:1pt;margin:0pt;font-weight:
bold;text-align:center;background-color:#DCDCDC;">-->
<!-- <td class="col-1 text-right arabic" style="font-size: 2rem !important; color:
#569c6c;font-weight:bold;">بعطائك..أدركت حاجتهم </td>-->
<!-- </tr>-->
<!-- </table>-->
<div align="right">
<h5>
<span style="font-size: 2rem;text-align:right;color:#2bab98"
class="col-1 text-center arabic">مرحباً
</span>
<span dir="rtl" style="font-size: 2rem;text-align:right"
class="col-1 text-center arabic" t-esc="doc.order_name" />
</h5>
</div>
<div align="right">
<h6>
<span style="font-size: 1rem;text-align:right"
class="col-1 text-center arabic">نشكر لكم تبرعكم
الكريم,بلغكم الله مرافقه النبي صلى الله عليه وسلم فى الجنه
</span>
</h6>
</div>
<div align="right">
<h6>
<span style="font-size: 1rem;text-align:right"
class="col-1 text-center arabic">ونتشرف بتكرار
زيارتكم, واستمرار دعمكم
</span>
</h6>
</div>
</div>
<div class="article o_report_layout_standard">
<t t-raw="0" />
</div>
<div class="footer">
<div align="center" style="border:0pt white;width:100%;height:50px;color:black; margin-top:0pt;margin-bottom:10pt;padding-bottom:17pt">
<img t-att-src="'/sale_order_report/static/src/img/report-footer.png'" style="object-fit:fill;width:90%;height:500%;" width="90%" height="500%" align="center"/>
</div>
</div>
</template>
<template id="document_tax_totals_custom">
<!--
Generic template to display tax totals in pdf reports.
Used by invoices, SO and PO.
ARGUMENTS:
- tax_totals: dict in the form generated by account.move's _get_tax_totals.
-->
<t t-foreach="tax_totals['subtotals']" t-as="subtotal">
<t t-if="lang == 'ar_001'">
<tr dir="rtl" class="border-black o_subtotal">
<td>
<strong t-esc="subtotal['name']" />
</td>
<td class="text-end">
<span t-att-class="oe_subtotal_footer_separator"
t-esc="subtotal['formatted_amount']" />
</td>
</tr>
<t dir="rtl" t-set="subtotal_to_show" t-value="subtotal['name']" />
<t dir="rtl" t-call="account.tax_groups_totals" />
</t>
<t t-else="">
<tr class="border-black o_subtotal">
<td>
<strong t-esc="subtotal['name']" />
</td>
<td class="text-end">
<span t-att-class="oe_subtotal_footer_separator"
t-esc="subtotal['formatted_amount']" />
</td>
</tr>
<t t-set="subtotal_to_show" t-value="subtotal['name']" />
<t t-call="account.tax_groups_totals" />
</t>
</t>
<t t-set="has_rounding" t-value="'formatted_amount_total_rounded' in tax_totals" />
<!--Total
amount with all taxes-->
<t t-if="lang == 'ar_001'">
<tr dir="rtl" align="left" class="border-black o_total">
<t t-if="has_rounding">
<td style="text-align:left">المجموع الكلي</td>
</t>
<t t-else="">
<td style="text-align:left">
<strong>المبلغ الكلي</strong>
</td>
</t>
<td class="text-end" style="text-align:left">
<span t-esc="tax_totals['formatted_amount_total']" style="text-align:left" />
</td>
</tr>
<tr dir="rtl" t-if="has_rounding">
<td>
<strong>Total Rounded</strong>
</td>
<td class="text-end">
<span t-esc="tax_totals['formatted_amount_total_rounded']" />
</td>
</tr>
</t>
<t t-else="">
<tr align="right" class="border-black o_total">
<td class="text-end" style="text-align:left">
<span t-esc="tax_totals['formatted_amount_total']" style="text-align:right" />
</td>
<t t-if="has_rounding">
<td style="text-align:right">المبلغ الكلي</td>
</t>
<t t-else="">
<td style="text-align:right">
<strong>المبلغ الكلي</strong>
</td>
</t>
</tr>
<tr t-if="has_rounding">
<td>
<strong>Total Rounded</strong>
</td>
<td class="text-end">
<span t-esc="tax_totals['formatted_amount_total_rounded']" />
</td>
</tr>
</t>
</template>
<template id="report_saleorder_document_custom">
<t t-call="sale_order_report.sale_order_report_header">
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />
<t t-set="address">
<div t-field="doc.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<p t-if="doc.partner_id.vat"><t
t-out="doc.company_id.account_fiscal_country_id.vat_label or 'Tax ID'" /> : <span
t-field="doc.partner_id.vat" />
</p>
</t>
<t
t-if="doc.partner_shipping_id == doc.partner_invoice_id
and doc.partner_invoice_id != doc.partner_id
or doc.partner_shipping_id != doc.partner_invoice_id">
<t t-set="information_block">
<strong>
<t t-if="doc.partner_shipping_id == doc.partner_invoice_id">
Invoicing and Shipping Address:
</t>
<t t-else="">
Invoicing Address:
</t>
</strong>
<div t-field="doc.partner_invoice_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}' />
<t t-if="doc.partner_shipping_id != doc.partner_invoice_id">
<strong>Shipping Address:</strong>
<div t-field="doc.partner_shipping_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}' />
</t>
</t>
</t>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="page">
<div class="oe_structure" />
<div class="row mt-4 mb-4" id="informations">
<t t-if="lang == 'ar_001'">
<div t-if="doc.client_order_ref" class="col-auto col-3 mw-100 mb-2"
name="informations_reference">
<strong>مرجعك :</strong>
<p class="m-0" t-field="doc.client_order_ref" />
</div>
<div t-if="doc.date_order" class="col-auto col-3 mw-100 mb-2"
name="informations_date"
align="right">
<strong style="font-family:GretaArabicBold"
t-if="doc.state in ['draft', 'sent']">تاريخ الطلب :</strong>
<strong dir="rtl" class="arabic" style="font-family:GretaArabicBold"
t-else="">تاريخ التبرع :</strong>
<p class="m-0" t-field="doc.date_order"
t-options='{"widget": "date"}' />
</div>
<div t-if="doc.validity_date and doc.state in ['draft', 'sent']"
class="col-auto col-3 mw-100 mb-2"
name="expiration_date">
<strong style="font-family:GretaArabicBold">تاريخ الإنتهاء :</strong>
<p class="m-0" t-field="doc.validity_date" />
</div>
</t>
<t t-else="">
<div t-if="doc.client_order_ref" class="col-auto col-3 mw-100 mb-2"
name="informations_reference">
<strong>مرجعك :</strong>
<p class="m-0" t-field="doc.client_order_ref" />
</div>
<div t-if="doc.date_order" class="col-auto col-3 mw-100 mb-2"
name="informations_date"
align="right">
<strong style="font-family:GretaArabicBold"
t-if="doc.state in ['draft', 'sent']">تاريخ الطلب :</strong>
<strong dir="rtl" class="arabic" style="font-family:GretaArabicBold"
t-else="">تاريخ التبرع :</strong>
<p class="m-0" t-field="doc.date_order"
t-options='{"widget": "date"}' />
</div>
<div t-if="doc.validity_date and doc.state in ['draft', 'sent']"
class="col-auto col-3 mw-100 mb-2"
name="expiration_date">
<strong style="font-family:GretaArabicBold">تاريخ الإنتهاء :</strong>
<p class="m-0" t-field="doc.validity_date" />
</div>
</t>
</div>
<!-- Is there a discount on at least one line? -->
<t t-set="lines_to_report" t-value="doc._get_order_lines_to_report()" />
<t t-set="display_discount" t-value="any(l.discount for l in lines_to_report)" />
<t t-if="lang == 'ar_001'">
<table dir="rtl" class="table table-sm o_main_table mt-4">
<!-- In case we want to repeat the header, remove "display:
table-row-group" -->
<thead style="display: table-row-group;text-align:right;">
<tr style="text-align:right">
<th style="text-align:right " name="th_description"
class="text-start " align="right">
التبرع
</th>
<th style="text-align:right" name="th_quantity" class="text-end">
الكميه</th>
<th style="text-align:right" name="th_priceunit"
class="text-end">السعر</th>
<th style="text-align:right" name="th_discount"
t-if="display_discount" class="text-end"
groups="product.group_discount_per_so_line">
<span>خصم.%</span>
</th>
<th name="th_subtotal" class="text-start"
style="text-align:right">
<span
groups="account.group_show_line_subtotals_tax_included">المبلغ
الكلى</span>
<span
groups="account.group_show_line_subtotals_tax_excluded">
المبلغ</span>
</th>
</tr>
</thead>
<tbody class="sale_tbody">
<t t-set="current_subtotal" t-value="0" />
<t t-foreach="lines_to_report" t-as="line">
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded" />
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_total"
groups="account.group_show_line_subtotals_tax_included" />
<tr style="text-align:right"
t-att-class="'bg-200 fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type">
<td style="text-align:right" name="td_name">
<span t-field="line.name" />
</td>
<td style="text-align:right" name="td_quantity"
class="text-end">
<span t-field="line.product_uom_qty" />
<span t-field="line.product_uom" />
</td>
<td style="text-align:right" name="td_priceunit"
class="text-start">
<span t-field="line.price_unit" />
</td>
<td style="text-align:right" t-if="display_discount"
class="text-start"
groups="product.group_discount_per_so_line">
<span t-field="line.discount" />
</td>
<td style="text-align:right"
t-if="not line.is_downpayment" name="td_subtotal"
class="text-start o_price_total">
<span t-field="line.price_total"
groups="account.group_show_line_subtotals_tax_included" />
<span t-field="line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded" />
</td>
</t>
<t t-elif="line.display_type == 'line_section'">
<td name="td_section_line" colspan="99">
<span t-field="line.name" />
</td>
<t t-set="current_section" t-value="line" />
<t t-set="current_subtotal" t-value="0" />
</t>
<t t-elif="line.display_type == 'line_note'">
<td name="td_note_line" colspan="99">
<span t-field="line.name" />
</td>
</t>
</tr>
<t
t-if="current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section') and not line.is_downpayment">
<tr class="is-subtotal text-end">
<td name="td_section_subtotal" colspan="99">
<strong class="mr16">Subtotal</strong>
<span
t-out="current_subtotal"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'
/>
</td>
</tr>
</t>
</t>
</tbody>
</table>
<div class="clearfix" name="so_total_summary">
<div id="total" class="row" name="total">
<div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ml-auto">
<table class="table table-sm">
<tr class="border-black o_subtotal" style="">
<td name="td_amount_untaxed_label"><strong>Subtotal</strong></td>
<td name="td_amount_untaxed" class="text-right">
<span t-field="doc.amount_untaxed"/>
</td>
</tr>
<t t-foreach="doc.amount_by_group" t-as="amount_by_group">
<tr style="">
<t t-if="amount_by_group[5] == 1 and doc.amount_untaxed == amount_by_group[2]">
<td name="td_amount_by_group_label_3">
<span t-esc="amount_by_group[0]"/>
<span>&amp;nbsp;<span>on</span>&amp;nbsp;<t t-esc="amount_by_group[2]" t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/></span>
</td>
<td name="td_amount_by_group_3" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
<t t-else ="">
<td name="td_amount_by_group_label">
<span t-esc="amount_by_group[0]"/>
</td>
<td name="td_amount_by_group" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
</tr>
</t>
<tr class="border-black o_total">
<td name="td_amount_total_label"><strong>Total</strong></td>
<td name="td_amount_total" class="text-right">
<span t-field="doc.amount_total"/>
</td>
</tr>
</table>
</div>
</div>
</div>
</t>
<t t-else="">
<table class="table table-sm o_main_table mt-4">
<!-- In case we want to repeat the header, remove "display:
table-row-group" -->
<thead style="display: table-row-group;text-align:right;">
<tr style="text-align:right">
<th name="th_subtotal" class="text-start"
style="text-align:right">
<span
groups="account.group_show_line_subtotals_tax_included">المبلغ
الكلى</span>
<span
groups="account.group_show_line_subtotals_tax_excluded">
المبلغ</span>
</th>
<th style="text-align:right" name="th_discount"
t-if="display_discount" class="text-end"
groups="product.group_discount_per_so_line">
<span>خصم.%</span>
</th>
<th style="text-align:right" name="th_priceunit"
class="text-end">السعر</th>
<th style="text-align:right" name="th_quantity" class="text-end">
الكميه</th>
<th style="text-align:right " name="th_description"
class="text-end " align="right">
التبرع
</th>
</tr>
</thead>
<tbody class="sale_tbody">
<t t-set="current_subtotal" t-value="0" />
<t t-foreach="lines_to_report" t-as="line">
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded" />
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_total"
groups="account.group_show_line_subtotals_tax_included" />
<tr style="text-align:right"
t-att-class="'bg-200 fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type">
<td style="text-align:right"
t-if="not line.is_downpayment" name="td_subtotal"
class="text-start o_price_total">
<span t-field="line.price_total"
groups="account.group_show_line_subtotals_tax_included" />
<span t-field="line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded" />
</td>
<td style="text-align:right" t-if="display_discount"
class="text-start"
groups="product.group_discount_per_so_line">
<span t-field="line.discount" />
</td>
<td style="text-align:right" name="td_priceunit"
class="text-end">
<span t-field="line.price_unit" />
</td>
<td style="text-align:right" name="td_quantity"
class="text-end">
<span t-field="line.product_uom_qty" />
<span t-field="line.product_uom" />
</td>
<td style="text-align:right" name="td_name">
<span t-field="line.name" />
</td>
</t>
<t t-elif="line.display_type == 'line_section'">
<td name="td_section_line" colspan="99">
<span t-field="line.name" />
</td>
<t t-set="current_section" t-value="line" />
<t t-set="current_subtotal" t-value="0" />
</t>
<t t-elif="line.display_type == 'line_note'">
<td name="td_note_line" colspan="99">
<span t-field="line.name" />
</td>
</t>
</tr>
<t
t-if="current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section') and not line.is_downpayment">
<tr class="is-subtotal text-end">
<td name="td_section_subtotal" colspan="99">
<strong class="mr16">Subtotal</strong>
<span
t-out="current_subtotal"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'
/>
</td>
</tr>
</t>
</t>
</tbody>
</table>
<div class="clearfix" name="so_total_summary">
<div id="total" class="row" name="total">
<div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ml-auto">
<table class="table table-sm">
<tr class="border-black o_subtotal" style="">
<td name="td_amount_untaxed_label"><strong>Subtotal</strong></td>
<td name="td_amount_untaxed" class="text-right">
<span t-field="doc.amount_untaxed"/>
</td>
</tr>
<t t-foreach="doc.amount_by_group" t-as="amount_by_group">
<tr style="">
<t t-if="amount_by_group[5] == 1 and doc.amount_untaxed == amount_by_group[2]">
<td name="td_amount_by_group_label_3">
<span t-esc="amount_by_group[0]"/>
<span>&amp;nbsp;<span>on</span>&amp;nbsp;<t t-esc="amount_by_group[2]" t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/></span>
</td>
<td name="td_amount_by_group_3" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
<t t-else ="">
<td name="td_amount_by_group_label">
<span t-esc="amount_by_group[0]"/>
</td>
<td name="td_amount_by_group" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
</tr>
</t>
<tr class="border-black o_total">
<td name="td_amount_total_label"><strong>Total</strong></td>
<td name="td_amount_total" class="text-right">
<span t-field="doc.amount_total"/>
</td>
</tr>
</table>
</div>
</div>
</div>
</t>
<div t-if="doc.signature" class="mt-4 ml64 mr4" name="signature">
<div class="offset-8">
<strong>التوقيع</strong>
</div>
<div class="offset-8">
<img t-att-src="image_data_uri(doc.signature)"
style="max-height: 4cm; max-width: 8cm;" />
</div>
<div class="offset-8 text-center">
<p t-field="doc.signed_by" />
</div>
</div>
<div>
<p
t-if="doc.fiscal_position_id and not is_html_empty(doc.fiscal_position_id.sudo().note)"
id="fiscal_position_remark">
<strong>Fiscal Position Remark:</strong>
<span t-field="doc.fiscal_position_id.sudo().note" />
</p>
</div>
</div>
</t>
</template>
<template id="report_saleorder_custom" inherit_id="sale.report_saleorder">
<xpath expr="//t[@t-call='web.html_container']" position="replace">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="sale_order_report.report_saleorder_document_custom"
t-lang="doc.partner_id.lang" />
</t>
</t>
</xpath>
</template>
<template id="assets_backend" name="Backend Assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/css" href="/sale_order_report/static/src/css/style.css"/>
</xpath>
</template>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB