IMP benefit
This commit is contained in:
commit
9b8796b46d
|
|
@ -371,6 +371,11 @@ msgstr "التاريخ الى"
|
|||
msgid "Family"
|
||||
msgstr "الأسرة"
|
||||
|
||||
#. module: odex25_program_activity
|
||||
#: model:ir.model.fields,field_description:odex25_program_activity.field_pa_program_activity_registration__benefit_category_id
|
||||
msgid "Family Category"
|
||||
msgstr " فئة الأسرة"
|
||||
|
||||
#. module: odex25_program_activity
|
||||
#: model:ir.model.fields,field_description:odex25_program_activity.field_pa_program_activity_registration__sms_phone
|
||||
msgid "Mobile Number"
|
||||
|
|
|
|||
|
|
@ -262,6 +262,14 @@ class PaProgramActivityRegistration(models.Model):
|
|||
date_to = fields.Datetime(string='Date To')
|
||||
|
||||
familye_id = fields.Many2one('grant.benefit', string='Family')
|
||||
beneficiary_ids = fields.Many2many(
|
||||
'family.member',
|
||||
string='Beneficiary Name',
|
||||
domain="[('benefit_id', '=', familye_id)]"
|
||||
)
|
||||
benefit_category_id = fields.Many2one(related='familye_id.benefit_category_id', string='Family Category', readonly=True)
|
||||
|
||||
# beneficiary_ids = fields.Many2many('family.member', string='Beneficiary Name')
|
||||
sms_phone = fields.Char(related='familye_id.sms_phone', string='Mobile Number', readonly=True)
|
||||
|
||||
member_ids = fields.One2many(
|
||||
|
|
@ -288,7 +296,7 @@ class PaProgramActivityRegistration(models.Model):
|
|||
('daughter', 'Daughter')
|
||||
], string='Beneficiary Relation')
|
||||
|
||||
beneficiary_ids = fields.Many2many('res.partner', string='Beneficiary Name')
|
||||
|
||||
|
||||
sons = fields.Integer(
|
||||
string="Number of Sons",
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@
|
|||
<!-- <field name="family_id" />-->
|
||||
<field name="familye_id" />
|
||||
<field name="branch_custom_id" />
|
||||
<field name="benefit_category_id" />
|
||||
<field name="gender" />
|
||||
<field name="nationality_id" />
|
||||
<field name="graduation_status" />
|
||||
|
|
@ -350,7 +351,7 @@
|
|||
|
||||
<!-- <field name="familye_member"/>-->
|
||||
<field name="beneficiary_relation"/>
|
||||
<field name="beneficiary_ids"/>
|
||||
<!-- <field name="beneficiary_ids"/>-->
|
||||
<field name="sms_phone" readonly="1"/>
|
||||
</group>
|
||||
|
||||
|
|
|
|||
|
|
@ -723,10 +723,11 @@ class GrantBenefitProfile(models.Model):
|
|||
# self.required_attach = 'true'
|
||||
@api.depends('attachment_ids.datas', 'attachment_ids.is_required', 'attachment_ids.is_default')
|
||||
def get_required_attach(self):
|
||||
bypass_verify_backend_require_attachs = self._context.get('bypass_verify_backend_require_attachs', False)
|
||||
for record in self:
|
||||
required_missing = False
|
||||
for att in record.attachment_ids:
|
||||
if att.is_required and not att.datas:
|
||||
if (not bypass_verify_backend_require_attachs or att.show_in_portal) and att.is_required and not att.datas:
|
||||
required_missing = True
|
||||
break
|
||||
if required_missing:
|
||||
|
|
@ -1152,12 +1153,14 @@ class GrantBenefitProfile(models.Model):
|
|||
'name': attach.name,
|
||||
'is_required': attach.is_required,
|
||||
'is_default': attach.is_default,
|
||||
'show_in_portal': attach.show_in_portal
|
||||
}))
|
||||
if attach.attach_type == 'income_attach':
|
||||
income_attachments_data.append((0, 0, {
|
||||
'income_type': attach.id,
|
||||
'is_required': attach.is_required,
|
||||
'is_default': attach.is_default,
|
||||
'show_in_portal': attach.show_in_portal
|
||||
}))
|
||||
|
||||
# Add the default attachments to the res dictionary for attachment_ids
|
||||
|
|
|
|||
|
|
@ -753,6 +753,7 @@ class AttachmentsSettings(models.Model):
|
|||
('diseases_attach', _('Diseases Attach')), ('disabilities_attach', _('Disabilities Attach')), ('income_attach', _('Income Attach'))])
|
||||
is_required = fields.Boolean(string='Is Required?')
|
||||
is_default = fields.Boolean(string='Is Default?')
|
||||
show_in_portal = fields.Boolean(default=True)
|
||||
family_appearance_seq = fields.Integer(string='Appearance Sequence')
|
||||
member_appearance_seq = fields.Integer(string='Appearance Sequence')
|
||||
income_appearance_seq = fields.Integer(string='Appearance Sequence')
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ class FamilyMemberProfile(models.Model):
|
|||
'attach_id':attach.id,
|
||||
'is_required': attach.is_required,
|
||||
'is_default': attach.is_default,
|
||||
'show_in_portal': attach.show_in_portal
|
||||
}))
|
||||
|
||||
# Add the default attachments to the res dictionary for attachment_ids
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@ class BenefitAttachment(models.Model):
|
|||
# fields to management required and delete records in benefit attachment
|
||||
is_required = fields.Boolean(string='Is Required?')
|
||||
is_default = fields.Boolean(string='Is Default?')
|
||||
<<<<<<< HEAD
|
||||
mother_grant_benefit_id = fields.Many2one('grant.benefit', string='Mother Grant Benefit')
|
||||
=======
|
||||
show_in_portal = fields.Boolean(default=True)
|
||||
>>>>>>> 04481aa674a7a77bd6f957f5c0bd2802a45c2978
|
||||
|
||||
def action_preview_attachment(self):
|
||||
# Custom function to open the preview
|
||||
|
|
|
|||
|
|
@ -1048,6 +1048,7 @@
|
|||
<!-- <field name="disabilities_id"/>-->
|
||||
<field name="is_required"/>
|
||||
<field name="is_default"/>
|
||||
<field name="show_in_portal"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
|
|
@ -1063,6 +1064,7 @@
|
|||
<field name="attach_type"/>
|
||||
<field name="is_required"/>
|
||||
<field name="is_default"/>
|
||||
<field name="show_in_portal"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
Loading…
Reference in New Issue