From cb0ff78a90c3ffbf61f0f5153f288e48a7180403 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 15 Jan 2026 11:31:57 +0100 Subject: [PATCH] [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"/>