Merge remote-tracking branch 'source_origin/dev_odex25_takaful' into dev_odex25_takaful

This commit is contained in:
maltayyar2 2026-01-25 22:07:28 +03:00
commit 6da0b8a63c
5 changed files with 27 additions and 10 deletions

View File

@ -7586,4 +7586,9 @@ msgstr "طباعة تقرير أم اليتيم/اليتيم"
#. module: odex_takaful #. module: odex_takaful
#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_account_move_inherit_form #: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_account_move_inherit_form
msgid "Previous Payments" msgid "Previous Payments"
msgstr "المدفوعات السابقة" msgstr "المدفوعات السابقة"
#. module: odex_takaful
#: model:res.groups,name:odex_takaful.group_refund_change_mobile
msgid "Change Sponsor Mobile in Refund Wizard"
msgstr "تغيير جوال الكافل في معالج الاسترداد"

View File

@ -6,6 +6,7 @@
<t t-call="web.html_container"> <t t-call="web.html_container">
<!-- Get all extension history records for the same invoice --> <!-- Get all extension history records for the same invoice -->
<t t-foreach="docs" t-as="o"> <t t-foreach="docs" t-as="o">
<t t-set="o" t-value="o.sudo()"/>
<t t-set="invoice_id" t-value="o.invoice_id"/> <t t-set="invoice_id" t-value="o.invoice_id"/>
<t t-set="sponsorship" t-value="o.donation_detail_id.sponsorship_mechanism_id"/> <t t-set="sponsorship" t-value="o.donation_detail_id.sponsorship_mechanism_id"/>

View File

@ -92,11 +92,16 @@
<field name="implied_ids" eval="[(6, 0, [ref('group_kufula_user')])]"/> <field name="implied_ids" eval="[(6, 0, [ref('group_kufula_user')])]"/>
</record> </record>
<record id="group_sponsor_department_access" model="res.groups"> <record id="group_sponsor_department_access" model="res.groups">
<field name="name">Sponsor - Department Access</field> <field name="name">Sponsor - Department Access</field>
<field name="category_id" ref="module_category_kufula"/> <field name="category_id" ref="module_category_kufula"/>
</record> </record>
<record id="group_refund_change_mobile" model="res.groups">
<field name="name">Change Sponsor Mobile in Refund Wizard</field>
<field name="category_id" ref="module_category_kufula"/>
</record>
<record id="donation_officer_restrictions" model="ir.rule"> <record id="donation_officer_restrictions" model="ir.rule">
<field name="name">Donations Officer: Own Donations</field> <field name="name">Donations Officer: Own Donations</field>
<field name="model_id" ref="model_takaful_sponsorship"/> <field name="model_id" ref="model_takaful_sponsorship"/>
@ -163,7 +168,7 @@
<field name="domain_force">[ <field name="domain_force">[
'|', '|',
('branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False]), ('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_custom_id', '=', user.branch_custom_id.id)
]</field> ]</field>
</record> </record>
@ -174,10 +179,10 @@
<field name="domain_force">[ <field name="domain_force">[
'|', '|', '|', '|', '|', '|',
('sponsorship_id.branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False]), ('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_id.branch_custom_id', '=', user.branch_custom_id.id),
('sponsorship_mechanism_id.branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False]), ('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) ('sponsorship_mechanism_id.branch_custom_id', '=', user.branch_custom_id.id)
]</field> ]</field>
</record> </record>
@ -189,11 +194,11 @@
'|', '|', '|', '|', '|', '|', '|', '|',
('create_uid', '=', user.id), ('create_uid', '=', user.id),
('create_uid.employee_id.department_id.manager_id.user_id', 'in', [user.id, False]), ('create_uid.branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False]),
('create_uid.employee_id.department_id', 'child_of', user.employee_id.department_id.id), ('create_uid.branch_custom_id', '=', user.branch_custom_id.id),
('sponsorship_id.branch_custom_id.branch.manager_id.user_id', 'in', [user.id, False]), ('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_id.branch_custom_id', '=', user.branch_custom_id.id)
]</field> ]</field>
</record> </record>
@ -201,7 +206,7 @@
<field name="name">Sponsor - Department Based Access</field> <field name="name">Sponsor - Department Based Access</field>
<field name="model_id" ref="odex_takaful.model_takaful_sponsor"/> <field name="model_id" ref="odex_takaful.model_takaful_sponsor"/>
<field name="groups" eval="[(4, ref('group_sponsor_department_access')), (4, ref('branch_manager_group'))]"/> <field name="groups" eval="[(4, ref('group_sponsor_department_access')), (4, ref('branch_manager_group'))]"/>
<field name="domain_force">[('branch_custom_id.branch', 'child_of', user.employee_id.department_id.id)]</field> <field name="domain_force">[('branch_custom_id', '=', user.branch_custom_id.id)]</field>
</record> </record>
<record id="sponsorship_system_manager_restrictions" model="ir.rule"> <record id="sponsorship_system_manager_restrictions" model="ir.rule">

View File

@ -147,8 +147,13 @@ class EsterdadWizard(models.Model):
rec.sponsor_id.write({ rec.sponsor_id.write({
'cancel_record_id': rec.id 'cancel_record_id': rec.id
}) })
rec.sponsor_id.sponsor_id.write({
'first_name': rec.sponsor_name
})
if rec.sponsor_id.sponsor_or_donor_type == 'unknown' and not rec.sponsor_id.sponsor_phone: if rec.sponsor_id.sponsor_or_donor_type == 'unknown' and not rec.sponsor_id.sponsor_phone:
rec.sponsor_id.sponsor_phone = rec.mobile rec.sponsor_id.sponsor_phone = rec.mobile
if rec.sponsor_id.sponsor_or_donor_type == 'registered' and rec.id_num:
rec.sponsor_id.sponsor_id.id_number == rec.id_num
# context['default_payment_ids'] = [(6, 0, rec.payment_ids.ids)] # context['default_payment_ids'] = [(6, 0, rec.payment_ids.ids)]
view = self.env.ref('odex_takaful.view_otp_wizard_form') view = self.env.ref('odex_takaful.view_otp_wizard_form')
return { return {

View File

@ -50,7 +50,8 @@
<page string="بيانات المتبرع"> <page string="بيانات المتبرع">
<group> <group>
<field name="sponsor_name"/> <field name="sponsor_name"/>
<field name="mobile"/> <field name="mobile" groups="odex_takaful.group_refund_change_mobile" />
<field name="mobile" groups="!odex_takaful.group_refund_change_mobile" readonly="1" />
<field name="id_num"/> <field name="id_num"/>
</group> </group>
</page> </page>