From cb0ff78a90c3ffbf61f0f5153f288e48a7180403 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 15 Jan 2026 11:31:57 +0100 Subject: [PATCH 01/40] [FIX] odex_takaful --- odex25_takaful/odex_takaful/i18n/ar_001.po | 17 + .../odex_takaful/security/ir.model.access.csv | 92 +++--- .../odex_takaful/security/security_data.xml | 302 +++++------------- .../views/donations_details_lines.xml | 2 +- .../views/takaful_menus_actions.xml | 5 +- 5 files changed, 149 insertions(+), 269 deletions(-) diff --git a/odex25_takaful/odex_takaful/i18n/ar_001.po b/odex25_takaful/odex_takaful/i18n/ar_001.po index 1a803b36a..9506460ba 100644 --- a/odex25_takaful/odex_takaful/i18n/ar_001.po +++ b/odex25_takaful/odex_takaful/i18n/ar_001.po @@ -4901,6 +4901,11 @@ msgstr "طباعة ورقة البنك" msgid "Print Excel" msgstr "طباعة Excel" +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.donation_extension_history_form +msgid "Print Extension Receipt" +msgstr "طباعة السند" + #. module: odex_takaful #: model_terms:ir.ui.view,arch_db:odex_takaful.sponsor_report_menu_form #: model_terms:ir.ui.view,arch_db:odex_takaful.transfer_deduction_wizard_form_view @@ -7466,6 +7471,18 @@ msgstr "شيك" msgid "Direct Debit" msgstr "استقطاع" +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_account_payment__direct_debit +#: model:ir.model.fields,field_description:odex_takaful.field_donation_extension_wizard_line__direct_debit +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__direct_debit +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_scheduling_line__direct_debit +#: model:ir.model.fields.selection,name:odex_takaful.selection__account_payment_register__takaful_payment_method__direct_debit +#: model:ir.model.fields.selection,name:odex_takaful.selection__donations_details_lines__direct_debit_filter__direct +#: model_terms:ir.ui.view,arch_db:odex_takaful.donations_details_lines_view_search +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_sponsorship_scheduling_line_search +msgid "Direct Debit" +msgstr "إستقطاع" + #. module: odex_takaful #: code:addons/odex_takaful/static/src/xml/takaful_dashboard.xml:0 msgid "Network" diff --git a/odex25_takaful/odex_takaful/security/ir.model.access.csv b/odex25_takaful/odex_takaful/security/ir.model.access.csv index 8654324a1..25b8c5a55 100644 --- a/odex25_takaful/odex_takaful/security/ir.model.access.csv +++ b/odex25_takaful/odex_takaful/security/ir.model.access.csv @@ -1,63 +1,57 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_sponsorship_payment_user,Full access on sponsorship.payment to Payment User,model_sponsorship_payment,group_kufula_user,1,1,1,1 -access_month_payment_full,Full access on month.payment to Month Payment Manager,model_month_payment,odex_takaful.group_kufula_user,1,1,1,1 -access_takaful_message_template,Full access on takaful.message.template,model_takaful_message_template,odex_takaful.group_kufula_user,1,1,1,1 -access_sponsorship_cancellation,Full access on sponsorship.cancellation,model_sponsorship_cancellation,odex_takaful.group_kufula_user,1,1,1,1 -access_takaful_contribution,Full access on takaful.contribution,model_takaful_contribution,odex_takaful.group_kufula_user,1,1,1,1 -access_takaful_push_notification,Full access on takaful.push.notification,model_takaful_push_notification,odex_takaful.group_kufula_user,1,1,1,1 -access_month_payment_line,Full access on month.payment.line,model_month_payment_line,odex_takaful.group_kufula_user,1,1,1,1 -access_sponsorship_benefit_arrears,Full access on sponsorship.benefit.arrears,model_sponsorship_benefit_arrears,odex_takaful.group_kufula_user,1,1,1,1 -access_sponsorship_reason_stop,Full access on sponsorship.reason.stop,model_sponsorship_reason_stop,odex_takaful.group_kufula_user,1,1,1,1 -access_donate_for_another_person,access_donate_for_another_person,model_donate_for_another_person,odex_takaful.group_kufula_user,1,1,1,1 -access_donations_items,access_donations_items,model_donations_items,odex_takaful.group_kufula_user,1,1,1,1 -access_replacement_reasons,access_replacement_reasons,model_replacement_reasons,odex_takaful.group_orphan_replacement,1,1,1,1 -access_replacement_process,access_replacement_process,model_replacement_process,odex_takaful.group_orphan_replacement,1,1,1,0 +access_sponsorship_payment_user,Full access on sponsorship.payment,model_sponsorship_payment,group_kufula_user,1,1,1,1 +access_month_payment_full,Full access on month.payment,model_month_payment,group_kufula_user,1,1,1,1 +access_takaful_message_template,Full access on takaful.message.template,model_takaful_message_template,group_kufula_user,1,1,1,1 +access_sponsorship_cancellation,Full access on sponsorship.cancellation,model_sponsorship_cancellation,group_kufula_user,1,1,1,1 +access_takaful_contribution,Full access on takaful.contribution,model_takaful_contribution,group_kufula_user,1,1,1,1 +access_takaful_push_notification,Full access on takaful.push.notification,model_takaful_push_notification,group_kufula_user,1,1,1,1 +access_month_payment_line,Full access on month.payment.line,model_month_payment_line,group_kufula_user,1,1,1,1 +access_sponsorship_benefit_arrears,Full access on sponsorship.benefit.arrears,model_sponsorship_benefit_arrears,group_kufula_user,1,1,1,1 +access_sponsorship_reason_stop,Full access on sponsorship.reason.stop,model_sponsorship_reason_stop,group_kufula_user,1,1,1,1 +access_donate_for_another_person,access_donate_for_another_person,model_donate_for_another_person,group_kufula_user,1,1,1,1 +access_donations_items,access_donations_items,model_donations_items,group_kufula_user,1,1,1,1 +access_replacement_reasons,access_replacement_reasons,model_replacement_reasons,group_orphan_replacement,1,1,1,1 +access_replacement_process,access_replacement_process,model_replacement_process,group_orphan_replacement,1,1,1,0 access_takaful_notification,access_takaful_notification,model_takaful_notification,,1,1,1,1 access_sponsorship_states,access_sponsorship_states,model_sponsorship_states,,1,1,1,1 - - access_replacement_wiz,access_replacement_wiz,model_replacement_wiz,,1,1,1,1 -access_donations_details_lines,access_donations_details_lines,model_donations_details_lines,odex_takaful.group_kufula_user,1,1,1,1 -access_refund_details_lines,access_refund_details_lines,model_refund_details_lines,odex_takaful.group_kufula_user,1,1,1,1 -access_points_of_sale_custom,access_points_of_sale_custom,model_points_of_sale_custom,odex_takaful.group_kufula_user,1,1,1,1 -access_payment_details_lines,access_payment_details_lines,model_payment_details_lines,odex_takaful.group_kufula_user,1,1,1,1 -access_sponsorship_scheduling_line,access_sponsorship_scheduling_line,model_sponsorship_scheduling_line,odex_takaful.group_kufula_user,1,0,0,0 -access_refund_reasons,access_refund_reasons,model_refund_reasons,odex_takaful.group_kufula_user,1,1,1,1 -access_takaful_sponsorship_user,Full access on takaful.sponsorship to Sponsorship User,model_takaful_sponsorship,group_kufula_user,1,1,1,1 -access_res_partner_user,Access on res.pfartner to Sponsorship User,base.model_res_partner,group_kufula_user,1,1,0,0 -access_res_users_user,Access on res.users to Sponsorship User,base.model_res_users,group_kufula_user,1,1,0,0 -access_grant_benefit_invoice,Full access on grant.benefit.invoice to Month Payment Manager,model_grant_benefit_invoice,base.group_user,1,1,1,1 +access_donations_details_lines,access_donations_details_lines,model_donations_details_lines,group_kufula_user,1,1,1,1 +access_refund_details_lines,access_refund_details_lines,model_refund_details_lines,group_kufula_user,1,1,1,1 +access_points_of_sale_custom,access_points_of_sale_custom,model_points_of_sale_custom,group_kufula_user,1,1,1,1 +access_payment_details_lines,access_payment_details_lines,model_payment_details_lines,group_kufula_user,1,1,1,1 +access_sponsorship_scheduling_line,access_sponsorship_scheduling_line,model_sponsorship_scheduling_line,group_kufula_user,1,0,0,0 +access_refund_reasons,access_refund_reasons,model_refund_reasons,group_kufula_user,1,1,1,1 +access_takaful_sponsorship_user,Full access on takaful.sponsorship,model_takaful_sponsorship,group_kufula_user,1,1,1,1 +access_res_partner_user,Access on res.partner,base.model_res_partner,group_kufula_user,1,1,0,0 +access_res_users_user,Access on res.users,base.model_res_users,group_kufula_user,1,1,0,0 +access_grant_benefit_invoice,Full access on grant.benefit.invoice,model_grant_benefit_invoice,base.group_user,1,1,1,1 access_refund_wiz,access_refund_wiz,model_refund_wiz,,1,1,1,1 access_add_details_wiz,access_add_details_wiz,model_add_details_wiz,,1,1,1,1 access_preferred_communication,access_preferred_communication,model_preferred_communication,,1,1,1,1 access_takaful_payment_method,access_takaful_payment_method,model_takaful_payment_method,,1,1,1,1 access_replacement_line_method,access_takaful_replacement_line,model_replacement_line,,1,1,1,1 access_replacement_process_line_method,access_takaful_replacement_process_line,model_replacement_process_line,,1,1,1,1 - - access_transfer_deduction_wizard,transfer.deduction.wizard.access,model_transfer_deduction_wizard,base.group_user,1,1,1,1 -access_account_payment_register_donation_officer,account_payment_register_donation_officer,account.model_account_payment_register,odex_takaful.donation_officer_group,1,1,1,0 -access_product_template_donation_officer,product_template_donation_officer,product.model_product_template,odex_takaful.donation_officer_group,1,1,1,0 -access_product_product_donation_officer,product_product_donation_officer,product.model_product_product,odex_takaful.donation_officer_group,1,1,1,0 - -access_group_kufula_user_account_payment,access_group_kufula_user_account_payment,account.model_account_payment,odex_takaful.group_kufula_user,1,1,1,0 -access_group_kufula_user_account_partial_reconcile,access_group_kufula_user_account_partial_reconcile,account.model_account_partial_reconcile,odex_takaful.group_kufula_user,1,1,1,0 -access_group_kufula_user_account_full_reconcile,access_group_kufula_user_account_full_reconcile,account.model_account_full_reconcile,odex_takaful.group_kufula_user,1,1,1,0 +access_account_payment_register_donation_officer,account_payment_register_donation_officer,account.model_account_payment_register,donation_officer_group,1,1,1,0 +access_product_template_donation_officer,product_template_donation_officer,product.model_product_template,donation_officer_group,1,1,1,0 +access_product_product_donation_officer,product_product_donation_officer,product.model_product_product,donation_officer_group,1,1,1,0 +access_group_kufula_user_account_payment,access_group_kufula_user_account_payment,account.model_account_payment,group_kufula_user,1,1,1,0 +access_group_kufula_user_account_partial_reconcile,access_group_kufula_user_account_partial_reconcile,account.model_account_partial_reconcile,group_kufula_user,1,1,1,0 +access_group_kufula_user_account_full_reconcile,access_group_kufula_user_account_full_reconcile,account.model_account_full_reconcile,group_kufula_user,1,1,1,0 access_donation_extension_wizard,donation.extension.wizard.access,model_donation_extension_wizard,base.group_user,1,1,1,1 -access_donation_extension_history,donation.extension.history.access,model_donation_extension_history,odex_takaful.group_kufula_user,1,1,1,0 -access_donation_extension_wizard_line,donation.extension.wizard.line.access,model_donation_extension_wizard_line,odex_takaful.group_kufula_user,1,1,1,0 -access_donation_replacement_log,donation.replacement.log.access,model_donation_replacement_log,odex_takaful.group_kufula_user,1,1,1,0 -access_replace_sponsor_wizard,replace.sponsor.wizard.access,model_replace_sponsor_wizard,odex_takaful.group_replace_sponsor,1,1,1,1 -access_add_benefit_wizard,add.benefit.wizard.access,model_add_benefit_wizard,odex_takaful.group_kufula_user,1,1,1,1 -access_extension_payment_wizard_line,extension.payment.wizard.line.access,model_extension_payment_wizard_line,odex_takaful.group_kufula_user,1,1,1,1 -access_group_kufula_user_product_template,access_group_kufula_user_product_template,product.model_product_template,odex_takaful.group_kufula_user,1,1,0,0 -access_group_kufula_user_account_move,access_group_kufula_user_account_move,account.model_account_move,odex_takaful.group_kufula_user,1,1,1,0 -access_group_kufula_user_sale_order,access_group_kufula_user_sale_order,sale.model_sale_order,odex_takaful.group_kufula_user,1,1,1,0 -access_group_kufula_user_grant_benefit,access_group_kufula_user_grant_benefit,odex_benefit.model_grant_benefit,odex_takaful.group_kufula_user,1,1,1,0 -access_group_kufula_user_res_partner,access_group_kufula_user_res_partner,base.model_res_partner,odex_takaful.group_kufula_user,1,1,1,0 -access_replace_benefit_wizard,replace.benefit.wizard.access,model_replace_benefit_wizard,odex_takaful.group_kufula_user,1,1,1,1 +access_donation_extension_history,donation.extension.history.access,model_donation_extension_history,group_kufula_user,1,1,1,0 +access_donation_extension_wizard_line,donation.extension.wizard.line.access,model_donation_extension_wizard_line,group_kufula_user,1,1,1,0 +access_donation_replacement_log,donation.replacement.log.access,model_donation_replacement_log,group_kufula_user,1,1,1,0 +access_replace_sponsor_wizard,replace.sponsor.wizard.access,model_replace_sponsor_wizard,group_replace_sponsor,1,1,1,1 +access_add_benefit_wizard,add.benefit.wizard.access,model_add_benefit_wizard,group_kufula_user,1,1,1,1 +access_extension_payment_wizard_line,extension.payment.wizard.line.access,model_extension_payment_wizard_line,group_kufula_user,1,1,1,1 +access_group_kufula_user_product_template,access_group_kufula_user_product_template,product.model_product_template,group_kufula_user,1,1,0,0 +access_group_kufula_user_account_move,access_group_kufula_user_account_move,account.model_account_move,group_kufula_user,1,1,1,0 +access_group_kufula_user_sale_order,access_group_kufula_user_sale_order,sale.model_sale_order,group_kufula_user,1,1,1,0 +access_group_kufula_user_grant_benefit,access_group_kufula_user_grant_benefit,odex_benefit.model_grant_benefit,group_kufula_user,1,1,1,0 +access_group_kufula_user_res_partner,access_group_kufula_user_res_partner,base.model_res_partner,group_kufula_user,1,1,1,0 +access_replace_benefit_wizard,replace.benefit.wizard.access,model_replace_benefit_wizard,group_kufula_user,1,1,1,1 access_group_esterdad_wizard,access_group_esterdad_wizard,model_esterdad_wizard,,1,1,1,0 - access_group_otp_confirmation_wizard,access_group_otp_confirmation_wizard,model_otp_confirmation_wizard,,1,1,1,0 -access_payment_machine,access_payment_machine,model_payment_machine,odex_takaful.group_kufula_user,1,1,1,1 -access_payment_machine_manager,access_payment_machine_manager,model_payment_machine,odex_takaful.sponsorship_system_manager_group,1,1,1,1 \ No newline at end of file +access_payment_machine,access_payment_machine,model_payment_machine,group_kufula_user,1,1,1,1 +access_payment_machine_manager,access_payment_machine_manager,model_payment_machine,sponsorship_system_manager_group,1,1,1,1 \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/security/security_data.xml b/odex25_takaful/odex_takaful/security/security_data.xml index 281d8818b..d8cba36b2 100644 --- a/odex25_takaful/odex_takaful/security/security_data.xml +++ b/odex25_takaful/odex_takaful/security/security_data.xml @@ -3,142 +3,53 @@ Kufula System - Helps you manage Kafleen and Kafalat in kufula System + Helps you manage Kafleen and Kafalat in Kufula System 3 - Make Sponsorship Payments - Can Make Payments For Sponsorships? Recieve Sponsorship Payments - Can Recieve Payments For Sponsorships? Sponsor Account - Is this user a Sponsor? Can Activate Inactive Sponsors - Can make Sponsor active again? Refund Approval - Can make Approval for refund? Orphan Replacement - Orphan Replacement Replace Sponsor - Can Replace Sponsor on Donation Lines Show Donation Item Product - Can Show Donation Item Product? - - - - - - - - - - - - - - - - - - - - Kufula User - @@ -146,44 +57,21 @@ + + Updating Months Count & Start Date + + + Donations Officer - - Donations Officer can only see his donations or his branch sponsors - - - [ - ('record_type', 'in', [False, 'donation']), - ('create_uid', '=', user.id) - ] - - - - - - Sponsorships Officer - - - - Sponsorships Officer can only see his sponsorships or his branch sponsors - - - [ - ('record_type', 'in', [False, 'sponsorship']), - ('create_uid', '=', user.id) - ] - - - - - + @@ -191,21 +79,11 @@ - - Branch Manager can only see all his branch sponsorships and donations - - - [('branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False])] - - - - - Sponsorship System Manager - + @@ -214,109 +92,99 @@ - - Responsible Users can access related Sponsorships - - - [('branch_custom_id.branch', 'child_of', user.employee_id.department_id.id)] - - - - - - - - - - Users can access related Donations Details Lines - - - [('branch_custom_id.branch', 'child_of', user.employee_id.department_id.id)] - - - - - - - - Sponsorship System Manager can see everything and settings - - - [(1, '=', 1)] - - - - - - - - - - + Sponsor - Department Access - Limits sponsor records to user's department - - - + + Donations Officer: Own Donations + + + [ + ('record_type', 'in', [False, 'donation']), + ('create_uid', '=', user.id) + ] + + + + Donations Officer: Own Donation Lines + + + [ + '&', + ('record_type', 'in', [False, 'donation']), + '|', + ('sponsorship_id.create_uid', '=', user.id), + ('sponsorship_mechanism_id.create_uid', '=', user.id) + ] + + + + + Sponsorships Officer: Own Sponsorships + + + [ + ('record_type', 'in', [False, 'sponsorship']), + ('create_uid', '=', user.id) + ] + + + + + Sponsorships Officer: Own Donation Lines + + + [ + '&', + ('record_type', 'in', [False, 'sponsorship']), + '|', + ('sponsorship_id.create_uid', '=', user.id), + ('sponsorship_mechanism_id.create_uid', '=', user.id) + ] + + + + + Branch Manager: All Branch Sponsorships + + + ['|', ('branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False]), ('branch_custom_id.branch', 'child_of', user.employee_id.department_id.id)] + + + + Branch Manager: All Branch Donation Lines + + + [('branch_custom_id.branch', 'child_of', user.employee_id.department_id.id)] + + + + Sponsorship System Manager: See All + + + [(1, '=', 1)] + - - Sponsorship Marketer can see his employees + Sponsorship Marketer: See Own/Dept Employees - - ['|', '|', ('user_id','=',user.id), ('department_id.manager_id.user_id','=', - user.id), ('parent_id.user_id','=', user.id)] - + ['|', '|', ('user_id','=',user.id), ('department_id.manager_id.user_id','=', user.id), ('parent_id.user_id','=', user.id)] - - Updating Months Count & Start Date - - - - + \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/views/donations_details_lines.xml b/odex25_takaful/odex_takaful/views/donations_details_lines.xml index 00dfb3c3d..598d907d9 100644 --- a/odex25_takaful/odex_takaful/views/donations_details_lines.xml +++ b/odex25_takaful/odex_takaful/views/donations_details_lines.xml @@ -726,7 +726,7 @@ Unconditional Donations donations.details.lines tree,form - [('donation_mechanism', '=', 'without_conditions')] + [('record_type', '=', 'donation'), ('donation_mechanism', '=', 'without_conditions')] diff --git a/odex25_takaful/odex_takaful/views/takaful_menus_actions.xml b/odex25_takaful/odex_takaful/views/takaful_menus_actions.xml index b9b31e0a1..477b84f07 100644 --- a/odex25_takaful/odex_takaful/views/takaful_menus_actions.xml +++ b/odex25_takaful/odex_takaful/views/takaful_menus_actions.xml @@ -19,7 +19,8 @@ + name="Sponsorship Lines" action="donations_details_lines_sponsorship_action" + groups="odex_takaful.sponsorship_officer_group" sequence="1"/> @@ -42,7 +43,7 @@ + sequence="20" name="Donations" groups="odex_takaful.donation_officer_group"/> From 48e29bd56c731eb24aa928e468a9c3ec737449b3 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 15 Jan 2026 11:51:14 +0100 Subject: [PATCH 02/40] [FIX] odex_takaful --- odex25_takaful/odex_takaful/security/security_data.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odex25_takaful/odex_takaful/security/security_data.xml b/odex25_takaful/odex_takaful/security/security_data.xml index d8cba36b2..0c0a26340 100644 --- a/odex25_takaful/odex_takaful/security/security_data.xml +++ b/odex25_takaful/odex_takaful/security/security_data.xml @@ -71,13 +71,13 @@ Sponsorships Officer - + Branch Manager - + From 1a4102a30c9d1c24125ac9193933f1258c670f68 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 15 Jan 2026 11:57:06 +0100 Subject: [PATCH 03/40] [FIX] odex_takaful --- odex25_takaful/odex_takaful/security/security_data.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/odex25_takaful/odex_takaful/security/security_data.xml b/odex25_takaful/odex_takaful/security/security_data.xml index 0c0a26340..dfcd040d8 100644 --- a/odex25_takaful/odex_takaful/security/security_data.xml +++ b/odex25_takaful/odex_takaful/security/security_data.xml @@ -65,31 +65,31 @@ Donations Officer - + Sponsorships Officer - + Branch Manager - + Sponsorship System Manager - + Sponsorship General Restriction - + From 0094aeb7db2f217fdb2416da14afee57962ea2d2 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 15 Jan 2026 14:54:16 +0100 Subject: [PATCH 04/40] [FIX] odex_takaful --- .../reports/extension_receipt_report.xml | 301 +++++++++--------- .../odex_takaful/security/security_data.xml | 6 +- 2 files changed, 155 insertions(+), 152 deletions(-) diff --git a/odex25_takaful/odex_takaful/reports/extension_receipt_report.xml b/odex25_takaful/odex_takaful/reports/extension_receipt_report.xml index 6c482bd0a..78db5836c 100644 --- a/odex25_takaful/odex_takaful/reports/extension_receipt_report.xml +++ b/odex25_takaful/odex_takaful/reports/extension_receipt_report.xml @@ -5,99 +5,98 @@ - - - + + + - - - -
+ + + +
-
-
+
+
- -
-
- مرحباً - + +
+
+ مرحباً + +
+
+ بكل امتنان نشكر لك تجديد كفالتك، ونسأل الله أن يجعلك ممن يرافقون النبي + ﷺ +
في الجنة. +
+
+ ونتشرف دائما باستقبال عطائك المستمر لدعم أبنائكم الأيتام. +
-
- بكل امتنان نشكر لك تجديد كفالتك، ونسأل الله أن يجعلك ممن يرافقون النبي - ﷺ -
في الجنة. -
-
- ونتشرف دائما باستقبال عطائك المستمر لدعم أبنائكم الأيتام. -
-
- -
-
- رقم الكفالة: - + +
+
+ رقم الكفالة: + +
+
+ تاريخ التجديد: + + + +
-
- تاريخ التجديد: - - - -
-
- - - - - - - - - - - - + +
- نوع التبرع - - التفاصيل - - الفترة الجديدة - - المبلغ -
+ + + + + + + + + - - - - - - - - - -
+ نوع التبرع + + التفاصيل + + الفترة الجديدة + + المبلغ +
- + - - - + + - - +
- شهور التمديد: + شهور التمديد:
- من: + من:
- إلى + إلى
- + ر.س @@ -106,100 +105,100 @@
- المجموع: - - - - - - - - - - - ر.س - - - ر.س - - -
+ + + + المجموع: + + + - + + + - + + + + + + ر.س + + + ر.س + + + + + + - - - - - - - - - - - - - - + + + + +
- وسيلة الدفع - - المبلغ -
- - - - - - - + + + + + + + + + + + + + + + - - - ر.س - - - ر.س - + + + - - - - - - - - - - - -
+ وسيلة الدفع + + المبلغ +
+ + + + + + + + + + + ر.س + + + ر.س + +
+ + الإجمالي: + + + + + ر.س + + + ر.س +
- - الإجمالي: - - - - - ر.س - - - ر.س - -
- لا توجد دفعات -
+ +
+ لا توجد دفعات +
+
-
+ diff --git a/odex25_takaful/odex_takaful/security/security_data.xml b/odex25_takaful/odex_takaful/security/security_data.xml index dfcd040d8..0636605ba 100644 --- a/odex25_takaful/odex_takaful/security/security_data.xml +++ b/odex25_takaful/odex_takaful/security/security_data.xml @@ -158,7 +158,11 @@ Branch Manager: All Branch Donation Lines - [('branch_custom_id.branch', 'child_of', user.employee_id.department_id.id)] + [ + '|', + ('sponsorship_id.branch_custom_id.branch', 'child_of', user.employee_id.department_id.id), + ('sponsorship_mechanism_id.branch_custom_id.branch', 'child_of', user.employee_id.department_id.id) + ] @@ -159,8 +163,11 @@ [ - '|', + '|', '|', '|', + ('sponsorship_id.branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False]), ('sponsorship_id.branch_custom_id.branch', 'child_of', user.employee_id.department_id.id), + + ('sponsorship_mechanism_id.branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False]), ('sponsorship_mechanism_id.branch_custom_id.branch', 'child_of', user.employee_id.department_id.id) ] @@ -173,12 +180,19 @@ - Sponsorship System Manager: See All + Sponsorship System Manager: See All Sponsorships [(1, '=', 1)] + + Sponsorship System Manager: See All Donations Lines + + + [(1, '=', 1)] + + Sponsorship Marketer: See Own/Dept Employees From afe10dc22022f9c085c23fadaf4383948a668045 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Sun, 18 Jan 2026 14:33:03 +0100 Subject: [PATCH 06/40] [FIX] odex_takaful --- odex25_takaful/odex_takaful/wizards/add_benefit_wizard.xml | 3 +-- .../odex_takaful/wizards/replace_benefit_wizard.py | 5 +++-- .../odex_takaful/wizards/replace_benefit_wizard.xml | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/odex25_takaful/odex_takaful/wizards/add_benefit_wizard.xml b/odex25_takaful/odex_takaful/wizards/add_benefit_wizard.xml index b3d34e358..8890b610e 100644 --- a/odex25_takaful/odex_takaful/wizards/add_benefit_wizard.xml +++ b/odex25_takaful/odex_takaful/wizards/add_benefit_wizard.xml @@ -13,8 +13,7 @@ + options="{'no_create': True, 'no_create_edit':True,'no_open': True}"/> diff --git a/odex25_takaful/odex_takaful/wizards/replace_benefit_wizard.py b/odex25_takaful/odex_takaful/wizards/replace_benefit_wizard.py index fea63a4d6..5acae1552 100644 --- a/odex25_takaful/odex_takaful/wizards/replace_benefit_wizard.py +++ b/odex25_takaful/odex_takaful/wizards/replace_benefit_wizard.py @@ -34,7 +34,8 @@ class ReplaceBenefitWizard(models.TransientModel): domain = expression.AND([domain, [ ('member_status', '=', 'benefit'), ('sponsor_related_id', '=', False), - ('general_restriction', '=', False) + ('general_restriction', '=', False), + ('allowed_sponsorship', '=', True) ]]) if rec.sponsorship_id.sponsorship_duration == 'temporary': @@ -48,7 +49,7 @@ class ReplaceBenefitWizard(models.TransientModel): ('age', '>=', benefit_age_limit) ]]) - members = self.env['family.member'].sudo().search(domain) + members = self.env['family.member'].search(domain) rec.members_domain_ids = members if members else self.env['family.member'].sudo().browse() diff --git a/odex25_takaful/odex_takaful/wizards/replace_benefit_wizard.xml b/odex25_takaful/odex_takaful/wizards/replace_benefit_wizard.xml index 9aafe683e..4243ae0de 100644 --- a/odex25_takaful/odex_takaful/wizards/replace_benefit_wizard.xml +++ b/odex25_takaful/odex_takaful/wizards/replace_benefit_wizard.xml @@ -15,8 +15,7 @@ + context="{'group_by': 'benefit_group', 'show_age_in_kafalat': True}"/> From a69dde6a8a2a9f9cfbfb0b4e0902a94e56149a5e Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Sun, 18 Jan 2026 15:37:26 +0100 Subject: [PATCH 07/40] [FIX] odex_takaful --- odex25_takaful/odex_takaful/models/__init__.py | 1 + odex25_takaful/odex_takaful/models/mail_message.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 odex25_takaful/odex_takaful/models/mail_message.py diff --git a/odex25_takaful/odex_takaful/models/__init__.py b/odex25_takaful/odex_takaful/models/__init__.py index b1d92c5ba..cc34d8c0d 100644 --- a/odex25_takaful/odex_takaful/models/__init__.py +++ b/odex25_takaful/odex_takaful/models/__init__.py @@ -31,3 +31,4 @@ from . import donation_replacement_log from . import payment_machine from . import benefit_category +from . import mail_message diff --git a/odex25_takaful/odex_takaful/models/mail_message.py b/odex25_takaful/odex_takaful/models/mail_message.py new file mode 100644 index 000000000..adefcfeab --- /dev/null +++ b/odex25_takaful/odex_takaful/models/mail_message.py @@ -0,0 +1,12 @@ +from odoo import models, api + + +class Message(models.Model): + _inherit = 'mail.message' + + + @api.model + def _find_allowed_model_wise(self, doc_model, doc_dict): + doc_ids = list(doc_dict) + allowed_doc_ids = self.env[doc_model].with_context(active_test=False).search([('id', 'in', doc_ids)]).ids + return set([message_id for allowed_doc_id in allowed_doc_ids if allowed_doc_id in doc_dict for message_id in doc_dict[allowed_doc_id]]) \ No newline at end of file From d928f30acd5f983953b1656a02a2a741927efd8d Mon Sep 17 00:00:00 2001 From: Nossibaelhadi Date: Mon, 19 Jan 2026 13:45:53 +0300 Subject: [PATCH 08/40] [FIX] solve bugs from test 14 --- odex25_takaful/odex_takaful/i18n/ar_001.po | 20 ++++-- .../models/donation_details_lines.py | 11 ++++ .../views/donations_details_lines.xml | 64 ++++++++++--------- .../views/takaful_sponorship_view.xml | 18 +++++- .../wizards/donation_extension_wizard.py | 14 +++- .../wizards/donation_extension_wizard.xml | 9 ++- 6 files changed, 96 insertions(+), 40 deletions(-) diff --git a/odex25_takaful/odex_takaful/i18n/ar_001.po b/odex25_takaful/odex_takaful/i18n/ar_001.po index 9506460ba..aa87750a2 100644 --- a/odex25_takaful/odex_takaful/i18n/ar_001.po +++ b/odex25_takaful/odex_takaful/i18n/ar_001.po @@ -751,6 +751,8 @@ msgstr "مقبوضات الكفالة رقم %s" #. module: odex_takaful #: model:ir.model.fields,field_description:odex_takaful.field_account_payment_register__bank_id +#: model:ir.model.fields,field_description:odex_takaful.field_donation_extension_wizard_line__bank_id +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__bank_id #: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_report_pdf #: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_share msgid "Bank" @@ -3093,18 +3095,22 @@ msgstr "تم الإصدار بواسطة" #. module: odex_takaful #: model:ir.model,name:odex_takaful.model_account_journal -#: model:ir.model.fields,field_description:odex_takaful.field_donation_extension_wizard_line__journal_id -#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__journal_id -#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__journal_id #: model:ir.model.fields,field_description:odex_takaful.field_grant_benefit_invoice__journal_id #: model:ir.model.fields,field_description:odex_takaful.field_month_payment__journal_id #: model:ir.model.fields,field_description:odex_takaful.field_payment_details_lines__journal_id -#: model:ir.model.fields,field_description:odex_takaful.field_payment_machine__journal_id #: model:ir.model.fields,field_description:odex_takaful.field_points_of_sale_custom__journal_id -#: model:ir.model.fields,field_description:odex_takaful.field_takaful_payment_method__journal_id msgid "Journal" msgstr "دفتر اليومية" +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donation_extension_wizard_line__journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_payment_machine__journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_payment_method__journal_id +msgid "Journal" +msgstr "بنك الجمعية" + #. module: odex_takaful #: model:ir.model,name:odex_takaful.model_account_move #: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__journal_entry_ids @@ -3204,6 +3210,8 @@ msgstr "مستخدم الكفالات" #. module: odex_takaful #: model:ir.model.fields,field_description:odex_takaful.field_account_payment_register__last_digits +#: model:ir.model.fields,field_description:odex_takaful.field_donation_extension_wizard_line__last_digits +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__last_digits msgid "Last Digits" msgstr "رقم الحساب" @@ -6961,6 +6969,8 @@ msgid "Yes" msgstr "نعم" #. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.donation_extension_wizard_form +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_form #: model_terms:ir.ui.view,arch_db:odex_takaful.view_account_payment_register_form msgid "You Can Type 4 Digits" msgstr "يمكنك إدخال آخر اربعة أرقام" diff --git a/odex25_takaful/odex_takaful/models/donation_details_lines.py b/odex25_takaful/odex_takaful/models/donation_details_lines.py index ddd91a806..6540c51b7 100644 --- a/odex25_takaful/odex_takaful/models/donation_details_lines.py +++ b/odex25_takaful/odex_takaful/models/donation_details_lines.py @@ -143,6 +143,17 @@ class DonationsDetailsLines(models.Model): ) payment_method_type = fields.Selection(related='payment_method_display.payment_method', string='Payment Method Type', store=True) benefit_kafala_status = fields.Selection(related='benefit_id.kafala_status', string="Benefit Kafala Status") + show_last_digits = fields.Boolean(string="Use 4 Digits", ) + last_digits = fields.Char(string="Last Digits", size=32) + bank_id = fields.Many2one('res.bank', string="Bank") + + @api.onchange("direct_debit_partner_bank_id") + def onchange_direct_debit_partner_bank_id(self): + for rec in self: + if rec.direct_debit_partner_bank_id: + rec.show_last_digits = False + else: + rec.show_last_digits = True @api.onchange('family_id') diff --git a/odex25_takaful/odex_takaful/views/donations_details_lines.xml b/odex25_takaful/odex_takaful/views/donations_details_lines.xml index 598d907d9..8802f2441 100644 --- a/odex25_takaful/odex_takaful/views/donations_details_lines.xml +++ b/odex25_takaful/odex_takaful/views/donations_details_lines.xml @@ -275,21 +275,21 @@ attrs="{'invisible': [('sponsorship_duration','!=','temporary')], 'required': [('sponsorship_duration','=','temporary')], 'readonly': [('parent_state', '!=', 'draft')]}" readonly="1" force_save="1" /> - + 1 @@ -415,25 +415,6 @@ - - Sponsorship Items - donations.details.lines - tree,form - [('record_type', '=', 'sponsorship')] - - - {'create': False, 'delete': False, 'default_record_type': 'sponsorship'} - -

