From b75fd11de61d23028a248e5d6359898717999dc9 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 20 Jan 2026 07:05:28 +0100 Subject: [PATCH] [UPD] odex_takaful: orphan report --- odex25_takaful/odex_takaful/__manifest__.py | 1 + .../data/ir_actions_server_data.xml | 20 +++++++ .../odex_takaful/models/family_member.py | 3 ++ .../odex_takaful/reports/orphan_report.xml | 52 ++++++++++++------- 4 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 odex25_takaful/odex_takaful/data/ir_actions_server_data.xml diff --git a/odex25_takaful/odex_takaful/__manifest__.py b/odex25_takaful/odex_takaful/__manifest__.py index b0d34a197..2fab481f3 100644 --- a/odex25_takaful/odex_takaful/__manifest__.py +++ b/odex25_takaful/odex_takaful/__manifest__.py @@ -23,6 +23,7 @@ 'data/sequence_data.xml', 'data/scheduled_actions.xml', + 'data/ir_actions_server_data.xml', 'views/reports_paperformats.xml', 'views/reports_templates.xml', 'views/reports_actions.xml', diff --git a/odex25_takaful/odex_takaful/data/ir_actions_server_data.xml b/odex25_takaful/odex_takaful/data/ir_actions_server_data.xml new file mode 100644 index 000000000..4395c74fa --- /dev/null +++ b/odex25_takaful/odex_takaful/data/ir_actions_server_data.xml @@ -0,0 +1,20 @@ + + + + + Print/Send Orphan Report + + + code + action = records.server_action_print_and_send_orphan_reports() + + + + + \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/models/family_member.py b/odex25_takaful/odex_takaful/models/family_member.py index 46a74537d..16f3e0177 100644 --- a/odex25_takaful/odex_takaful/models/family_member.py +++ b/odex25_takaful/odex_takaful/models/family_member.py @@ -59,6 +59,9 @@ 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 name_get(self): result = [] show_age = self.env.context.get('show_age_in_kafalat') diff --git a/odex25_takaful/odex_takaful/reports/orphan_report.xml b/odex25_takaful/odex_takaful/reports/orphan_report.xml index 559834b77..c05e29ae5 100644 --- a/odex25_takaful/odex_takaful/reports/orphan_report.xml +++ b/odex25_takaful/odex_takaful/reports/orphan_report.xml @@ -18,10 +18,11 @@ @@ -322,7 +334,7 @@ Orphan Report - takaful.sponsorship + family.member qweb-pdf odex_takaful.report_orphan_document odex_takaful.report_orphan_document