diff --git a/odex25_ensan/odex_takaful/i18n/ar_001.po b/odex25_ensan/odex_takaful/i18n/ar_001.po index ec0a7582b..5f2b6b44c 100644 --- a/odex25_ensan/odex_takaful/i18n/ar_001.po +++ b/odex25_ensan/odex_takaful/i18n/ar_001.po @@ -3226,7 +3226,7 @@ msgstr "عمليات الكفالة" #: model:ir.ui.menu,name:odex_takaful.kafalat_main_menu #: model_terms:ir.ui.view,arch_db:odex_takaful.view_takaful_sponsor_form msgid "Kafalat" -msgstr "كفالة ونقاط بيع" +msgstr "كفالات و نقاط بيع" #. module: odex_takaful #: model:ir.model,name:odex_takaful.model_takaful_wizard_report_kafalat_cancel @@ -3258,7 +3258,7 @@ msgstr "نافذة معالج تقرير مدفوعات الكفالات" #. module: odex_takaful #: model:ir.ui.menu,name:odex_takaful.takaful_kufula_app_top_menu msgid "Kafalat System" -msgstr "الكفالات ونقاط البيع" +msgstr "كفالة و نقاط بيع" #. module: odex_takaful #: model:ir.ui.menu,name:odex_takaful.kafileen_main_menu @@ -7259,4 +7259,22 @@ msgstr "إضافة كافل/متبرع جديد" #. module: odex_takaful #: model_terms:ir.ui.view,arch_db:odex_takaful.view_takaful_sponsor_form msgid "Related Donors" -msgstr "كافل/متبرع مرتبط" \ No newline at end of file +msgstr "كافل/متبرع مرتبط" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_family_member__kafala_status +msgid "Kafala Status" +msgstr "حالة الكفالة" + +#. module: odex_takaful +#: model:ir.model.fields.selection,name:odex_takaful.selection__family_member__kafala_status__have_kafala +#: model_terms:ir.ui.view,arch_db:odex_takaful.family_member_search_inherit +msgid "Have Kafala" +msgstr "مكفول" + +#. module: odex_takaful +#: model:ir.model.fields.selection,name:odex_takaful.selection__family_member__kafala_status__have_not_kafala +#: model_terms:ir.ui.view,arch_db:odex_takaful.family_member_search_inherit +msgid "Have not Kafala" +msgstr "غير مكفول" + diff --git a/odex25_ensan/odex_takaful/models/donation_details_lines.py b/odex25_ensan/odex_takaful/models/donation_details_lines.py index a57b12760..8b317bcd6 100644 --- a/odex25_ensan/odex_takaful/models/donation_details_lines.py +++ b/odex25_ensan/odex_takaful/models/donation_details_lines.py @@ -169,7 +169,7 @@ class DonationsDetailsLines(models.Model): rec.state = 'active' sponsor_id = rec.sponsorship_mechanism_id.sponsor_id.id if rec.sponsorship_mechanism_id else rec.sponsorship_id.sponsor_id.id (rec.benefit_id | rec.benefit_ids).write( - {'sponsor_related_id': sponsor_id, "sponsorship_end_date": rec.end_date if rec.end_date else False}) + {'sponsor_related_id': sponsor_id, 'kafala_status': 'have_kafala', "sponsorship_end_date": rec.end_date if rec.end_date else False}) @api.model def run_check_all_end_dates(self): diff --git a/odex25_ensan/odex_takaful/models/family_member.py b/odex25_ensan/odex_takaful/models/family_member.py index fbeca45bd..a75436b14 100644 --- a/odex25_ensan/odex_takaful/models/family_member.py +++ b/odex25_ensan/odex_takaful/models/family_member.py @@ -13,6 +13,11 @@ class FamilyMember(models.Model): sponsorship_end_date = fields.Date(string='Sponsorship End Date') is_restricted = fields.Boolean(string="Is Restricted ?", default=False, readonly=True) general_restriction = fields.Boolean(string="General Restriction", default=False, readonly=True) + kafala_status = fields.Selection( + [('have_kafala', 'Have Kafala'), ('have_not_kafala', 'Have not Kafala')], + string='Kafala Status', default='have_not_kafala') + + def _compute_donation_details_count(self): for rec in self: diff --git a/odex25_ensan/odex_takaful/models/product.py b/odex25_ensan/odex_takaful/models/product.py index 42730c399..488302f15 100644 --- a/odex25_ensan/odex_takaful/models/product.py +++ b/odex25_ensan/odex_takaful/models/product.py @@ -6,7 +6,7 @@ class ProductTemplate(models.Model): donation_category = fields.Selection( [('donation', 'Donation'), ('sponsorship', 'Sponsorship'), ('endowment', 'Endowment')], - string='Donation Category', required=True, default='donation') + string='Donation Category') fixed_value = fields.Boolean(string='Is Fixed Value?', compute='_compute_fixed_value') sponsorship_duration = fields.Selection([('temporary', 'Temporary'), ('permanent', 'Permanent')], string='Sponsorship Duration Type') diff --git a/odex25_ensan/odex_takaful/views/family_member.xml b/odex25_ensan/odex_takaful/views/family_member.xml index 7f34668fb..b0f43d22d 100644 --- a/odex25_ensan/odex_takaful/views/family_member.xml +++ b/odex25_ensan/odex_takaful/views/family_member.xml @@ -17,6 +17,8 @@ + + @@ -41,6 +43,11 @@ + + + + + + family.member.tree.inherit + family.member + + + + + + + \ No newline at end of file diff --git a/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml b/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml index 500b06a7d..b625f19a7 100644 --- a/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml +++ b/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml @@ -487,7 +487,7 @@ - +