- No sponsorship items found -

-

- Sponsorship items appear here After confirming sponsorships from the sponsorships screen main -

-
-
donations.details.lines.view.tree.waiting @@ -522,7 +503,7 @@ - + donations.details.lines.sponsorship.tree @@ -536,7 +517,7 @@ - @@ -650,10 +631,31 @@ + + Sponsorship Items + donations.details.lines + tree,form + [('record_type', '=', 'sponsorship')] + + + {'create': False, 'delete': False, 'default_record_type': 'sponsorship'} + +

+ No sponsorship items found +

+

+ Sponsorship items appear here After confirming sponsorships from the sponsorships screen main +

+
+
+ + - + donations.details.lines.unconditional.tree @@ -745,7 +747,7 @@ - + donations.details.lines.conditional.tree @@ -830,4 +832,4 @@
- + \ 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 44cb86e38..07072406c 100644 --- a/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml +++ b/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml @@ -346,10 +346,17 @@ + + + + + @@ -599,10 +606,17 @@ + + + + + diff --git a/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py b/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py index a70dfc0b4..464dd6cf9 100644 --- a/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py +++ b/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py @@ -297,7 +297,19 @@ class DonationExtensionWizardLine(models.TransientModel): donation_mechanism = fields.Selection(related='donation_line_id.donation_mechanism') months = fields.Integer(related='wizard_id.months') partner_id = fields.Many2one(related='donation_line_id.sponsor_id') - + + show_last_digits = fields.Boolean(string="Use 4 Digits", ) + last_digits = fields.Char(string="Last Digits", size=32) + bank_id = fields.Many2one('res.bank', string="Bank") + + @api.onchange("direct_debit_partner_bank_id", "direct_debit") + def onchange_direct_debit_partner_bank_id(self): + for rec in self: + if rec.direct_debit_partner_bank_id: + rec.show_last_digits = False + else: + rec.show_last_digits = True + @api.depends('benefits_count', 'donation_amount', 'months', 'donation_qty', 'record_type', 'sponsorship_type') def _compute_total_donation_amount(self): for rec in self: diff --git a/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.xml b/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.xml index 51b4abca4..8cc083907 100644 --- a/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.xml +++ b/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.xml @@ -58,10 +58,17 @@ + + + + + Date: Mon, 19 Jan 2026 17:02:10 +0300 Subject: [PATCH 09/40] [FIX] solve bugs from test 15 --- odex25_takaful/odex_takaful/views/takaful_sponsor_view.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/odex25_takaful/odex_takaful/views/takaful_sponsor_view.xml b/odex25_takaful/odex_takaful/views/takaful_sponsor_view.xml index 9f68c2a4a..0551f6cd7 100644 --- a/odex25_takaful/odex_takaful/views/takaful_sponsor_view.xml +++ b/odex25_takaful/odex_takaful/views/takaful_sponsor_view.xml @@ -33,6 +33,7 @@ res.partner + @@ -57,6 +58,7 @@ + From 599e5d88294e61fd38859d8b35b95bc31b058141 Mon Sep 17 00:00:00 2001 From: Nossibaelhadi Date: Mon, 19 Jan 2026 18:19:25 +0300 Subject: [PATCH 10/40] [FIX] solve bugs from test 16 --- odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml b/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml index 07072406c..56e62f414 100644 --- a/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml +++ b/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml @@ -613,9 +613,9 @@ attrs="{'invisible': ['|', ('payment_month_count_visibility','!=', True),('direct_debit', '=', False)], 'required': ['&', ('direct_debit', '=', True), ('show_last_digits', '=', False)]}" options="{'skip_disable_quick_create': True}"/> + attrs="{'invisible': ['|', ('show_last_digits', '=', False), ('direct_debit', '=', False)], 'required': ['&', ('direct_debit', '=', True), ('show_last_digits', '=', True)]}" placeholder="You Can Type 4 Digits"/> + attrs="{'invisible': ['|', ('show_last_digits', '=', False), ('direct_debit', '=', False)], 'required': ['&', ('direct_debit', '=', True), ('show_last_digits', '=', True)]}"/> From 7dacc0fdeb153a9967c3446f06f82158c7b96f4a Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 20 Jan 2026 04:49:43 +0100 Subject: [PATCH 11/40] [FIX] odex_takaful --- odex25_takaful/odex_takaful/__manifest__.py | 2 +- .../odex_takaful/views/family_member.xml | 2 ++ .../views/takaful_sponorship_view.xml | 17 +++++++++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/odex25_takaful/odex_takaful/__manifest__.py b/odex25_takaful/odex_takaful/__manifest__.py index 996f1e043..b0d34a197 100644 --- a/odex25_takaful/odex_takaful/__manifest__.py +++ b/odex25_takaful/odex_takaful/__manifest__.py @@ -37,12 +37,12 @@ 'views/assets.xml', 'views/res_config_settings.xml', 'wizards/orphan_replacement_wizard.xml', + 'views/family_member.xml', 'views/takaful_sponorship_view.xml', 'views/donation_item_views.xml', 'views/replacement_reasons_views.xml', 'views/replacement_process_views.xml', 'views/benefit_views.xml', - 'views/family_member.xml', 'views/takaful_contribution_view.xml', 'views/sponsorship_payment_view.xml', diff --git a/odex25_takaful/odex_takaful/views/family_member.xml b/odex25_takaful/odex_takaful/views/family_member.xml index 3215c8308..bc03af3c9 100644 --- a/odex25_takaful/odex_takaful/views/family_member.xml +++ b/odex25_takaful/odex_takaful/views/family_member.xml @@ -112,6 +112,8 @@ family.member.tree.inherit family.member + primary + False - - - - - - - - + + + + + + + + From b75fd11de61d23028a248e5d6359898717999dc9 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 20 Jan 2026 07:05:28 +0100 Subject: [PATCH 12/40] [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 From 65f738515e411642f5c1f25f694734521bc2406c Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 20 Jan 2026 09:05:52 +0100 Subject: [PATCH 13/40] [UPD] odex_takaful --- .../models/donation_extension_history.py | 71 +++++++++++- .../wizards/account_payment_register.py | 6 +- .../wizards/donation_extension_wizard.py | 102 +++++++++--------- 3 files changed, 129 insertions(+), 50 deletions(-) diff --git a/odex25_takaful/odex_takaful/models/donation_extension_history.py b/odex25_takaful/odex_takaful/models/donation_extension_history.py index f6bfb371e..74e583f55 100644 --- a/odex25_takaful/odex_takaful/models/donation_extension_history.py +++ b/odex25_takaful/odex_takaful/models/donation_extension_history.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from odoo import models, fields, api, _ +from dateutil.relativedelta import relativedelta class DonationExtensionHistory(models.Model): @@ -125,6 +126,74 @@ class DonationExtensionHistory(models.Model): store=False ) + direct_debit_partner_bank_id = fields.Many2one("res.partner.bank") + debit_payment_file_attachment = fields.Binary(attachment=True) + debit_payment_attachment_file_name = fields.Char() + journal_id = fields.Many2one('account.journal') + last_digits = fields.Char() + bank_id = fields.Many2one('res.bank') + + paid_amount = fields.Float() + + + def _apply_extension_on_sponsorship(self): + new_end_date = self.donation_detail_id.end_date + relativedelta(months=self.extension_months) + + donation_line_new_vals = { + 'end_date': new_end_date, + 'payment_month_count': self.donation_detail_id.payment_month_count + self.extension_months, + } + if self.new_direct_debit: + donation_line_new_vals.update({ + 'direct_debit': self.new_direct_debit, + 'direct_debit_partner_bank_id': self.direct_debit_partner_bank_id.id, + 'journal_id': self.journal_id.id, + 'debit_payment_file_attachment': self.debit_payment_file_attachment, + 'debit_payment_attachment_file_name': self.debit_payment_attachment_file_name, + 'last_digits': self.last_digits, + 'bank_id': self.bank_id.id, + }) + + self.donation_detail_id.write(donation_line_new_vals) + + benefit_ids = self.donation_detail_id.benefit_ids | self.donation_detail_id.benefit_id + benefit_ids.write({ + 'sponsorship_end_date': new_end_date, + 'kafala_status': 'have_kafala', + }) + + # Create new scheduling lines for the extension period + if self.new_direct_debit: + self._create_extension_scheduling_lines() + + def _create_extension_scheduling_lines(self): + self.ensure_one() + + donation_line = self.donation_detail_id + start_date = donation_line.end_date + relativedelta(months=1) + + # Distribute total amount across months + base_amount, remainder = divmod(self.extension_amount, self.extension_months) + base_amount = float(base_amount) + + for month in range(self.extension_months): + scheduled_date = start_date + relativedelta(months=month) + month_year = scheduled_date.strftime("%m/%Y") + # Distribute remainder across first months + amount = base_amount + 1 if month < remainder else base_amount + # Format the amount to 2 decimal places for better representation + amount = round(amount, 2) + # Create scheduling line + self.env['sponsorship.scheduling.line'].sudo().create({ + 'sponsorship_id': donation_line.sponsorship_id.id or donation_line.sponsorship_mechanism_id.id, + 'donation_detail_linked_id': donation_line.id, + 'beneficiary_id': donation_line.benefit_id.id if donation_line.benefit_id else False, + 'month_year': month_year, + 'scheduled_date': scheduled_date, + 'amount': amount, + 'status': 'unpaid', + }) + def _sms_get_number_fields(self): """Return fields to use for SMS phone number""" return ['sponsor_phone'] @@ -172,7 +241,7 @@ class DonationExtensionHistory(models.Model): 'context': { 'active_model': 'account.move', 'active_ids': self.invoice_id.ids, - 'default_amount': self.extension_amount, + 'default_amount': self.extension_amount - self.paid_amount, 'sponsorship_payment_skip_compute_amount': True, 'dont_redirect_to_payments': True, 'sponsorship_line_ids': self.donation_detail_id.ids, diff --git a/odex25_takaful/odex_takaful/wizards/account_payment_register.py b/odex25_takaful/odex_takaful/wizards/account_payment_register.py index 800d6680a..5fea90ff0 100644 --- a/odex25_takaful/odex_takaful/wizards/account_payment_register.py +++ b/odex25_takaful/odex_takaful/wizards/account_payment_register.py @@ -377,7 +377,10 @@ class AccountRegisterPayment(models.TransientModel): if self.env.context.get('from_extension_history') and donation_extension_history_id and res: history = self.env['donation.extension.history'].browse(donation_extension_history_id) if history: - history.sudo().write({'state': 'paid'}) + history.paid_amount += self.amount + if history.paid_amount >= history.extension_amount: + history.sudo()._apply_extension_on_sponsorship() + history.sudo().write({'state': 'paid'}) elif self.env.context.get('dont_redirect_to_payments') and self.env.context.get('wiz_id'): if self.amount < self.env.context.get('default_amount'): @@ -405,6 +408,7 @@ class AccountRegisterPayment(models.TransientModel): ('invoice_id', '=', line.extension_invoice_id.id) ], limit=1) if history: + history.sudo()._apply_extension_on_sponsorship() history.sudo().write({'state': 'paid'}) return { diff --git a/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py b/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py index 464dd6cf9..21c0c55a5 100644 --- a/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py +++ b/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py @@ -353,29 +353,29 @@ class DonationExtensionWizardLine(models.TransientModel): old_end_date = self.current_end_date # Update end date - donation_line_new_vals = { - 'end_date': new_end_date, - 'payment_month_count': self.donation_line_id.payment_month_count + self.months, - } - if self.direct_debit: - donation_line_new_vals.update({ - 'direct_debit': self.direct_debit, - 'direct_debit_partner_bank_id': self.direct_debit_partner_bank_id.id, - 'journal_id': self.journal_id.id, - 'debit_payment_file_attachment': self.debit_payment_file_attachment, - 'debit_payment_attachment_file_name': self.debit_payment_attachment_file_name, - }) - self.donation_line_id.write(donation_line_new_vals) + # donation_line_new_vals = { + # 'end_date': new_end_date, + # 'payment_month_count': self.donation_line_id.payment_month_count + self.months, + # } + # if self.direct_debit: + # donation_line_new_vals.update({ + # 'direct_debit': self.direct_debit, + # 'direct_debit_partner_bank_id': self.direct_debit_partner_bank_id.id, + # 'journal_id': self.journal_id.id, + # 'debit_payment_file_attachment': self.debit_payment_file_attachment, + # 'debit_payment_attachment_file_name': self.debit_payment_attachment_file_name, + # }) + # self.donation_line_id.write(donation_line_new_vals) - benefit_ids = self.donation_line_id.benefit_ids | self.donation_line_id.benefit_id - benefit_ids.write({ - 'sponsorship_end_date': new_end_date, - 'kafala_status': 'have_kafala', - }) + # benefit_ids = self.donation_line_id.benefit_ids | self.donation_line_id.benefit_id + # benefit_ids.write({ + # 'sponsorship_end_date': new_end_date, + # 'kafala_status': 'have_kafala', + # }) - # Create new scheduling lines for the extension period - if self.direct_debit: - self._create_extension_scheduling_lines() + # # Create new scheduling lines for the extension period + # if self.direct_debit: + # self._create_extension_scheduling_lines() # Create invoice for the extension invoice_id = self._create_extension_invoice() @@ -393,6 +393,12 @@ class DonationExtensionWizardLine(models.TransientModel): 'old_direct_debit': self.donation_line_id.direct_debit, 'new_direct_debit': self.direct_debit, + 'direct_debit_partner_bank_id': self.direct_debit_partner_bank_id.id, + 'debit_payment_file_attachment': self.debit_payment_file_attachment, + 'debit_payment_attachment_file_name': self.debit_payment_attachment_file_name, + 'journal_id': self.journal_id.id, + 'last_digits': self.last_digits, + 'bank_id': self.bank_id.id, }) if not self.direct_debit: @@ -402,36 +408,36 @@ class DonationExtensionWizardLine(models.TransientModel): return False - def _create_extension_scheduling_lines(self): - """ - Create scheduling lines for the extension period - """ - self.ensure_one() + # def _create_extension_scheduling_lines(self): + # """ + # Create scheduling lines for the extension period + # """ + # self.ensure_one() - donation_line = self.donation_line_id - start_date = self.current_end_date + relativedelta(months=1) + # donation_line = self.donation_line_id + # start_date = self.current_end_date + relativedelta(months=1) - # Distribute total amount across months - base_amount, remainder = divmod(self.total_donation_amount, self.months) - base_amount = float(base_amount) + # # Distribute total amount across months + # base_amount, remainder = divmod(self.total_donation_amount, self.months) + # base_amount = float(base_amount) - for month in range(self.months): - scheduled_date = start_date + relativedelta(months=month) - month_year = scheduled_date.strftime("%m/%Y") - # Distribute remainder across first months - amount = base_amount + 1 if month < remainder else base_amount - # Format the amount to 2 decimal places for better representation - amount = round(amount, 2) - # Create scheduling line - self.env['sponsorship.scheduling.line'].sudo().create({ - 'sponsorship_id': donation_line.sponsorship_id.id or donation_line.sponsorship_mechanism_id.id, - 'donation_detail_linked_id': donation_line.id, - 'beneficiary_id': donation_line.benefit_id.id if donation_line.benefit_id else False, - 'month_year': month_year, - 'scheduled_date': scheduled_date, - 'amount': amount, - 'status': 'unpaid', - }) + # for month in range(self.months): + # scheduled_date = start_date + relativedelta(months=month) + # month_year = scheduled_date.strftime("%m/%Y") + # # Distribute remainder across first months + # amount = base_amount + 1 if month < remainder else base_amount + # # Format the amount to 2 decimal places for better representation + # amount = round(amount, 2) + # # Create scheduling line + # self.env['sponsorship.scheduling.line'].sudo().create({ + # 'sponsorship_id': donation_line.sponsorship_id.id or donation_line.sponsorship_mechanism_id.id, + # 'donation_detail_linked_id': donation_line.id, + # 'beneficiary_id': donation_line.benefit_id.id if donation_line.benefit_id else False, + # 'month_year': month_year, + # 'scheduled_date': scheduled_date, + # 'amount': amount, + # 'status': 'unpaid', + # }) def _create_extension_invoice(self): """ From 4a75c2716c0e8bfd8868980f3580c45ccefd2d59 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 20 Jan 2026 10:20:30 +0100 Subject: [PATCH 14/40] [UPD] odex_takaful --- odex25_takaful/odex_takaful/__manifest__.py | 2 + .../models/donation_details_lines.py | 6 ++ .../odex_takaful/security/ir.model.access.csv | 3 +- .../views/global_extension_wizard_view.xml | 56 +++++++++++++++++++ .../views/takaful_menus_actions.xml | 6 ++ .../odex_takaful/wizards/__init__.py | 1 + .../wizards/global_extension_wizard.py | 33 +++++++++++ 7 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 odex25_takaful/odex_takaful/views/global_extension_wizard_view.xml create mode 100644 odex25_takaful/odex_takaful/wizards/global_extension_wizard.py diff --git a/odex25_takaful/odex_takaful/__manifest__.py b/odex25_takaful/odex_takaful/__manifest__.py index 2fab481f3..19e9ee2c4 100644 --- a/odex25_takaful/odex_takaful/__manifest__.py +++ b/odex25_takaful/odex_takaful/__manifest__.py @@ -84,6 +84,7 @@ 'views/product_views.xml', 'views/payment_machine_views.xml', 'views/account_payment_views.xml', + 'views/global_extension_wizard_view.xml', 'views/takaful_menus_actions.xml', 'views/benefit_category_views.xml', 'data/message_template_data.xml', @@ -91,6 +92,7 @@ 'wizards/transfer_deduction_wizard_views.xml', 'reports/transfer_deduction_report.xml', 'reports/transfer_deduction_report_templates.xml', + ], 'qweb': [ 'static/src/xml/takaful_dashboard.xml', diff --git a/odex25_takaful/odex_takaful/models/donation_details_lines.py b/odex25_takaful/odex_takaful/models/donation_details_lines.py index 6540c51b7..587624e0a 100644 --- a/odex25_takaful/odex_takaful/models/donation_details_lines.py +++ b/odex25_takaful/odex_takaful/models/donation_details_lines.py @@ -1435,3 +1435,9 @@ class DonationsDetailsLines(models.Model): 'default_donation_detail_id': self.id, }, } + + @api.model + def search(self, args, offset=0, limit=None, order=None, count=False): + if self.env.context.get('wizard_force_show_all'): + self = self.sudo() + return super(DonationsDetailsLines, self).search(args, offset, limit, order, count) diff --git a/odex25_takaful/odex_takaful/security/ir.model.access.csv b/odex25_takaful/odex_takaful/security/ir.model.access.csv index 25b8c5a55..62d217964 100644 --- a/odex25_takaful/odex_takaful/security/ir.model.access.csv +++ b/odex25_takaful/odex_takaful/security/ir.model.access.csv @@ -54,4 +54,5 @@ access_replace_benefit_wizard,replace.benefit.wizard.access,model_replace_benefi access_group_esterdad_wizard,access_group_esterdad_wizard,model_esterdad_wizard,,1,1,1,0 access_group_otp_confirmation_wizard,access_group_otp_confirmation_wizard,model_otp_confirmation_wizard,,1,1,1,0 access_payment_machine,access_payment_machine,model_payment_machine,group_kufula_user,1,1,1,1 -access_payment_machine_manager,access_payment_machine_manager,model_payment_machine,sponsorship_system_manager_group,1,1,1,1 \ No newline at end of file +access_payment_machine_manager,access_payment_machine_manager,model_payment_machine,sponsorship_system_manager_group,1,1,1,1 +access_global_extension_wizard,access_global_extension_wizard,model_global_extension_wizard,,1,1,1,1 \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/views/global_extension_wizard_view.xml b/odex25_takaful/odex_takaful/views/global_extension_wizard_view.xml new file mode 100644 index 000000000..1f6e58163 --- /dev/null +++ b/odex25_takaful/odex_takaful/views/global_extension_wizard_view.xml @@ -0,0 +1,56 @@ + + + + + + global.extension.wizard.form + global.extension.wizard + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + Global Extension + ir.actions.act_window + global.extension.wizard + form + + new + + +
+
\ No newline at end of file diff --git a/odex25_takaful/odex_takaful/views/takaful_menus_actions.xml b/odex25_takaful/odex_takaful/views/takaful_menus_actions.xml index 477b84f07..dd6ffd42d 100644 --- a/odex25_takaful/odex_takaful/views/takaful_menus_actions.xml +++ b/odex25_takaful/odex_takaful/views/takaful_menus_actions.xml @@ -39,6 +39,12 @@ + + diff --git a/odex25_takaful/odex_takaful/wizards/__init__.py b/odex25_takaful/odex_takaful/wizards/__init__.py index 2b250a3b5..7b1f1c613 100644 --- a/odex25_takaful/odex_takaful/wizards/__init__.py +++ b/odex25_takaful/odex_takaful/wizards/__init__.py @@ -12,3 +12,4 @@ from . import add_benefit_wizard from . import replace_benefit_wizard from . import account_payment_register from . import esterdad +from . import global_extension_wizard diff --git a/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py new file mode 100644 index 000000000..cb9f3463b --- /dev/null +++ b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields, api + + +class GlobalExtensionWizard(models.TransientModel): + _name = 'global.extension.wizard' + _description = 'Global Extension Wizard' + + # Field for number of months + number_of_months = fields.Integer( + string='Number of Months', + required=True, + default=1 + ) + + # Field to select multiple donation lines + # Assumes the target model is 'donations.details.lines' as specified + line_ids = fields.Many2many( + comodel_name='donations.details.lines', + string='Donation Lines' + ) + + + def action_confirm(self): + """ + Empty method for the Confirm action. + You will implement the logic here. + """ + # Example logic access: + # for wizard in self: + # selected_lines = wizard.line_ids + # months = wizard.number_of_months + return {'type': 'ir.actions.act_window_close'} \ No newline at end of file From 16381c69e840e0eb94109442300bf04e6cadc3c0 Mon Sep 17 00:00:00 2001 From: Nossibaelhadi Date: Tue, 20 Jan 2026 13:02:17 +0300 Subject: [PATCH 15/40] [FIX] solve bugs from test 17 --- .../odex_takaful/models/takaful_sponorship_model.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py b/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py index 037084157..ee46b8110 100644 --- a/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py +++ b/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py @@ -1659,7 +1659,11 @@ class TakafulSponsorship(models.Model): else: pass #self.action_send_whatsapp() - + direct_debit_sponsorship_line_ids = (self.donations_details_lines | self.donations_details_lines_mechanism_ids).filtered( + lambda l: l.direct_debit) + for dd_line in direct_debit_sponsorship_line_ids: + for sched_line in dd_line.sponsorship_scheduling_line_ids: + sched_line.cron_process_scheduled_payments() def action_send_whatsapp(self): config = self.env['ir.config_parameter'].sudo() From 0f40bf09596222c4c2f2afb45b32c246adf6b5d1 Mon Sep 17 00:00:00 2001 From: MohamedGad100 Date: Tue, 20 Jan 2026 13:36:52 +0200 Subject: [PATCH 16/40] modify orphan final report --- .../odex_takaful/reports/orphan_report.xml | 649 ++++++++++-------- .../static/src/img/orphan-report-bg.png | Bin 0 -> 16827 bytes odex25_takaful/odex_takaful/views/assets.xml | 1 + 3 files changed, 361 insertions(+), 289 deletions(-) create mode 100644 odex25_takaful/odex_takaful/static/src/img/orphan-report-bg.png diff --git a/odex25_takaful/odex_takaful/reports/orphan_report.xml b/odex25_takaful/odex_takaful/reports/orphan_report.xml index c05e29ae5..f1ca2355b 100644 --- a/odex25_takaful/odex_takaful/reports/orphan_report.xml +++ b/odex25_takaful/odex_takaful/reports/orphan_report.xml @@ -17,315 +17,386 @@ From 4a8512bbed282d359f10c2236eec1dd73f57be1b Mon Sep 17 00:00:00 2001 From: MohamedGad100 Date: Tue, 20 Jan 2026 14:47:22 +0200 Subject: [PATCH 17/40] fix report strings spacing --- .../odex_takaful/reports/orphan_report.xml | 134 +++++++++--------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/odex25_takaful/odex_takaful/reports/orphan_report.xml b/odex25_takaful/odex_takaful/reports/orphan_report.xml index f1ca2355b..f168b5803 100644 --- a/odex25_takaful/odex_takaful/reports/orphan_report.xml +++ b/odex25_takaful/odex_takaful/reports/orphan_report.xml @@ -107,7 +107,7 @@ - - @@ -180,20 +180,20 @@ - - @@ -201,20 +201,20 @@ - - @@ -222,20 +222,20 @@ - - @@ -243,20 +243,20 @@ - - @@ -264,11 +264,11 @@ -
-

