From a484b947e98f53cb59b60af2a5c26dd2ededac81 Mon Sep 17 00:00:00 2001 From: Nossibaelhadi Date: Mon, 5 Jan 2026 23:43:17 +0300 Subject: [PATCH 1/2] [FIX] solve bugs from test6 --- odex25_takaful/odex_takaful/i18n/ar_001.po | 19 ++++++++---- .../models/takaful_sponorship_model.py | 7 +++++ .../odex_takaful/security/security_data.xml | 6 ++++ .../odex_takaful/views/reports_actions.xml | 31 +++++++++++++------ .../views/takaful_sponorship_view.xml | 29 +++++++++++++---- .../wizards/account_payment_register.xml | 2 +- 6 files changed, 72 insertions(+), 22 deletions(-) diff --git a/odex25_takaful/odex_takaful/i18n/ar_001.po b/odex25_takaful/odex_takaful/i18n/ar_001.po index 04669ef42..4ff2f6397 100644 --- a/odex25_takaful/odex_takaful/i18n/ar_001.po +++ b/odex25_takaful/odex_takaful/i18n/ar_001.po @@ -1320,8 +1320,7 @@ msgstr "" #: model_terms:ir.ui.view,arch_db:odex_takaful.donations_details_lines_view_search #, fuzzy msgid "Closed" -msgstr "" -"مغلق" +msgstr "مغلق" #. module: odex_takaful #: model:ir.model.fields,field_description:odex_takaful.field_month_payment__code @@ -4373,7 +4372,7 @@ msgstr "متأخر في سداد الكفالة بنسبة إجمالية %s" #: model:ir.model.fields.selection,name:odex_takaful.selection__donations_details_lines__state__paid #, fuzzy msgid "Paid" -msgstr "منتهي" +msgstr "تم الدغع" #. module: odex_takaful #: model:ir.model.fields,field_description:odex_takaful.field_grant_benefit_invoice__paid_amount @@ -7664,9 +7663,6 @@ msgstr "تم الدفع" msgid "Branchs" msgstr "الفروع المسموح بها" - - - #. module: odex_takaful #: model_terms:ir.ui.view,arch_db:odex_takaful.view_account_payment_register_form msgid "Donor Bank Account" @@ -7739,3 +7735,14 @@ msgstr "تفاصيل الدفع" #: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_reports_wizards msgid "Print The Report" msgstr "طباعة التقرير" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_form +msgid "Print Sponsorship Receipt" +msgstr "طباعة السند" + +#. module: odex_takaful +#: model:ir.actions.report,name:odex_takaful.takaful_sponsorship_receipt_report +#: model:res.groups,name:odex_takaful.group_print_receipt +msgid "Sponsorship Receipt" +msgstr "طباعة السند" diff --git a/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py b/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py index 0bb17e372..24a2357dd 100644 --- a/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py +++ b/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py @@ -1447,6 +1447,7 @@ class TakafulSponsorship(models.Model): if self.sponsor_or_donor_type in ["registered", "new_sponsor"]: partner_id = self.sponsor_id elif self.sponsor_or_donor_type == "unknown": + self.sponsor_id = faal_kheer_partner_id partner_id = faal_kheer_partner_id else: partner_id = faal_kheer_partner_id @@ -1562,6 +1563,12 @@ class TakafulSponsorship(models.Model): datas = dict(self.env.context) return self.env.ref('odex_takaful.makfuleen_report_pdf_act').report_action(self, data=datas) + def action_print_sponsorship_receipt(self): + self.ensure_one() + return self.env.ref( + 'odex_takaful.takaful_sponsorship_receipt_report' + ).report_action(self) + # @api.multi def process_sponsor_payments_scheduler(self): domain = [] diff --git a/odex25_takaful/odex_takaful/security/security_data.xml b/odex25_takaful/odex_takaful/security/security_data.xml index 63cc10460..0ab6ff8cf 100644 --- a/odex25_takaful/odex_takaful/security/security_data.xml +++ b/odex25_takaful/odex_takaful/security/security_data.xml @@ -140,6 +140,12 @@ Kufula User + + + Sponsorship Receipt + + + Donations Officer diff --git a/odex25_takaful/odex_takaful/views/reports_actions.xml b/odex25_takaful/odex_takaful/views/reports_actions.xml index 23eb9dedf..8373b3cd5 100644 --- a/odex25_takaful/odex_takaful/views/reports_actions.xml +++ b/odex25_takaful/odex_takaful/views/reports_actions.xml @@ -33,15 +33,28 @@ menu="False" /> - + + + + + + + + + + + + Sponsorship Receipt + takaful.sponsorship + qweb-pdf + odex_takaful.report_sponsorship_receipt_document + odex_takaful.report_sponsorship_receipt_document + + (object.code and ('Sponsorship Receipt - %s' % (object.code,))) or 'Sponsorship Receipt' + + + + \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml b/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml index f5158a145..0b99fe53d 100644 --- a/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml +++ b/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml @@ -49,12 +49,21 @@ attrs="{'invisible': True}"/> +