diff --git a/odex25_benefit/odex_benefit/i18n/ar_001.po b/odex25_benefit/odex_benefit/i18n/ar_001.po
index 12655f354..41936a7bc 100644
--- a/odex25_benefit/odex_benefit/i18n/ar_001.po
+++ b/odex25_benefit/odex_benefit/i18n/ar_001.po
@@ -1138,7 +1138,7 @@ msgstr "حساب"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__acc_holder_name
msgid "Account Holder Name"
-msgstr "اسم مالك الحساب"
+msgstr "اسم مالك الحساب بالبنك"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__family_member_id
@@ -18431,3 +18431,9 @@ msgstr "مبلغ الدعم"
msgid "Exception Second Approve"
msgstr "موافقة مدير الفرع للاستثناء"
+#. module: odex_benefit
+#: code:addons/odex_benefit/models/family_members.py:0
+#, python-format
+msgid ""
+"She has a physical or intellectual disability but is over %s years of age."
+msgstr "لديها إعاقة جسدية أو عقلية ولكنها تجاوزت %s سنة من العمر."
\ No newline at end of file
diff --git a/odex25_benefit/odex_benefit/models/benefit.py b/odex25_benefit/odex_benefit/models/benefit.py
index 511499cd9..793f280f1 100644
--- a/odex25_benefit/odex_benefit/models/benefit.py
+++ b/odex25_benefit/odex_benefit/models/benefit.py
@@ -849,13 +849,22 @@ class GrantBenefitProfile(models.Model):
def _compute_estimated_rent_amount(self):
for rec in self:
estimated_rent_amount = 0.0
- if rec.rent_amount > 0 and rec.property_type_id and rec.property_type_code == 'rent':
+ rent_line = False
+ if rec.property_type_id and rec.property_type_code == 'rent':
if rec.branch_custom_id.branch_type == 'branches':
- estimated_rent_amount = self.env['rent.lines'].search(
- [('benefit_count', '=', rec.benefit_member_count)], order="estimated_rent_branches desc",limit=1).estimated_rent_branches
+ rent_line = self.env['rent.lines'].search(
+ [('benefit_count', '=', rec.benefit_member_count)], order="estimated_rent_branches desc",limit=1)
+ if rent_line:
+ estimated_rent_amount = rent_line.estimated_rent_branches
else:
- estimated_rent_amount = self.env['rent.lines'].search(
- [('benefit_count', '=', rec.benefit_member_count)], order="estimated_rent_governorate desc",limit=1).estimated_rent_governorate
+ rent_line = self.env['rent.lines'].search(
+ [('benefit_count', '=', rec.benefit_member_count)], order="estimated_rent_governorate desc",limit=1)
+ if rent_line:
+ estimated_rent_amount = rent_line.estimated_rent_governorate
+
+ if rec.property_type_id.is_shared and rent_line and rent_line.discount_rate_shared_housing:
+ discount = rent_line.discount_rate_shared_housing / 100.0
+ estimated_rent_amount *= discount
rec.estimated_rent_amount = estimated_rent_amount / 12.0
def assign_sequence_to_all(self):
diff --git a/odex25_benefit/odex_benefit/models/family_members.py b/odex25_benefit/odex_benefit/models/family_members.py
index 1e4278d0f..016688d45 100644
--- a/odex25_benefit/odex_benefit/models/family_members.py
+++ b/odex25_benefit/odex_benefit/models/family_members.py
@@ -521,6 +521,7 @@ class FamilyMemberProfile(models.Model):
'member_education_status_ids.specialization_ids',
'member_education_status_ids.education_status',
'member_education_status_ids.case_study',
+ 'disabilities_attachment_ids',
'relationn',
'birth_date',
'is_married',
@@ -650,8 +651,18 @@ class FamilyMemberProfile(models.Model):
rec.member_status = 'non_benefit'
reasons.append(_("She is employed and not enrolled in an educational institution."))
if age_exceeded:
- rec.member_status = 'non_benefit'
- reasons.append(_("She has exceeded the maximum age limit of %s years.") % female_benefit_age)
+ if rec.age <= exceptional_age_has_disabilities and rec.disabilities_attachment_ids and rec.minor_siblings:
+ rec.member_status = 'benefit'
+ else:
+ if rec.age > exceptional_age_has_disabilities and rec.disabilities_attachment_ids:
+ rec.member_status = 'non_benefit'
+ reasons.append(
+ _("She has a physical or intellectual disability but is over %s years of age.")
+ % exceptional_age_has_disabilities
+ )
+ else:
+ rec.member_status = 'non_benefit'
+ reasons.append(_("She has exceeded the maximum age limit of %s years.") % female_benefit_age)
if rec.is_work and rec.member_income > max_income_for_benefit and rec.education_status in [
'educated'] and current_education_status_id.case_study == 'continuous':
rec.member_status = 'non_benefit'
diff --git a/odex25_benefit/odex_benefit/views/benefit_view.xml b/odex25_benefit/odex_benefit/views/benefit_view.xml
index 148b6eb76..9cdf64df8 100644
--- a/odex25_benefit/odex_benefit/views/benefit_view.xml
+++ b/odex25_benefit/odex_benefit/views/benefit_view.xml
@@ -483,7 +483,7 @@
/>
@@ -822,11 +822,10 @@
'readonly':[('state','not in',['draft','new','complete_info'])]}"/>
+ attrs="{'invisible':[('mother_is_dead','=',False)],'readonly':[('state','not in',['draft','new','complete_info'])]}"/>
@@ -2055,7 +2054,7 @@
+ attrs="{'invisible':[('replacement_mother_is_dead','=',False)],'readonly':[('state','not in',['draft','new','complete_info'])]}"/>