تقرير اليتيم

+

تقرير اليتيم

@@ -124,20 +124,20 @@ - - @@ -149,8 +149,8 @@
+ - - + +
اسم الكافلاسم الكافل
+ - - + +
رقم الجوالرقم الجوال
-

حين يصبح الأثر إنسانًا له اسم وقصة وابتسامة..
نعلم أن الكفالة ليست نهاية، بل بداية لعطاء مستدام، وأثر يصنع الفرق.

- ما بين الصفوف الدراسية، والهوايات الصغيرة والأمنيات البسيطة، نرفق لكم تقرير مفصل عن اليتيم المكفول: +

حين يصبح الأثر إنسانًا له اسم وقصة وابتسامة..
نعلم أن الكفالة ليست نهاية، بل بداية لعطاء مستدام، وأثر يصنع الفرق.

+ ما بين الصفوف الدراسية، والهوايات الصغيرة والأمنيات البسيطة، نرفق لكم تقرير مفصل عن اليتيم المكفول:
@@ -159,20 +159,20 @@
+ - - + +
اسم اليتيماسم اليتيم
+ - - + +
العمرالعمر
+ - - + +
رقم الملفرقم الملف
+ - - + +
تم الالتحاق في إنسان عامتم الالتحاق في إنسان عام
+ - - + +
عدد أفراد الأسرةعدد أفراد الأسرة
+ - - + +
الجنسيةالجنسية
+ - - + +
المرحلة الدراسيةالمرحلة الدراسية
+ - - + +
التقديرالتقدير
+ - - + +
الحالة الصحيةالحالة الصحية
+ - - + +
نوع السكننوع السكن
+ - - + --> - @@ -295,20 +295,20 @@ - - @@ -319,7 +319,7 @@ @@ -336,20 +336,20 @@ - - @@ -357,20 +357,20 @@ - - @@ -378,11 +378,11 @@ - From ef52dd6c86ab48b6f39993a928d73aa34b5c550e Mon Sep 17 00:00:00 2001 From: Nossibaelhadi Date: Tue, 20 Jan 2026 19:25:15 +0300 Subject: [PATCH 18/40] [FIX] solve bugs from test 18 --- odex25_takaful/odex_takaful/__manifest__.py | 1 + odex25_takaful/odex_takaful/i18n/ar_001.po | 36 ++++++++++++++++ .../wizards/account_payment_register.py | 3 +- .../wizards/global_extension_wizard.py | 35 ++++++++++----- .../wizards/global_extension_wizard.xml | 43 +++++++++++++++++++ 5 files changed, 106 insertions(+), 12 deletions(-) create mode 100644 odex25_takaful/odex_takaful/wizards/global_extension_wizard.xml diff --git a/odex25_takaful/odex_takaful/__manifest__.py b/odex25_takaful/odex_takaful/__manifest__.py index 19e9ee2c4..0970a8719 100644 --- a/odex25_takaful/odex_takaful/__manifest__.py +++ b/odex25_takaful/odex_takaful/__manifest__.py @@ -87,6 +87,7 @@ 'views/global_extension_wizard_view.xml', 'views/takaful_menus_actions.xml', 'views/benefit_category_views.xml', + 'wizards/global_extension_wizard.xml', 'data/message_template_data.xml', 'wizards/transfer_deduction_wizard_views.xml', diff --git a/odex25_takaful/odex_takaful/i18n/ar_001.po b/odex25_takaful/odex_takaful/i18n/ar_001.po index aa87750a2..5527b705b 100644 --- a/odex25_takaful/odex_takaful/i18n/ar_001.po +++ b/odex25_takaful/odex_takaful/i18n/ar_001.po @@ -7543,3 +7543,39 @@ msgstr "طريقة السداد (بالاسم)" #: model:ir.model.fields,field_description:odex_takaful.field_account_payment__payment_method_name msgid "Payment Method Name" msgstr "اسم طريقة السداد" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_global_extension_wizard__number_of_months +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" +msgstr "تاكيد" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_global_extension_wizard__line_ids +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_global_extension_wizard_form +msgid "Donation Lines" +msgstr "الكفالات" + +#. module: odex_takaful +#: code:addons/odex_takaful/wizards/global_extension_wizard.py:0 +#, python-format +msgid "Extend Donation" +msgstr "تمديد الكفالة" + +#. module: odex_takaful +#: model:ir.actions.act_window,name:odex_takaful.action_global_extension_wizard +#: model:ir.ui.menu,name:odex_takaful.menu_global_extension_wizard +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_global_extension_wizard_form +msgid "Global Extension" +msgstr "التمديد الشامل" + diff --git a/odex25_takaful/odex_takaful/wizards/account_payment_register.py b/odex25_takaful/odex_takaful/wizards/account_payment_register.py index 5fea90ff0..59748b28f 100644 --- a/odex25_takaful/odex_takaful/wizards/account_payment_register.py +++ b/odex25_takaful/odex_takaful/wizards/account_payment_register.py @@ -109,7 +109,8 @@ class AccountRegisterPayment(models.TransientModel): """Override to always group payments for sponsorship - simpler UX""" for wizard in self: # Always group payments when in sponsorship context - if self.env.context.get('sponsorship_payment'): + # if self.env.context.get('sponsorship_payment'): + if self.env.context.get('sponsorship_payment') and self.show_payment_group: wizard.group_payment = True else: # Fall back to default Odoo behavior diff --git a/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py index cb9f3463b..72f3bd81e 100644 --- a/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py +++ b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from odoo import models, fields, api +from odoo import models, fields, api, _ class GlobalExtensionWizard(models.TransientModel): @@ -17,17 +17,30 @@ class GlobalExtensionWizard(models.TransientModel): # Assumes the target model is 'donations.details.lines' as specified line_ids = fields.Many2many( comodel_name='donations.details.lines', - string='Donation Lines' + string='Donation Lines', + domain=[] ) + @api.onchange('line_ids') + def _onchange_line_ids_domain(self): + allowed_ids = self.env['donations.details.lines'].sudo().search([ + ('record_type', '=', 'sponsorship'), + ('sponsorship_duration', '=', 'temporary'), + ('state', 'in', ['active', 'replace']) + ]).ids + return {'domain': {'line_ids': [('id', 'in', allowed_ids)]}} + def action_confirm(self): - """ - Empty method for the Confirm action. - You will implement the logic here. - """ - # Example logic access: - # for wizard in self: - # selected_lines = wizard.line_ids - # months = wizard.number_of_months - return {'type': 'ir.actions.act_window_close'} \ No newline at end of file + return { + 'type': 'ir.actions.act_window', + 'name': _('Extend Donation'), + 'res_model': 'donation.extension.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'donation_detail_ids': self.line_ids.ids, + 'default_months': self.number_of_months, + 'no_quick_close': True + }, + } \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/wizards/global_extension_wizard.xml b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.xml new file mode 100644 index 000000000..8fecc6c13 --- /dev/null +++ b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.xml @@ -0,0 +1,43 @@ + + + + + + global.extension.wizard.form + global.extension.wizard + +
+ + + + + + + + + + + + + + + + + +
+
+ + +
+
+ +
From 35c6bf2c757e62b4895952d4dab61062d27d7b55 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 20 Jan 2026 20:41:56 +0100 Subject: [PATCH 19/40] [UPD] odex_takaful --- odex25_takaful/odex_takaful/__manifest__.py | 3 +- .../models/donation_details_lines.py | 5 +++ .../wizards/account_payment_register.py | 10 ++++- .../wizards/donation_extension_wizard.py | 34 ++++++++++----- .../wizards/global_extension_wizard.py | 33 +++++--------- .../wizards/global_extension_wizard.xml | 43 ------------------- .../global_extension_wizard_view.xml | 19 +++++--- 7 files changed, 59 insertions(+), 88 deletions(-) delete mode 100644 odex25_takaful/odex_takaful/wizards/global_extension_wizard.xml rename odex25_takaful/odex_takaful/{views => wizards}/global_extension_wizard_view.xml (73%) diff --git a/odex25_takaful/odex_takaful/__manifest__.py b/odex25_takaful/odex_takaful/__manifest__.py index 0970a8719..eb21b1319 100644 --- a/odex25_takaful/odex_takaful/__manifest__.py +++ b/odex25_takaful/odex_takaful/__manifest__.py @@ -84,10 +84,9 @@ 'views/product_views.xml', 'views/payment_machine_views.xml', 'views/account_payment_views.xml', - 'views/global_extension_wizard_view.xml', + 'wizards/global_extension_wizard_view.xml', 'views/takaful_menus_actions.xml', 'views/benefit_category_views.xml', - 'wizards/global_extension_wizard.xml', 'data/message_template_data.xml', 'wizards/transfer_deduction_wizard_views.xml', diff --git a/odex25_takaful/odex_takaful/models/donation_details_lines.py b/odex25_takaful/odex_takaful/models/donation_details_lines.py index 587624e0a..d1ec0031d 100644 --- a/odex25_takaful/odex_takaful/models/donation_details_lines.py +++ b/odex25_takaful/odex_takaful/models/donation_details_lines.py @@ -1441,3 +1441,8 @@ class DonationsDetailsLines(models.Model): if self.env.context.get('wizard_force_show_all'): self = self.sudo() return super(DonationsDetailsLines, self).search(args, offset, limit, order, count) + + def read(self, fields=None, load='_classic_read'): + if self.env.context.get('wizard_force_show_all'): + self = self.sudo() + return super(DonationsDetailsLines, self).read(fields, load) diff --git a/odex25_takaful/odex_takaful/wizards/account_payment_register.py b/odex25_takaful/odex_takaful/wizards/account_payment_register.py index 59748b28f..fdfe4078e 100644 --- a/odex25_takaful/odex_takaful/wizards/account_payment_register.py +++ b/odex25_takaful/odex_takaful/wizards/account_payment_register.py @@ -58,6 +58,8 @@ class AccountRegisterPayment(models.TransientModel): sponsorship_id = self.env.context.get('default_takaful_sponsorship_id') or self.env.context.get('active_id') if sponsorship_id: sponsorship = self.env['takaful.sponsorship'].browse(sponsorship_id) + if self.env.context.get('wizard_force_show_all'): + sponsorship = sponsorship.sudo() if sponsorship.exists() and sponsorship.branch_custom_id: return self.env['payment.machine'].search([ ('branch_custom_id', '=', sponsorship.branch_custom_id.id), @@ -193,8 +195,12 @@ class AccountRegisterPayment(models.TransientModel): def _create_payments(self): sponsorship_line_ids = self.env.context.get('sponsorship_line_ids') - sponsorship_lines = self.env['donations.details.lines'].browse(sponsorship_line_ids).filtered( - lambda r: r.display_type == False) + if self.env.context.get('wizard_force_show_all'): + sponsorship_lines = self.env['donations.details.lines'].sudo().browse(sponsorship_line_ids).filtered( + lambda r: r.display_type == False) + else: + sponsorship_lines = self.env['donations.details.lines'].browse(sponsorship_line_ids).filtered( + lambda r: r.display_type == False) sponsorship = self.env['takaful.sponsorship'].browse(self.env.context.get('sponsorship_id')) payments = super(AccountRegisterPayment, self)._create_payments() if sponsorship_lines: diff --git a/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py b/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py index 21c0c55a5..018f3d60d 100644 --- a/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py +++ b/odex25_takaful/odex_takaful/wizards/donation_extension_wizard.py @@ -68,6 +68,8 @@ class DonationExtensionWizard(models.TransientModel): def _compute_line_ids(self): extension_line_ids = [(5,)] donation_detail_ids = self.env['donations.details.lines'].browse(self.env.context.get('donation_detail_ids')) + if self.env.context.get('wizard_force_show_all'): + donation_detail_ids = donation_detail_ids.sudo() for line in donation_detail_ids: if line.record_type == 'donation' or line.sponsorship_duration == 'permanent': raise ValidationError(_("Only donation with direct debit or sponsorship can be extended. Line: %s") % line.name) @@ -115,8 +117,11 @@ class DonationExtensionWizard(models.TransientModel): donation_line_ids += result[1] if invoice_ids: + line_ids = self.line_ids + if self.env.context.get('wizard_force_show_all'): + line_ids = line_ids.sudo() # Get unique sponsorship IDs and take the first one (they should be same in normal use) - sponsorship_ids = list(set(self.line_ids.mapped('donation_line_id.sponsorship_mechanism_id.id'))) + sponsorship_ids = list(set(line_ids.mapped('donation_line_id.sponsorship_mechanism_id.id'))) sponsorship_id = sponsorship_ids[0] if sponsorship_ids else False return { @@ -129,13 +134,13 @@ class DonationExtensionWizard(models.TransientModel): 'default_amount': amount, 'sponsorship_payment_skip_compute_amount': True, 'dont_redirect_to_payments': True, - 'sponsorship_line_ids': self.line_ids.donation_line_id.ids, + 'sponsorship_line_ids': line_ids.donation_line_id.ids, 'sponsorship_payment': True, 'default_sponsorship_payment': True, 'wiz_id': self.id, 'sponsorship_id': sponsorship_id, 'default_takaful_sponsorship_id': sponsorship_id, - 'force_sponsorship_line_partner_id': self.line_ids.mapped('partner_id')[:1].id, + 'force_sponsorship_line_partner_id': line_ids.mapped('partner_id')[:1].id, }, 'target': 'new', 'type': 'ir.actions.act_window', @@ -344,10 +349,15 @@ class DonationExtensionWizardLine(models.TransientModel): if not self.donation_line_id: raise ValidationError(_("No donation detail line selected.")) + + donation_line_id = self.donation_line_id + if self.env.context.get('wizard_force_show_all'): + donation_line_id = self.donation_line_id.sudo() + if not self.extension_invoice_id: # Update the donation detail line self.old_end_date = self.current_end_date - self.old_payment_month_count = self.donation_line_id.payment_month_count + self.old_payment_month_count = donation_line_id.payment_month_count new_end_date = self.current_end_date + relativedelta(months=self.months) old_end_date = self.current_end_date @@ -355,7 +365,7 @@ class DonationExtensionWizardLine(models.TransientModel): # Update end date # donation_line_new_vals = { # 'end_date': new_end_date, - # 'payment_month_count': self.donation_line_id.payment_month_count + self.months, + # 'payment_month_count': donation_line_id.payment_month_count + self.months, # } # if self.direct_debit: # donation_line_new_vals.update({ @@ -365,9 +375,9 @@ class DonationExtensionWizardLine(models.TransientModel): # 'debit_payment_file_attachment': self.debit_payment_file_attachment, # 'debit_payment_attachment_file_name': self.debit_payment_attachment_file_name, # }) - # self.donation_line_id.write(donation_line_new_vals) + # donation_line_id.write(donation_line_new_vals) - # benefit_ids = self.donation_line_id.benefit_ids | self.donation_line_id.benefit_id + # benefit_ids = donation_line_id.benefit_ids | donation_line_id.benefit_id # benefit_ids.write({ # 'sponsorship_end_date': new_end_date, # 'kafala_status': 'have_kafala', @@ -383,14 +393,14 @@ class DonationExtensionWizardLine(models.TransientModel): # Create extension history record self.env['donation.extension.history'].create({ - 'donation_detail_id': self.donation_line_id.id, - 'sponsorship_id': self.donation_line_id.sponsorship_id.id or self.donation_line_id.sponsorship_mechanism_id.id, + 'donation_detail_id': donation_line_id.id, + 'sponsorship_id': donation_line_id.sponsorship_id.id or donation_line_id.sponsorship_mechanism_id.id, 'extension_amount': self.total_donation_amount, 'extension_months': self.months, 'old_end_date': old_end_date, 'new_end_date': new_end_date, 'invoice_id': invoice_id.id if invoice_id else False, - 'old_direct_debit': self.donation_line_id.direct_debit, + 'old_direct_debit': donation_line_id.direct_debit, 'new_direct_debit': self.direct_debit, 'direct_debit_partner_bank_id': self.direct_debit_partner_bank_id.id, @@ -402,7 +412,7 @@ class DonationExtensionWizardLine(models.TransientModel): }) if not self.direct_debit: - return self.extension_invoice_id, self.donation_line_id + return self.extension_invoice_id, donation_line_id return False @@ -446,6 +456,8 @@ class DonationExtensionWizardLine(models.TransientModel): self.ensure_one() donation_line = self.donation_line_id + if self.env.context.get('wizard_force_show_all'): + donation_line = self.donation_line_id.sudo() sponsorship = donation_line.sponsorship_id or donation_line.sponsorship_mechanism_id # Get journal from settings diff --git a/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py index 72f3bd81e..62e5f23c7 100644 --- a/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py +++ b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.py @@ -6,41 +6,28 @@ class GlobalExtensionWizard(models.TransientModel): _name = 'global.extension.wizard' _description = 'Global Extension Wizard' - # Field for number of months - number_of_months = fields.Integer( - string='Number of Months', - required=True, - default=1 - ) - - # Field to select multiple donation lines - # Assumes the target model is 'donations.details.lines' as specified line_ids = fields.Many2many( comodel_name='donations.details.lines', - string='Donation Lines', - domain=[] + string='Donation Lines' ) - @api.onchange('line_ids') - def _onchange_line_ids_domain(self): - allowed_ids = self.env['donations.details.lines'].sudo().search([ - ('record_type', '=', 'sponsorship'), - ('sponsorship_duration', '=', 'temporary'), - ('state', 'in', ['active', 'replace']) - ]).ids - return {'domain': {'line_ids': [('id', 'in', allowed_ids)]}} + @api.model + def create(self, vals): + return super(GlobalExtensionWizard, self.sudo()).create(vals) def action_confirm(self): + wizard_sudo = self.sudo() + return { 'type': 'ir.actions.act_window', - 'name': _('Extend Donation'), + 'name': ('Extend Donation'), 'res_model': 'donation.extension.wizard', 'view_mode': 'form', 'target': 'new', 'context': { - 'donation_detail_ids': self.line_ids.ids, - 'default_months': self.number_of_months, - 'no_quick_close': True + 'donation_detail_ids': wizard_sudo.line_ids.ids, + 'no_quick_close': True, + 'wizard_force_show_all': True }, } \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/wizards/global_extension_wizard.xml b/odex25_takaful/odex_takaful/wizards/global_extension_wizard.xml deleted file mode 100644 index 8fecc6c13..000000000 --- a/odex25_takaful/odex_takaful/wizards/global_extension_wizard.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - global.extension.wizard.form - global.extension.wizard - -
- - - - - - - - - - - - - - - - - -
-
- - -
-
- -
diff --git a/odex25_takaful/odex_takaful/views/global_extension_wizard_view.xml b/odex25_takaful/odex_takaful/wizards/global_extension_wizard_view.xml similarity index 73% rename from odex25_takaful/odex_takaful/views/global_extension_wizard_view.xml rename to odex25_takaful/odex_takaful/wizards/global_extension_wizard_view.xml index 1f6e58163..ee2c1d23d 100644 --- a/odex25_takaful/odex_takaful/views/global_extension_wizard_view.xml +++ b/odex25_takaful/odex_takaful/wizards/global_extension_wizard_view.xml @@ -6,16 +6,17 @@ global.extension.wizard.form global.extension.wizard -
+ - - - - - - + @@ -50,6 +51,10 @@ form new + { + 'wizard_force_show_all': True, + 'active_test': False + } From f49328b776ea74a18db3f80bc672ffca52a9bab0 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 20 Jan 2026 20:55:17 +0100 Subject: [PATCH 20/40] [UPD] odex_takaful --- .../odex_takaful/models/donation_extension_history.py | 10 ++++++++++ .../views/donation_extension_history_views.xml | 1 + 2 files changed, 11 insertions(+) diff --git a/odex25_takaful/odex_takaful/models/donation_extension_history.py b/odex25_takaful/odex_takaful/models/donation_extension_history.py index 74e583f55..677571e65 100644 --- a/odex25_takaful/odex_takaful/models/donation_extension_history.py +++ b/odex25_takaful/odex_takaful/models/donation_extension_history.py @@ -257,6 +257,16 @@ class DonationExtensionHistory(models.Model): 'type': 'ir.actions.act_window', } + def action_cancel_invoice(self): + self.ensure_one() + + self.sudo().invoice_id.button_draft() + self.sudo().invoice_id.button_cancel() + + self.write({ + 'state': 'cancel' + }) + def action_print_extension_receipt(self): """Print the extension receipt PDF report.""" self.ensure_one() diff --git a/odex25_takaful/odex_takaful/views/donation_extension_history_views.xml b/odex25_takaful/odex_takaful/views/donation_extension_history_views.xml index c600318b9..bf8f285d5 100644 --- a/odex25_takaful/odex_takaful/views/donation_extension_history_views.xml +++ b/odex25_takaful/odex_takaful/views/donation_extension_history_views.xml @@ -31,6 +31,7 @@
From 163a8930d8a8d27148d7deb76b60edaf5cb30c53 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 21 Jan 2026 12:30:44 +0100 Subject: [PATCH 25/40] [UPD] odex_takaful --- odex25_takaful/odex_takaful/i18n/ar_001.po | 1 + .../odex_takaful/views/takaful_sponorship_view.xml | 1 + .../odex_takaful/wizards/global_extension_wizard_view.xml | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/odex25_takaful/odex_takaful/i18n/ar_001.po b/odex25_takaful/odex_takaful/i18n/ar_001.po index 5527b705b..e791b6760 100644 --- a/odex25_takaful/odex_takaful/i18n/ar_001.po +++ b/odex25_takaful/odex_takaful/i18n/ar_001.po @@ -5953,6 +5953,7 @@ msgstr "تأكيد الكفالة - ${object.sponsor_id.name}" #: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__sponsorship_creation_date #: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__sponsorship_creation_date #: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_view_search #, python-format msgid "Sponsorship Creation Date" msgstr "تاريخ الإنشاء" diff --git a/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml b/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml index 70c1c9b99..27603185a 100644 --- a/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml +++ b/odex25_takaful/odex_takaful/views/takaful_sponorship_view.xml @@ -872,6 +872,7 @@ domain="[('state', '=', 'replacement_done')]"/> + diff --git a/odex25_takaful/odex_takaful/wizards/global_extension_wizard_view.xml b/odex25_takaful/odex_takaful/wizards/global_extension_wizard_view.xml index e1ddb4a64..a42ce4bb8 100644 --- a/odex25_takaful/odex_takaful/wizards/global_extension_wizard_view.xml +++ b/odex25_takaful/odex_takaful/wizards/global_extension_wizard_view.xml @@ -11,6 +11,9 @@ + + + @@ -37,7 +40,7 @@ - + From 83ab683b355b1bc503d1d511c2009eab557d4777 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 22 Jan 2026 04:30:42 +0100 Subject: [PATCH 26/40] [UPD] odex_takaful: mother/orphan report --- .../data/ir_actions_server_data.xml | 14 +-- odex25_takaful/odex_takaful/i18n/ar_001.po | 12 +-- .../odex_takaful/models/family_member.py | 4 +- .../odex_takaful/reports/orphan_report.xml | 97 ++++++++----------- 4 files changed, 49 insertions(+), 78 deletions(-) diff --git a/odex25_takaful/odex_takaful/data/ir_actions_server_data.xml b/odex25_takaful/odex_takaful/data/ir_actions_server_data.xml index 4395c74fa..faa124192 100644 --- a/odex25_takaful/odex_takaful/data/ir_actions_server_data.xml +++ b/odex25_takaful/odex_takaful/data/ir_actions_server_data.xml @@ -1,20 +1,12 @@ - - Print/Send Orphan Report + + Print Mother/Orphan Report code - action = records.server_action_print_and_send_orphan_reports() + action = records.server_action_print_mother_and_orphan_reports() - - \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/i18n/ar_001.po b/odex25_takaful/odex_takaful/i18n/ar_001.po index e791b6760..f1bd7971d 100644 --- a/odex25_takaful/odex_takaful/i18n/ar_001.po +++ b/odex25_takaful/odex_takaful/i18n/ar_001.po @@ -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 "طباعة تقرير أم اليتيم/اليتيم" diff --git a/odex25_takaful/odex_takaful/models/family_member.py b/odex25_takaful/odex_takaful/models/family_member.py index 16f3e0177..6c66ba8aa 100644 --- a/odex25_takaful/odex_takaful/models/family_member.py +++ b/odex25_takaful/odex_takaful/models/family_member.py @@ -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 = [] diff --git a/odex25_takaful/odex_takaful/reports/orphan_report.xml b/odex25_takaful/odex_takaful/reports/orphan_report.xml index f168b5803..fc4fa6501 100644 --- a/odex25_takaful/odex_takaful/reports/orphan_report.xml +++ b/odex25_takaful/odex_takaful/reports/orphan_report.xml @@ -12,10 +12,11 @@ 0 0 0 + 100 -
عنوان الأسرة + عنوان الأسرة + - - + +
مبلغ الإيجارمبلغ الإيجار
+ - - + +
حالة الأسرةحالة الأسرة
+ - - + +
تاريخ نهاية الكفالةتاريخ نهاية الكفالة
- +
مصادر دخل الأسرةمصادر دخل الأسرة
+ - - + +
الضمان الاجتماعيالضمان الاجتماعي
+ - - + +
راتب الأمراتب الأم
+ - - + +
الراتب التقاعديالراتب التقاعدي
+ - - + +
التأمينات الاجتماعيةالتأمينات الاجتماعية
+ - - + +
المجموعالمجموع