diff --git a/odex25_ensan/odex_benefit/i18n/ar_001.po b/odex25_ensan/odex_benefit/i18n/ar_001.po index ec48d338f..d57e2cbf5 100644 --- a/odex25_ensan/odex_benefit/i18n/ar_001.po +++ b/odex25_ensan/odex_benefit/i18n/ar_001.po @@ -2505,8 +2505,8 @@ msgstr "" #. module: odex_benefit #: model:ir.actions.act_window,name:odex_benefit.grant_benefit_dashboard_action -msgid "Benefits Dashboard" -msgstr "لوحة معلومات" +msgid "Family Profile" +msgstr "ملفات الاسر" #. module: odex_benefit #: model:ir.model.fields,field_description:odex_benefit.field_generate_reports__benefits_need_ids @@ -3848,8 +3848,8 @@ msgstr "رتبة العميل" #. module: odex_benefit #: model:ir.ui.menu,name:odex_benefit.benefit_dashboard_menu -msgid "Dashboard" -msgstr "لوحات المعلومات" +msgid "Family Profile" +msgstr "ملفات الاسر" #. module: odex_benefit #: model:ir.model.fields,field_description:odex_benefit.field_benefit_zkat_line__date @@ -10453,6 +10453,7 @@ msgstr "طلبات الخدمات" #: model:ir.model.fields,field_description:odex_benefit.field_home_restoration_lines__services_settings_id #: model:ir.model.fields,field_description:odex_benefit.field_rent_lines__services_settings_id #: model:ir.ui.menu,name:odex_benefit.services_settings_menu +#: model:ir.ui.menu,name:odex_benefit.benefit_tools_services_settings_menu #: model_terms:ir.ui.view,arch_db:odex_benefit.services_settings_form #: model_terms:ir.ui.view,arch_db:odex_benefit.services_settings_tree msgid "Services Settings" @@ -14683,21 +14684,25 @@ msgstr "اسم مقدم الطلب" #. module: odex_benefit #: model:ir.model.fields.selection,name:odex_benefit.selection__grant_benefit__state__new +#: model_terms:ir.ui.view,arch_db:odex_benefit.grant_benefit_search msgid "Researcher Assignment" msgstr "اسناد الاخصائي" #. module: odex_benefit #: model:ir.model.fields.selection,name:odex_benefit.selection__grant_benefit__state__complete_info +#: model_terms:ir.ui.view,arch_db:odex_benefit.grant_benefit_search msgid "Waiting for Researcher" msgstr "بانتظار الاخصائي" #. module: odex_benefit #: model:ir.model.fields.selection,name:odex_benefit.selection__grant_benefit__state__waiting_approve +#: model_terms:ir.ui.view,arch_db:odex_benefit.grant_benefit_search msgid "Waiting for Operation Manager" msgstr "بانتظار رئيسة العمليات" #. module: odex_benefit #: model:ir.model.fields.selection,name:odex_benefit.selection__grant_benefit__state__first_approve +#: model_terms:ir.ui.view,arch_db:odex_benefit.grant_benefit_search msgid "Waiting for Branch Manager" msgstr "بانتظار مدير الفرع" diff --git a/odex25_ensan/odex_benefit/models/benefit.py b/odex25_ensan/odex_benefit/models/benefit.py index ea55f35ca..c36c3f129 100644 --- a/odex25_ensan/odex_benefit/models/benefit.py +++ b/odex25_ensan/odex_benefit/models/benefit.py @@ -1093,6 +1093,9 @@ class GrantBenefitProfile(models.Model): if not force_unlink and record.state not in ['draft']: raise UserError(_('You cannot delete this record')) + if record.member_ids: + record.member_ids.unlink() + if not skip_user and record.user_id: other_benefits = self.env['grant.benefit'].search([ ('user_id', '=', record.user_id.id), diff --git a/odex25_ensan/odex_benefit/models/education_status.py b/odex25_ensan/odex_benefit/models/education_status.py index 447e1d011..1e1a9d859 100644 --- a/odex25_ensan/odex_benefit/models/education_status.py +++ b/odex25_ensan/odex_benefit/models/education_status.py @@ -7,7 +7,7 @@ class EducationStatus(models.Model): mother_grant_benefit_id = fields.Many2one('grant.benefit', string='Grant Benefit') replacement_grant_benefit_id = fields.Many2one('grant.benefit', string='Grant Benefit') - family_member_id = fields.Many2one('family.member', string='Grant Benefit',ondelete="restrict") + family_member_id = fields.Many2one('family.member', string='Grant Benefit') name = fields.Char( string="Sequence", diff --git a/odex25_ensan/odex_benefit/models/family_members.py b/odex25_ensan/odex_benefit/models/family_members.py index b3613e108..90fcbac09 100644 --- a/odex25_ensan/odex_benefit/models/family_members.py +++ b/odex25_ensan/odex_benefit/models/family_members.py @@ -293,6 +293,24 @@ class FamilyMemberProfile(models.Model): for order in self: if order.state not in ['draft']: raise UserError(_('You cannot delete this record')) + # if order.attachment_ids: + # order.attachment_ids.unlink() + # if order.hobbies_attachment_ids: + # order.hobbies_attachment_ids.unlink() + # if order.diseases_attachment_ids: + # order.diseases_attachment_ids.unlink() + # if order.disabilities_attachment_ids: + # order.disabilities_attachment_ids.unlink() + self.env['ir.attachment'].search([('member_id', 'in', order.id)]).unlink() + if order.hobbies_ids: + order.hobbies_ids.unlink() + if order.diseases_ids: + order.diseases_ids.unlink() + if order.disabilities_ids: + order.disabilities_ids.unlink() + if order.member_education_status_ids: + order.member_education_status_ids.unlink() + return super(FamilyMemberProfile, self).unlink() @api.depends('is_member_workflow', 'benefit_id.state','state_a') diff --git a/odex25_ensan/odex_benefit/models/member_disabilities.py b/odex25_ensan/odex_benefit/models/member_disabilities.py index 839d80e65..9b8a0152e 100644 --- a/odex25_ensan/odex_benefit/models/member_disabilities.py +++ b/odex25_ensan/odex_benefit/models/member_disabilities.py @@ -4,7 +4,7 @@ class MemberDisabilities(models.Model): _name = 'member.disabilities' name = fields.Char(string="Name") - member_id = fields.Many2one('family.member',string="Member",ondelete="restrict") + member_id = fields.Many2one('family.member',string="Member") disabilities_id = fields.Many2one('disabilities.settings', string="disability") disability_attach = fields.Binary(attachment=True, string="disability Attach") expiration_date = fields.Date(string='Expiration date') diff --git a/odex25_ensan/odex_benefit/models/member_diseases.py b/odex25_ensan/odex_benefit/models/member_diseases.py index 87612f612..a1edb5c44 100644 --- a/odex25_ensan/odex_benefit/models/member_diseases.py +++ b/odex25_ensan/odex_benefit/models/member_diseases.py @@ -4,7 +4,7 @@ class MemberDiseases(models.Model): _name = 'member.diseases' name = fields.Char(string="Name") - member_id = fields.Many2one('family.member',string="Member",ondelete="restrict") + member_id = fields.Many2one('family.member',string="Member") diseases_id = fields.Many2one('diseases.settings', string="Disease") disease_attach = fields.Binary(attachment=True, string="Diseases Attach") expiration_date = fields.Date(string='Expiration date') diff --git a/odex25_ensan/odex_benefit/models/members_hobbies.py b/odex25_ensan/odex_benefit/models/members_hobbies.py index 7f08f86ea..de373c697 100644 --- a/odex25_ensan/odex_benefit/models/members_hobbies.py +++ b/odex25_ensan/odex_benefit/models/members_hobbies.py @@ -4,7 +4,7 @@ class MemberHobbies(models.Model): _name = 'member.hobbies' name = fields.Char(string="Name") - member_id = fields.Many2one('family.member',string="Member",ondelete="restrict") + member_id = fields.Many2one('family.member',string="Member") hobbies_id = fields.Many2one('hobbies.settings',string="Hobby") hobby_attach = fields.Binary(attachment=True,string="Hobby Attach") expiration_date = fields.Date(string='Expiration date') diff --git a/odex25_ensan/odex_benefit/views/actions_and_menus.xml b/odex25_ensan/odex_benefit/views/actions_and_menus.xml index beb30a806..2beb1f7b2 100644 --- a/odex25_ensan/odex_benefit/views/actions_and_menus.xml +++ b/odex25_ensan/odex_benefit/views/actions_and_menus.xml @@ -3,7 +3,7 @@ - Benefits Dashboard + Family Profile grant.benefit kanban,form,tree,activity,google_map @@ -766,10 +766,10 @@ - + + + parent="benefits_root_menu" sequence="3"/> @@ -779,25 +779,25 @@ - - + + - - - - - - - - - + + + + + + + + + + + + + + @@ -825,12 +825,12 @@ - - @@ -1017,19 +1017,22 @@ + + + + - + parent="odex_benefit.benefit_tools_services_settings_menu" action="services_settings_action" groups="odex_benefit.group_benefit_manager"/> - + + + parent="benefit_main_menu" action="family_member_action" sequence="0"/> - -
- - - - - - - - - - - - - - - -
-
@@ -1147,6 +1105,48 @@ attrs="{'required':[('state','not in',['draft','new'])]}"/> + + + + + + + + + + + + + + + + + + + @@ -1417,34 +1417,34 @@ - - + + + + + + + + - - - - - - - - - -