Merge pull request #2375 from expsa/Esraa-odex25-ensan-tasks
bank account Info Notes in Benefit
This commit is contained in:
commit
40a050cce5
|
|
@ -1038,6 +1038,7 @@ msgstr "حساب"
|
|||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__acc_holder_name
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__family_member_id
|
||||
msgid "Account Holder Name"
|
||||
msgstr "اسم مالك الحساب"
|
||||
|
||||
|
|
@ -13880,3 +13881,37 @@ msgstr "منشئ الطلب"
|
|||
#: model:ir.model.fields,field_description:odex_benefit.field_service_request__requests_counts
|
||||
msgid "Requests Counts"
|
||||
msgstr "عدد الطلبات"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__is_family_member
|
||||
msgid "Is Family member?"
|
||||
msgstr "هل صاحب الحساب من أفراد الأسرة؟"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__owner_identity_attachment_ids
|
||||
msgid "Account holder identity"
|
||||
msgstr "هوية صاحب الحساب"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__family_approval_attachment_ids
|
||||
msgid "Family approval of transfer"
|
||||
msgstr "إقرار أفراد الأسرة بالتحويل"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/benefit.py:0
|
||||
#, python-format
|
||||
msgid "Account Holder Identity Attachment is required."
|
||||
msgstr ".مرفق هوية صاحب الحساب مطلوب"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/benefit.py:0
|
||||
#, python-format
|
||||
msgid "Family approval of transfer Attachment is required."
|
||||
msgstr ".مرفق إقرار أفراد الأسرة بالتحويل مطلوب"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/models/benefit.py:0
|
||||
#, python-format
|
||||
msgid "Father Dead Certificate is required."
|
||||
msgstr ".مرفق شهادة وفاة الأب مطلوب"
|
||||
|
||||
|
|
|
|||
|
|
@ -550,13 +550,23 @@ class GrantBenefitProfile(models.Model):
|
|||
replacement_last_educational_certificate = fields.Many2many('ir.attachment','rel_replacement_last_educational__certificate_attachment','benefit_id','attachment_id',string='Last Educational Certificate')
|
||||
replacement_weak_study = fields.Many2many('study.material',relation='grant_benefit_replacement_weak_study_rel',string='Weak Study')
|
||||
sponsorship_id = fields.Many2one('takaful.sponsorship',string='Sponsorship')
|
||||
#check if Account Holder is Family memeber of not
|
||||
is_family_member = fields.Boolean(string='Is Family member?' , help="check if Account Holder is Family memeber")
|
||||
family_member_id = fields.Many2one('family.member', string='Account Holder Name', domain="[('id','in',member_ids)]")
|
||||
owner_identity_attachment_ids = fields.Many2many('ir.attachment', 'rel_identity_attachment','benefit_id','attachment_id',string='Account holder identity')
|
||||
family_approval_attachment_ids = fields.Many2many('ir.attachment', 'rel_approval_attachment','benefit_id','attachment_id',string='Family approval of transfer')
|
||||
|
||||
|
||||
|
||||
def _validate_required_attachments(self):
|
||||
"""Validate required Many2many attachments"""
|
||||
for rec in self:
|
||||
if not rec.father_dead_certificate:
|
||||
raise ValidationError("Father Dead Certificate is required.")
|
||||
raise ValidationError(_("Father Dead Certificate is required."))
|
||||
if not rec.owner_identity_attachment_ids and rec.is_family_member == False:
|
||||
raise ValidationError(_("Account Holder Identity Attachment is required."))
|
||||
if not rec.family_approval_attachment_ids and rec.is_family_member == False:
|
||||
raise ValidationError(_("Family approval of transfer Attachment is required."))
|
||||
|
||||
if rec.state != 'draft' and not rec.national_address_attachment:
|
||||
raise ValidationError("National Address Attachment is required when the state is not Draft.")
|
||||
|
|
|
|||
|
|
@ -559,6 +559,7 @@
|
|||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="is_family_member"/>
|
||||
<field name="account_relation" attrs="{'readonly':[('state','not in',['draft','complete_info'])]}" options='{"no_open": True,"no_create_edit": True}'/>
|
||||
<label for="acc_number"/>
|
||||
<div class="o_row">
|
||||
|
|
@ -990,11 +991,20 @@
|
|||
<field name="acc_number" attrs="{'readonly':[('state','not in',['draft','complete_info','edit_info'])],'required':[('state','!=','draft')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='acc_holder_name']" position="replace">
|
||||
<field name="acc_holder_name" attrs="{'readonly':[('state','not in',['draft','complete_info','edit_info'])],'required':[('state','!=','draft')]}"/>
|
||||
<field name="acc_holder_name" attrs="{'invisible':[('is_family_member','=',True)],'readonly':[('state','not in',['draft','complete_info','edit_info'])],'required':[('state','!=','draft')]}"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='acc_holder_name']" position="after">
|
||||
<field name="family_member_id" attrs="{'invisible':[('is_family_member','=',False)],'readonly':[('state','not in',['draft','complete_info','edit_info'])],'required':[('state','!=','draft')]}"/>
|
||||
<field name="owner_identity_attachment_ids" attrs="{'invisible':[('is_family_member','=',True)],'readonly':[('state','not in',['draft','complete_info','edit_info'])]}" widget="many2many_attachment_preview"/>
|
||||
<field name="family_approval_attachment_ids" attrs="{'invisible':[('is_family_member','=',True)],'readonly':[('state','not in',['draft','complete_info','edit_info'])]}" widget="many2many_attachment_preview"/>
|
||||
|
||||
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='bank_id']" position="replace">
|
||||
<field name="bank_id" attrs="{'readonly':[('state','not in',['draft','complete_info','edit_info'])],'required':[('state','!=','draft')]}"/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
<record id="grant_benefit_tree" model="ir.ui.view">
|
||||
|
|
|
|||
Loading…
Reference in New Issue