IMP benefit
This commit is contained in:
parent
4bb4263ef1
commit
8d0d84af25
|
|
@ -15818,46 +15818,39 @@ msgstr "تم رفض الطلب بسبب عدم استكمال المستندات
|
|||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"He/She has a physical or intellectual disability but is over 30 years of "
|
||||
"age."
|
||||
msgstr "لدية اعاقة حسدية او فكرية ولكن تجاوز عمر 30"
|
||||
msgid "He has a physical or intellectual disability but is over %s years of age."
|
||||
msgstr "لديه إعاقة جسدية أو فكرية ولكنه تجاوز عمر %s"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"He/She is enrolled in a scientific or vocational specialization but is over "
|
||||
"24 years of age."
|
||||
msgstr "منتظم في احدي التخصصات العلمية او المهنية ولكن تجاوز عمر 24"
|
||||
msgid "He is enrolled in a scientific or vocational specialization but is over %s years of age."
|
||||
msgstr "منتظم في أحد التخصصات العلمية أو المهنية ولكنه تجاوز عمر %s"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"He/She is enrolled in a medical specialization but is over 26 years of age."
|
||||
msgstr "منتظم في احدي التخصصات الطبية ولكن تجاوز عمر 26"
|
||||
msgid "He is enrolled in a medical specialization but is over %s years of age."
|
||||
msgstr "منتظم في أحد التخصصات الطبية ولكنه تجاوز عمر %s"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"He/She is over 18 years of age and not enrolled in a scientific or medical "
|
||||
"specialization."
|
||||
msgstr "تجاوز عمر 18 وليس منتظم في تخصص علمي او طبي"
|
||||
msgid "He is over %s years of age and not enrolled in a scientific or medical specialization."
|
||||
msgstr "تجاوز عمر %s وليس منتظم في تخصص علمي أو طبي"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "He is over %s years of age and not enrolled in an educational institution."
|
||||
msgstr "تجاوز عمر %s وغير منتظم بجهة تعلمية"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"She is over 18 years of age and not enrolled in any educational institution."
|
||||
msgstr "تجاوز عمر 18 وغير منتظمة بجهة تعلمية"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "He/She is employed with a salary exceeding 4,000."
|
||||
msgstr "يعمل براتب اكبر من 4000 "
|
||||
msgid "He is employed with a salary exceeding %s."
|
||||
msgstr "يعمل براتب اكبر من %s"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
|
|
@ -15870,13 +15863,13 @@ msgstr "تجاوز عمر 18 وغير منتظم بجهة تعلمية"
|
|||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "He/She is over 18 years of age and has completed his/her education."
|
||||
msgstr "تجاوز عمر 18 واكمل تعليمه"
|
||||
msgid "He is over %s years of age and has completed his education."
|
||||
msgstr "تجاوز عمر %s واكمل تعليمه"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "He/She does not reside with his/her family."
|
||||
msgid "He does not reside with his family."
|
||||
msgstr "لايقيم مع اسرته"
|
||||
|
||||
#. module: odex_benefit
|
||||
|
|
@ -15900,7 +15893,6 @@ msgstr "متزوجة"
|
|||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "She is employed and not enrolled in an educational institution."
|
||||
msgstr "تعمل وغير منتظمة بجهة تعلمية"
|
||||
|
|
@ -15909,20 +15901,20 @@ msgstr "تعمل وغير منتظمة بجهة تعلمية"
|
|||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "She is over 26 years of age and has no underage brothers."
|
||||
msgstr "تجاوزت عمر 26 وليس لديها اخوة قصر"
|
||||
msgid "She is over %s years of age and has no underage brothers."
|
||||
msgstr "تجاوزت عمر %s وليس لديها اخوة قصر"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "She is over 35 years of age."
|
||||
msgstr "تجاوزت عمر 35"
|
||||
msgid "She is over %s years of age."
|
||||
msgstr "تجاوزت عمر %s"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "She works with a salary greater than 4,000."
|
||||
msgstr "تعمل براتب اكبر من 4000 "
|
||||
msgid "She works with a salary greater than %s."
|
||||
msgstr "تعمل براتب اكبر من %s "
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
|
|
|
|||
|
|
@ -1145,44 +1145,53 @@ class GrantBenefitProfile(models.Model):
|
|||
mini_income_for_mother = validation_setting.mini_income_for_mother
|
||||
max_income_for_mother = validation_setting.max_income_for_mother
|
||||
for rec in self:
|
||||
reasons = []
|
||||
status = 'benefit'
|
||||
if rec.mother_location_conf and rec.mother_marital_conf:
|
||||
if not rec.mother_location_conf.is_benefit or not rec.mother_marital_conf.is_benefit or rec.state in ['suspended_second_approve','refused']:
|
||||
return 'non_benefit'
|
||||
reasons.append(_("The mother's marital or location conditions are not eligible."))
|
||||
status = 'non_benefit'
|
||||
elif rec.mother_marital_conf.is_benefit :
|
||||
if rec.is_mother_work and rec.mother_country_id.code == 'SA' or (
|
||||
rec.mother_country_id.code != 'SA' and rec.father_country_id.code == 'SA'):
|
||||
if mini_income_for_mother < rec.mother_income <= max_income_for_mother:
|
||||
return 'non_benefit'
|
||||
reasons.append(_("The mother's income is between minimum and maximum thresholds."))
|
||||
status = 'non_benefit'
|
||||
elif rec.mother_income <= mini_income_for_mother:
|
||||
return 'benefit'
|
||||
status = 'benefit'
|
||||
elif rec.mother_income > max_income_for_mother:
|
||||
return 'benefit'
|
||||
status = 'benefit'
|
||||
elif not rec.is_mother_work and rec.mother_country_id.code == 'SA' or (
|
||||
rec.mother_country_id.code != 'SA' and rec.father_country_id.code == 'SA'):
|
||||
return 'benefit'
|
||||
status = 'benefit'
|
||||
return status, reasons
|
||||
|
||||
def check_replacement_mother_status(self):
|
||||
validation_setting = self.env["family.validation.setting"].search([], limit=1)
|
||||
mini_income_for_mother = validation_setting.mini_income_for_mother
|
||||
max_income_for_mother = validation_setting.max_income_for_mother
|
||||
for rec in self:
|
||||
rec.replacement_mother_status = False
|
||||
reasons = []
|
||||
status = 'benefit'
|
||||
if not rec.add_replacement_mother:
|
||||
continue
|
||||
if not rec.replacement_mother_location_conf.is_benefit or not rec.replacement_mother_marital_conf.is_benefit or rec.state in ['suspended_second_approve','refused']:
|
||||
return 'non_benefit'
|
||||
status = 'non_benefit'
|
||||
reasons.append(_("The replacement mother's marital or location conditions are not eligible."))
|
||||
elif rec.replacement_mother_marital_conf.is_benefit:
|
||||
if rec.replacement_is_mother_work and rec.replacement_mother_country_id.code == 'SA' or (
|
||||
rec.replacement_mother_country_id.code != 'SA' and rec.father_country_id.code == 'SA'):
|
||||
if mini_income_for_mother < rec.replacement_mother_income <= max_income_for_mother:
|
||||
return 'non_benefit'
|
||||
status = 'non_benefit'
|
||||
reasons.append(_("The replacement mother's income is between minimum and maximum thresholds."))
|
||||
elif rec.replacement_mother_income <= mini_income_for_mother:
|
||||
return 'benefit'
|
||||
status = 'benefit'
|
||||
elif rec.replacement_mother_income > max_income_for_mother:
|
||||
return 'benefit'
|
||||
status = 'benefit'
|
||||
elif not rec.replacement_is_mother_work and rec.replacement_mother_country_id.code == 'SA' or (
|
||||
rec.replacement_mother_country_id.code != 'SA' and rec.father_country_id.code == 'SA'):
|
||||
return 'benefit'
|
||||
status = 'benefit'
|
||||
return status, reasons
|
||||
|
||||
def delete_from_db(self):
|
||||
find_id = self.env['benefit.housing'].search([])
|
||||
|
|
|
|||
|
|
@ -524,9 +524,11 @@ class FamilyMemberProfile(models.Model):
|
|||
rec.write({'member_status': 'non_benefit'})
|
||||
reasons.append(_("Mother has no benefiting children"))
|
||||
else:
|
||||
rec.member_status = rec.benefit_id.check_mother_status()
|
||||
rec.member_status, mother_reasons = rec.benefit_id.check_mother_status()
|
||||
reasons.append(mother_reasons)
|
||||
elif rec.relationn.relation_type == 'replacement_mother':
|
||||
rec.member_status = rec.benefit_id.check_replacement_mother_status()
|
||||
rec.member_status, repl_reasons = rec.benefit_id.check_replacement_mother_status()
|
||||
reasons.append(repl_reasons)
|
||||
if rec.state in ['suspended_second_approve', 'refused'] or not benefiting_children:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
|
|
@ -541,40 +543,41 @@ class FamilyMemberProfile(models.Model):
|
|||
if rec.age > exceptional_age_has_disabilities and rec.disabilities_attachment_ids:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("He/She has a physical or intellectual disability but is over 30 years of age."))
|
||||
_("He has a physical or intellectual disability but is over %s years of age.") % exceptional_age_has_disabilities)
|
||||
elif current_education_status_id.specialization_ids.is_scientific_specialty and rec.age > exceptional_age_scientific_specialty and not rec.minor_siblings:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("He/She is enrolled in a scientific or vocational specialization but is over 24 years of age."))
|
||||
_("He is enrolled in a scientific or vocational specialization but is over %s years of age.") % exceptional_age_scientific_specialty)
|
||||
elif current_education_status_id.specialization_ids.is_medical_specialty and rec.age > exceptional_age_medical_specialty and not rec.minor_siblings:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("He/She is enrolled in a medical specialization but is over 26 years of age."))
|
||||
_("He is enrolled in a medical specialization but is over %s years of age.") % exceptional_age_medical_specialty)
|
||||
elif not any([current_education_status_id.specialization_ids.is_scientific_specialty,
|
||||
current_education_status_id.specialization_ids.is_medical_specialty]):
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("He/She is over 18 years of age and not enrolled in a scientific or medical specialization."))
|
||||
_("He is over %s years of age and not enrolled in a scientific or medical specialization.") % exceptional_age_medical_specialty)
|
||||
if not rec.minor_siblings:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("She is over 18 years of age and not enrolled in any educational institution."))
|
||||
_("He is over %s years of age and not enrolled in an educational institution.") % male_benefit_age)
|
||||
if rec.is_work:
|
||||
if rec.member_income > max_income_for_benefit:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("He/She is employed with a salary exceeding 4,000."))
|
||||
reasons.append(_("He is employed with a salary exceeding %s.") % max_income_for_benefit)
|
||||
if not rec.is_married and rec.education_status in ['illiterate']:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("He/She is over 18 years of age and not enrolled in an educational institution."))
|
||||
_("He is over %s years of age and not enrolled in an educational institution.") % male_benefit_age)
|
||||
if not rec.is_married and rec.education_status in [
|
||||
'educated'] and current_education_status_id.case_study in [
|
||||
'graduate', 'intermittent']:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("He/She is over 18 years of age and has completed his/her education."))
|
||||
reasons.append(
|
||||
_("He is over %s years of age and has completed his education.") % male_benefit_age)
|
||||
if not rec.member_location_conf.is_benefit:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("He/She does not reside with his/her family."))
|
||||
reasons.append(_("He does not reside with his family."))
|
||||
if rec.state in ['suspended_second_approve', 'refused'] or rec.is_dead == True:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
|
|
@ -590,13 +593,15 @@ class FamilyMemberProfile(models.Model):
|
|||
if rec.age > female_benefit_age:
|
||||
if rec.age > minor_siblings_age and not rec.minor_siblings:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("She is over 26 years of age and has no underage brothers."))
|
||||
reasons.append(
|
||||
_("She is over %s years of age and has no underage brothers.") % female_benefit_age)
|
||||
elif not rec.minor_siblings:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("She is over 26 years of age and has no underage brothers."))
|
||||
reasons.append(
|
||||
_("She is over %s years of age and has no underage brothers.") % female_benefit_age)
|
||||
elif rec.minor_siblings and rec.age > minor_siblings_age:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("She is over 35 years of age."))
|
||||
reasons.append(_("She is over %s years of age.") % minor_siblings_age)
|
||||
# elif rec.is_work and current_education_status_id.education_status in ['illiterate'] and current_education_status_id.case_study in [
|
||||
# 'graduate', 'intermittent']:
|
||||
# rec.member_status = 'non_benefit'
|
||||
|
|
@ -608,7 +613,7 @@ class FamilyMemberProfile(models.Model):
|
|||
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'
|
||||
reasons.append(_("She works with a salary greater than 4,000."))
|
||||
reasons.append(_("She works with a salary greater than %s.") % max_income_for_benefit)
|
||||
if rec.is_work and rec.education_status in ['illiterate']:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("She is employed and not enrolled in an educational institution."))
|
||||
|
|
@ -622,7 +627,8 @@ class FamilyMemberProfile(models.Model):
|
|||
reasons.append(_("She does not reside with the family."))
|
||||
if rec.state in ['suspended_second_approve', 'refused'] or rec.is_dead == True:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("Application rejected due to missing documents, missing official proofs, or the family's ineligibility for the association's services."))
|
||||
reasons.append(
|
||||
_("Application rejected due to missing documents, missing official proofs, or the family's ineligibility for the association's services."))
|
||||
# General checks for all members
|
||||
# if rec.is_work:
|
||||
# if rec.member_income > max_income_for_benefit:
|
||||
|
|
|
|||
Loading…
Reference in New Issue