Merge pull request #5947 from expsa/you_dev_odex25_benefit
You dev odex25 benefit
This commit is contained in:
commit
46c70d1b34
|
|
@ -8586,14 +8586,10 @@ msgstr "نهاية الوقت المعين للنشاط"
|
|||
#: model:ir.model.fields,field_description:odex_benefit.field_education_exam_type__name
|
||||
#: model_terms:ir.ui.view,arch_db:odex_benefit.view_property_type_settings_form
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_education_period__name
|
||||
<<<<<<< HEAD
|
||||
#: model_terms:ir.ui.view,arch_db:odex_benefit.view_rent_contract_form
|
||||
=======
|
||||
msgid "Name"
|
||||
msgstr "الاسم"
|
||||
|
||||
#. module: odex_benefit
|
||||
>>>>>>> dev_odex25_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_cars_line__name
|
||||
#, fuzzy
|
||||
msgid "Name"
|
||||
|
|
@ -15914,34 +15910,6 @@ msgstr ""
|
|||
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 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 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 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
|
||||
#, 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
|
||||
|
|
@ -17593,7 +17561,6 @@ msgstr ""
|
|||
msgid ""
|
||||
"Payment Type requires a period of %s months, but selected period is %s "
|
||||
"months."
|
||||
>>>>>>> dev_odex25_benefit
|
||||
msgstr "يتطلب نوع السداد فترة %s أشهر، ولكن الفترة المحددة هي %s أشهر."
|
||||
|
||||
#. module: odex_benefit
|
||||
|
|
@ -18374,3 +18341,9 @@ msgstr "يجب أن تكون فترة الإيجار المطلوبة بالكا
|
|||
#, python-format
|
||||
msgid "Requested start date cannot be before the contract start date."
|
||||
msgstr "لا يمكن أن يكون تاريخ البدء المطلوب قبل تاريخ بدء العقد."
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/family_members.py:0
|
||||
#, python-format
|
||||
msgid "Over %s years old and not enrolled in any educational institution."
|
||||
msgstr "أكبر من %s سنة وغير منتظم بجهة تعليمية."
|
||||
|
|
@ -1619,7 +1619,7 @@ class GrantBenefitProfile(models.Model):
|
|||
partner_ids.append(self.env['mail.followers'].search([('id', '=', id)]).partner_id)
|
||||
self.state = "second_approve"
|
||||
self.action_type = "approved"
|
||||
self.sudo()._send_notification(partner_ids, rec.state)
|
||||
#self.sudo()._send_notification(partner_ids, rec.state)
|
||||
# for member in self.member_ids:
|
||||
# member.create_member_partner()
|
||||
|
||||
|
|
|
|||
|
|
@ -250,8 +250,8 @@ class FamilyMemberProfile(models.Model):
|
|||
suspend_reason = fields.Many2one('suspend.reason', string='Suspend Reason')
|
||||
reason = fields.Text(string='Reason')
|
||||
suspend_description = fields.Text(string='Suspend Description')
|
||||
suspend_attachment = fields.Many2many('ir.attachment','rel_suspend_member_attachment',
|
||||
'member_id','attachment_id',string='Suspend Attachment')
|
||||
suspend_attachment = fields.Many2many('ir.attachment', 'rel_suspend_member_attachment',
|
||||
'member_id', 'attachment_id', string='Suspend Attachment')
|
||||
suspend_type = fields.Selection(
|
||||
selection=[('temporarily_suspend', 'Temporarily Suspended'), ('suspend', 'Suspend')], string="Suspend Type")
|
||||
suspend_method = fields.Selection(selection=[('manual', 'Manual'), ('auto', 'Auto')], string="Suspend Method",
|
||||
|
|
@ -302,7 +302,6 @@ class FamilyMemberProfile(models.Model):
|
|||
def _expand_states(self, states, domain, order):
|
||||
return [key for key, val in type(self).state.selection]
|
||||
|
||||
|
||||
@api.model
|
||||
def _name_search(self, name, args=None, operator='ilike', limit=100, name_get_uid=None):
|
||||
if not args:
|
||||
|
|
@ -589,23 +588,25 @@ class FamilyMemberProfile(models.Model):
|
|||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("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:
|
||||
if rec.education_status not in [
|
||||
'educated'] and current_education_status_id.case_study != 'continuous':
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("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 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 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(
|
||||
_("He is over %s years of age and not enrolled in an educational institution.") % male_benefit_age)
|
||||
_("Over %s years old and not enrolled in any educational institution.") % male_benefit_age
|
||||
)
|
||||
elif current_education_status_id.case_study == 'continuous':
|
||||
if current_education_status_id.specialization_ids.is_scientific_specialty and rec.age > exceptional_age_scientific_specialty:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("Over %s years old and not enrolled in a scientific or vocational specialization.")
|
||||
% exceptional_age_scientific_specialty
|
||||
)
|
||||
if not current_education_status_id.specialization_ids.is_scientific_specialty:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(
|
||||
_("The member is over %s years old and not enrolled in a scientific or vocational specialization.")
|
||||
% male_benefit_age
|
||||
)
|
||||
if rec.is_work:
|
||||
if rec.member_income > max_income_for_benefit:
|
||||
rec.member_status = 'non_benefit'
|
||||
|
|
@ -629,7 +630,7 @@ class FamilyMemberProfile(models.Model):
|
|||
_("Failure to complete the required documents or official proofs, or the family’s ineligibility for the association’s services, and the application has been rejected."))
|
||||
|
||||
elif rec.relationn.relation_type == 'daughter':
|
||||
if rec.age < female_benefit_age and rec.is_married:
|
||||
if rec.is_married:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("Married"))
|
||||
if rec.age < female_benefit_age and rec.is_work and rec.education_status not in [
|
||||
|
|
@ -637,25 +638,8 @@ class FamilyMemberProfile(models.Model):
|
|||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("She is employed and not enrolled in an educational institution."))
|
||||
if age_exceeded:
|
||||
if rec.age > minor_siblings_age and not rec.minor_siblings:
|
||||
rec.member_status = 'non_benefit'
|
||||
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 %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 %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'
|
||||
elif rec.is_married:
|
||||
rec.member_status = 'non_benefit'
|
||||
reasons.append(_("Married"))
|
||||
# elif not rec.minor_siblings:
|
||||
# rec.member_status = 'non_benefit'
|
||||
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'
|
||||
|
|
@ -806,10 +790,11 @@ class FamilyMemberProfile(models.Model):
|
|||
|
||||
family = rec.benefit_id
|
||||
if rec.relationn.relation_type in ['mother', 'replacement_mother']:
|
||||
allowed_ids = [family.mother_id_number,family.replacement_mother_id_number]
|
||||
allowed_ids = [family.mother_id_number, family.replacement_mother_id_number]
|
||||
if rec.member_id_number in allowed_ids:
|
||||
continue
|
||||
if rec.member_id_number in [family.father_id_number,family.mother_id_number,family.replacement_mother_id_number]:
|
||||
if rec.member_id_number in [family.father_id_number, family.mother_id_number,
|
||||
family.replacement_mother_id_number]:
|
||||
raise ValidationError(
|
||||
_("Member ID %s cannot match father/mother/replacement mother ID.") %
|
||||
rec.member_id_number
|
||||
|
|
@ -882,7 +867,8 @@ class FamilyMemberProfile(models.Model):
|
|||
'suspend_type': 'suspend',
|
||||
})
|
||||
else:
|
||||
raise UserError(_("Final suspension cannot be executed until after the specified final suspension date."))
|
||||
raise UserError(
|
||||
_("Final suspension cannot be executed until after the specified final suspension date."))
|
||||
|
||||
def action_suspend_first_accept(self):
|
||||
for rec in self:
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<button name="action_exception" type="object"
|
||||
string="Temporarily Exception" class="oe_highlight"
|
||||
confirm="Are you sure you want to move to Temporarily Exception ?"
|
||||
attrs="{'invisible': [('state','not in',['suspended_second_approve'])]}"/>
|
||||
attrs="{'invisible': [('member_status','=','benefit')]}"/>
|
||||
<button name="action_exception_first_accept" type="object"
|
||||
string="Exception First Approve" class="oe_highlight"
|
||||
groups="odex_benefit.group_benefit_woman_commitee,odex_benefit.group_benefit_manager"
|
||||
|
|
|
|||
Loading…
Reference in New Issue