Merge pull request #6299 from expsa/samir_aladawi_mother_orphan_report
[UPD] odex_takaful: mother/orphan report
This commit is contained in:
commit
ea1f8214c2
|
|
@ -1,20 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="server_action_print_and_send_orphan_reports" model="ir.actions.server">
|
||||
<field name="name">Print/Send Orphan Report</field>
|
||||
<record id="server_action_print_mother_and_orphan_reports" model="ir.actions.server">
|
||||
<field name="name">Print Mother/Orphan Report</field>
|
||||
<field name="model_id" ref="odex_benefit.model_family_member"/>
|
||||
<field name="binding_model_id" ref="odex_benefit.model_family_member"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.server_action_print_and_send_orphan_reports()</field>
|
||||
<field name="code">action = records.server_action_print_mother_and_orphan_reports()</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="server_action_print_and_send_orphan_mother_reports" model="ir.actions.server">
|
||||
<field name="name">Print/Send Orphan Mother Report</field>
|
||||
<field name="model_id" ref="odex_benefit.model_family_member"/>
|
||||
<field name="binding_model_id" ref="odex_benefit.model_family_member"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.server_action_print_and_send_orphan_mother_reports()</field>
|
||||
</record> -->
|
||||
|
||||
</odoo>
|
||||
|
|
@ -1187,6 +1187,7 @@ msgstr "هل يمكن جعل الكافل نشطًا مرة أخرى؟"
|
|||
#: model_terms:ir.ui.view,arch_db:odex_takaful.add_benefit_wizard_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.add_details_wizard_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.donation_extension_history_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.donation_extension_wizard_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.kafalat_cancel_wizard_report_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.kafalat_payment_wizard_report_form
|
||||
|
|
@ -1199,6 +1200,7 @@ msgstr "هل يمكن جعل الكافل نشطًا مرة أخرى؟"
|
|||
#: model_terms:ir.ui.view,arch_db:odex_takaful.transfer_deduction_wizard_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.view_account_payment_register_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.view_esterdad_wizard_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.view_global_extension_wizard_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.view_otp_wizard_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.view_payment_details_wizard_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.view_replacement_wiz_form
|
||||
|
|
@ -7550,12 +7552,6 @@ msgstr "اسم طريقة السداد"
|
|||
msgid "Number of Months"
|
||||
msgstr "أشهر التمديد"
|
||||
|
||||
#. module: odex_takaful
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.view_global_extension_wizard_form
|
||||
msgid "Cancel"
|
||||
msgstr "إلغاء"
|
||||
|
||||
|
||||
#. module: odex_takaful
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.view_global_extension_wizard_form
|
||||
msgid "Confirm"
|
||||
|
|
@ -7580,3 +7576,7 @@ msgstr "تمديد الكفالة"
|
|||
msgid "Global Extension"
|
||||
msgstr "التمديد الشامل"
|
||||
|
||||
#. module: odex_takaful
|
||||
#: model:ir.actions.server,name:odex_takaful.server_action_print_mother_and_orphan_reports
|
||||
msgid "Print Mother/Orphan Report"
|
||||
msgstr "طباعة تقرير أم اليتيم/اليتيم"
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ class FamilyMember(models.Model):
|
|||
allowed_sponsorship = fields.Boolean(related='benefit_id.benefit_category_id.allowed_sponsorship')
|
||||
|
||||
|
||||
def server_action_print_and_send_orphan_reports(self):
|
||||
return self.env.ref('odex_takaful.action_report_orphan').report_action(self)
|
||||
def server_action_print_mother_and_orphan_reports(self):
|
||||
return self.env.ref('odex_takaful.action_report_mother_and_orphan').report_action(self)
|
||||
|
||||
def name_get(self):
|
||||
result = []
|
||||
|
|
|
|||
|
|
@ -12,10 +12,11 @@
|
|||
<field name="margin_left">0</field>
|
||||
<field name="margin_right">0</field>
|
||||
<field name="header_spacing">0</field>
|
||||
<field name="dpi">100</field>
|
||||
</record>
|
||||
|
||||
<!-- Orphan Report Template -->
|
||||
<template id="report_orphan_document">
|
||||
<template id="report_mother_and_orphan_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-set="base_url" t-value="'http://%s' % request.httprequest.host"/>
|
||||
<style>
|
||||
|
|
@ -46,15 +47,13 @@
|
|||
padding: 0 !important;
|
||||
}
|
||||
.orphan-page {
|
||||
page-break-after: always !important;
|
||||
page-break-inside: avoid !important;
|
||||
direction: rtl !important;
|
||||
font-family: 'Cairo', Arial, sans-serif !important;
|
||||
width: 100% !important;
|
||||
height: 210mm !important;
|
||||
}
|
||||
.orphan-page:last-child {
|
||||
page-break-after: auto !important;
|
||||
height: 273mm;
|
||||
background: -webkit-linear-gradient(top, #ACCFCB 0%, #E0EAE9 50%, #C4B179 100%) !important;
|
||||
background: linear-gradient(to bottom, #ACCFCB 0%, #E0EAE9 50%, #C4B179 100%) !important;
|
||||
position: relative;
|
||||
}
|
||||
.orphan-page table {
|
||||
direction: rtl !important;
|
||||
|
|
@ -93,36 +92,29 @@
|
|||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<div class="orphan-page" dir="rtl" lang="ar">
|
||||
<!-- Get donation line from donations_details_lines_mechanism_ids relationship -->
|
||||
<!-- <t t-set="donation_line" t-value="doc.donations_details_lines_mechanism_ids[0] if doc.donations_details_lines_mechanism_ids else False"/>
|
||||
<t t-set="benefit_member" t-value="donation_line.benefit_id if donation_line and donation_line.benefit_id else False"/>
|
||||
<t t-set="family" t-value="benefit_member.benefit_id if benefit_member and benefit_member.benefit_id else False"/> -->
|
||||
<!-- Main Container -->
|
||||
<table style="background: -webkit-linear-gradient(top, #ACCFCB 0%, #E0EAE9 50%, #C4B179 100%); background: linear-gradient(to bottom, #ACCFCB 0%, #E0EAE9 50%, #C4B179 100%); width: 100%; height: 210mm; margin: 0; padding: 20px 0px 20px; border-collapse: collapse; direction: rtl;" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 100%;">
|
||||
<td style="vertical-align: top; height: 100%;">
|
||||
<!-- Header Section -->
|
||||
<div class="page orphan-page" dir="rtl" lang="ar" t-att-style="'page-break-after: always;' if not doc_last else ''">
|
||||
|
||||
<table style="width: 100%; margin: 0; padding: 20px 0px 20px; border-collapse: collapse; direction: rtl;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="vertical-align: top;">
|
||||
<table style="width: 100%; margin-bottom: 30px; padding: 0px 40px; border-collapse: collapse; direction: rtl;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="width: auto; text-align: right; vertical-align: middle; padding: 40px 0px 0px; white-space: nowrap;">
|
||||
<h1 style="font-size: 20px; font-weight: bold; color: white; background-color: #22B6B3; padding: 10px 20px 10px 30px; margin: 0px; font-family: 'Cairo', Arial, sans-serif; white-space: nowrap; border-radius: 30px 0px 0px 30px;">تقرير اليتيم</h1>
|
||||
<h1 style="font-size: 20px; font-weight: bold; color: white; padding: 10px 20px 10px 30px; margin: 0px; font-family: 'Cairo', Arial, sans-serif; white-space: nowrap; border-radius: 30px 0px 0px 30px; background-color: #22B6B3;">تقرير <t t-if="doc.relationn.relation_type == 'mother'" t-esc="'أم'"/> اليتيم</h1>
|
||||
</td>
|
||||
<td style="width: 80%;"></td>
|
||||
<td style="width: 75%;"></td>
|
||||
<td style="width: auto; text-align: left; vertical-align: middle; padding-top: 20px; padding-left: 10px;">
|
||||
<img t-attf-src="http://{{request.httprequest.host}}/odex_takaful/static/src/img/ensan-logo.png" alt="Logo" style="width: 100px; height: auto; max-height: 100px; display: block;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Body Section -->
|
||||
<table style="width: 100%; height: 100%; padding: 0px 40px; border-collapse: collapse; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<table style="width: 100%; padding: 0px 40px; border-collapse: collapse; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Data Items Container -->
|
||||
<table style="width: 100%; border-collapse: collapse; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<!-- Row 1: اسم الكافل + رقم الجوال -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; border-radius: 30px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; overflow: hidden; direction: rtl;" cellpadding="0" cellspacing="0">
|
||||
|
|
@ -132,7 +124,6 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table style="width: 100%; height: 40px; border-radius: 30px; box-shadow: 0 0 0 1px #136456; background-color: white; border-collapse: separate; border-spacing: 0; overflow: hidden; direction: rtl;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -143,31 +134,38 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 2: Description -->
|
||||
<tr>
|
||||
<td colspan="3" style="padding: 15px 0px;">
|
||||
<table style="width: 100%; border-collapse: collapse; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<p style="font-size: 14px; color: #136456; text-align: start; font-weight: bold; margin: 5px 0px 0px; padding: 0px 40px; font-family: 'Cairo', Arial, sans-serif;">حين يصبح الأثر إنسانًا له اسم وقصة وابتسامة.. <br/> نعلم أن الكفالة ليست نهاية، بل بداية لعطاء مستدام، وأثر يصنع الفرق.</p>
|
||||
<span style="font-size: 14px; color: #136456; text-align: start; font-weight: normal; margin: 10px 0px; padding: 0px 40px; font-family: 'Cairo', Arial, sans-serif;">ما بين الصفوف الدراسية، والهوايات الصغيرة والأمنيات البسيطة، نرفق لكم تقرير مفصل عن اليتيم المكفول:</span>
|
||||
<span t-if="doc.relationn.relation_type != 'mother'" style="font-size: 14px; color: #136456; text-align: start; font-weight: normal; margin: 10px 0px; padding: 0px 40px; font-family: 'Cairo', Arial, sans-serif;">ما بين الصفوف الدراسية، والهوايات الصغيرة والأمنيات البسيطة، نرفق لكم تقرير مفصل عن اليتيم المكفول:</span>
|
||||
<t t-else="1">
|
||||
<p class="mb-5"></p>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 3: اسم الأرملة + العمر -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table style="width: 100%; height: 40px; border-radius: 30px; box-shadow: 0 0 0 1px #136456; background-color: white; border-collapse: separate; border-spacing: 0; overflow: hidden; direction: rtl;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="label-cell" style="width: 48%; height: 40px; background-color: #CCA761 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">اسم اليتيم</td>
|
||||
<td class="label-cell" style="width: 48%; height: 40px; background-color: #CCA761 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">
|
||||
<t t-if="doc.relationn.relation_type == 'mother'">
|
||||
اسم الأرملة
|
||||
</t>
|
||||
<t t-else="1">
|
||||
اسم اليتيمـ/ـة
|
||||
</t>
|
||||
</td>
|
||||
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="doc.name"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -178,7 +176,6 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 4: رقم الملف + تم الالتحاق في إنسان عام -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
|
|
@ -188,7 +185,6 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -199,7 +195,6 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 5: عدد أفراد الأسرة + الجنسية -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
|
|
@ -209,18 +204,16 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="label-cell-dark" style="width: 48%; height: 40px; background-color: #136456 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">الجنسية</td>
|
||||
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="doc.benefit_id.father_country_id.name"/></td>
|
||||
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="doc.benefit_id.mother_country_id.name if doc.relationn.relation_type == 'mother' else doc.benefit_id.father_country_id.name"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 6: المرحلة الدراسية + التقدير -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
|
|
@ -230,7 +223,6 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -241,17 +233,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 7: الحالة الصحية + نوع السكن -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="label-cell-dark" style="width: 48%; height: 40px; background-color: #136456 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">الحالة الصحية</td>
|
||||
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="'،'.join(doc.diseases_attachment_ids.mapped('diseases_id.name'))"/></td>
|
||||
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="'،'.join(doc.diseases_attachment_ids.mapped('diseases_id.name')) if len(doc.diseases_attachment_ids) else 'سليم'"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -262,7 +252,6 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 8: عنوان الأسرة + مبلغ الإيجار -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
|
|
@ -282,7 +271,6 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -293,17 +281,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 9: حالة الأسرة + تاريخ نهاية الكفالة -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="label-cell-dark" style="width: 48%; height: 40px; background-color: #136456 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">حالة الأسرة</td>
|
||||
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="doc.benefit_id.benefit_category_id.name if doc.benefit_id.benefit_category_id else '-'"/></td>
|
||||
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="'فقيرة ومحتاجة'"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -314,7 +300,6 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 10: Section Title - مصادر دخل الأسرة -->
|
||||
<tr>
|
||||
<td colspan="3" style="padding: 8px 35px;">
|
||||
<table style="width: 100%; height: 40px; background-color: #CCA761 !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
|
|
@ -325,15 +310,13 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 11: Income Sources - Dynamic from salary_ids -->
|
||||
<!-- Get salaries from benefit_id.benefit_id.salary_ids (family.salary_ids) -->
|
||||
<t t-set="family_salaries" t-value="doc.benefit_id.salary_ids or []"/>
|
||||
<t t-set="approved_salaries" t-value="family_salaries.filtered(lambda s: s.approved) if family_salaries else []"/>
|
||||
<t t-set="social_security" t-value="approved_salaries.filtered(lambda s: s.income_type and ('ضمان' in s.income_type.name or 'اجتماعي' in s.income_type.name))"/>
|
||||
<t t-set="social_security" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == 'الضمان الاجتماعي')"/>
|
||||
<t t-set="mother_salary" t-value="approved_salaries.filtered(lambda s: s.is_mother_salary)"/>
|
||||
<t t-set="retirement" t-value="approved_salaries.filtered(lambda s: s.income_type and 'تقاعد' in s.income_type.name)"/>
|
||||
<t t-set="social_insurance" t-value="approved_salaries.filtered(lambda s: s.income_type and 'تأمين' in s.income_type.name)"/>
|
||||
<t t-set="total_income" t-value="sum(approved_salaries.mapped('salary_amount')) if approved_salaries else (benefit_member.member_income if benefit_member and benefit_member.member_income else 0)"/>
|
||||
<t t-set="retirement" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == 'راتب تقاعدي')"/>
|
||||
<t t-set="social_insurance" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == 'التأمينات الاجتماعية')"/>
|
||||
<t t-set="total_income" t-value="sum(approved_salaries.mapped('salary_amount')) if approved_salaries else (doc.member_income if doc and doc.member_income else 0)"/>
|
||||
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
|
|
@ -344,7 +327,6 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -355,7 +337,6 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 12: الراتب التقاعدي + التأمينات الاجتماعية -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
|
|
@ -365,7 +346,6 @@
|
|||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- <td class="data-item-spacer" style="width: 2%;"></td> -->
|
||||
<td class="data-item-col" style="width: 50%; padding: 9px 15px 10px 35px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
@ -376,7 +356,6 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Row 13: المجموع (single item) -->
|
||||
<tr class="data-items-row">
|
||||
<td class="data-item-col" style="width: 50%; padding: 8px 35px 35px 20px; vertical-align: top;">
|
||||
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
|
||||
|
|
@ -403,14 +382,14 @@
|
|||
</template>
|
||||
|
||||
<!-- Report Action for Orphan Report -->
|
||||
<record id="action_report_orphan" model="ir.actions.report">
|
||||
<record id="action_report_mother_and_orphan" model="ir.actions.report">
|
||||
<field name="name">Orphan Report</field>
|
||||
<field name="model">family.member</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">odex_takaful.report_orphan_document</field>
|
||||
<field name="report_file">odex_takaful.report_orphan_document</field>
|
||||
<field name="report_name">odex_takaful.report_mother_and_orphan_document</field>
|
||||
<field name="report_file">odex_takaful.report_mother_and_orphan_document</field>
|
||||
<field name="print_report_name">
|
||||
(object.code and ('Orphan Report - %s' % (object.code,))) or 'Orphan Report'
|
||||
(object.benefit_code and ('Mother/Orphan Report - %s' % (object.benefit_code,))) or 'Orphan Report'
|
||||
</field>
|
||||
<field name="paperformat_id" ref="paperformat_orphan_landscape"/>
|
||||
<field name="binding_model_id" eval="False"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue