IMP benefit
This commit is contained in:
parent
546fa08f04
commit
a13c1df6ad
|
|
@ -173,16 +173,19 @@
|
|||
attrs="{'invisible':[('is_mother','=',False)],'required':[('is_mother','=',True)]}"/>
|
||||
<field name="member_id_number" />
|
||||
<field name="is_dead"/>
|
||||
<field name="death_certificate" widget="many2many_attachment_preview"
|
||||
attrs="{'invisible':[('is_dead','=',False)],'required':[('is_dead','=',True)]}"/>
|
||||
<!-- <field name="gender" required="1"/>-->
|
||||
<field name="member_location" force_save="1" invisible="1"/>
|
||||
<field name="member_location_conf" force_save="1"
|
||||
attrs="{'invisible':[('is_mother','=',True)]}"/>
|
||||
attrs="{'required':[('is_mother','=',False)],'invisible':[('is_mother','=',True)]}"/>
|
||||
<field name="is_work" attrs="{'invisible':[('age','<',18)]}"/>
|
||||
<field name="member_income"
|
||||
attrs="{'invisible':[('age','<',18)], 'required':[('is_work','=',True), ('age','>=',18)]}"/>
|
||||
attrs="{'invisible':['|',('age','<',18),('is_work','=',False)], 'required':[('is_work','=',True)]}"/>
|
||||
<field name="salary_certificate" widget="many2many_attachment_preview" attrs="{'invisible':['|',('age','<',18),('is_work','=',False)], 'required':[('is_work','=',True)]}"/>
|
||||
<field name="minor_siblings"/>
|
||||
<field name="sponsor_id"/>
|
||||
<field name="is_excluded_suspension" readonly="1" force_save="1"/>
|
||||
<field name="is_excluded_suspension" invisible="1" readonly="1" force_save="1"/>
|
||||
<field name="member_status" readonly="1" widget="badge"
|
||||
decoration-success="member_status == 'benefit'"
|
||||
decoration-danger="member_status == 'non_benefit'"/>
|
||||
|
|
@ -204,6 +207,9 @@
|
|||
<field name="age_status"/>
|
||||
<field name="is_married"
|
||||
attrs="{'invisible':[('is_mother','=',True)]}"/>
|
||||
<field name="marriage_certificate"
|
||||
widget="many2many_attachment_preview"
|
||||
attrs="{'invisible':['|',('is_mother','=',True),('is_married','=',False)],'required':[('is_mother','=',False),('is_married','=',True)]}"/>
|
||||
<field name="mother_marital_conf"
|
||||
attrs="{'invisible':[('is_mother','=',False)]}"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
|
|
|
|||
|
|
@ -414,16 +414,19 @@
|
|||
attrs="{'invisible':[('is_mother','=',False)],'required':[('is_mother','=',True)]}"/>
|
||||
<field name="member_id_number" required="1"/>
|
||||
<field name="is_dead"/>
|
||||
<field name="death_certificate" widget="many2many_attachment_preview"
|
||||
attrs="{'invisible':[('is_dead','=',False)],'required':[('is_dead','=',True)]}"/>
|
||||
<!-- <field name="gender" required="1"/>-->
|
||||
<field name="member_location" force_save="1" invisible="1"/>
|
||||
<field name="member_location_conf" force_save="1"
|
||||
attrs="{'invisible':[('is_mother','=',True)]}"/>
|
||||
attrs="{'required':[('is_mother','=',False)],'invisible':[('is_mother','=',True)]}"/>
|
||||
<field name="is_work" attrs="{'invisible':[('age','<',18)]}"/>
|
||||
<field name="member_income"
|
||||
attrs="{'invisible':[('age','<',18)], 'required':[('is_work','=',True), ('age','>=',18)]}"/>
|
||||
attrs="{'invisible':['|',('age','<',18),('is_work','=',False)], 'required':[('is_work','=',True)]}"/>
|
||||
<field name="salary_certificate" widget="many2many_attachment_preview" attrs="{'invisible':['|',('age','<',18),('is_work','=',False)], 'required':[('is_work','=',True)]}"/>
|
||||
<field name="minor_siblings"/>
|
||||
<field name="sponsor_id"/>
|
||||
<field name="is_excluded_suspension" readonly="1" force_save="1"/>
|
||||
<field name="is_excluded_suspension" invisible="1" readonly="1" force_save="1"/>
|
||||
<field name="member_status" readonly="1" widget="badge"
|
||||
decoration-success="member_status == 'benefit'"
|
||||
decoration-danger="member_status == 'non_benefit'"/>
|
||||
|
|
@ -445,6 +448,9 @@
|
|||
<field name="age_status"/>
|
||||
<field name="is_married"
|
||||
attrs="{'invisible':[('is_mother','=',True)]}"/>
|
||||
<field name="marriage_certificate"
|
||||
widget="many2many_attachment_preview"
|
||||
attrs="{'invisible':['|',('is_mother','=',True),('is_married','=',False)],'required':[('is_mother','=',False),('is_married','=',True)]}"/>
|
||||
<field name="mother_marital_conf"
|
||||
attrs="{'invisible':[('is_mother','=',False)]}"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
|
|
|
|||
|
|
@ -5376,7 +5376,7 @@ msgstr ""
|
|||
#: model_terms:ir.ui.view,arch_db:odex_benefit.family_member_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_benefit.grant_benefit_form
|
||||
msgid "File content"
|
||||
msgstr "الملف المرفق"
|
||||
msgstr "محتوى الملف"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__final_refusal_reason
|
||||
|
|
@ -8662,7 +8662,7 @@ msgstr "غير مستفيد"
|
|||
#: model_terms:ir.ui.view,arch_db:odex_benefit.family_member_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_benefit.grant_benefit_form
|
||||
msgid "Non Benefit Member"
|
||||
msgstr "فردغير مستفيد"
|
||||
msgstr "فرد غير مستفيد"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__non_member_count
|
||||
|
|
|
|||
|
|
@ -226,6 +226,7 @@ class GrantBenefitProfile(models.Model):
|
|||
mother_dead_reason = fields.Char(string='Dead Reason', required=False)
|
||||
mother_dead_date = fields.Date(string="Mother Certificate Date")
|
||||
mother_dead_certificate = fields.Many2many('ir.attachment', 'rel_mother_dead_attachment','benefit_id','attachment_id',string='Mother Dead Certificate')
|
||||
mother_family_member_id = fields.Many2one('family.member', string='Mother Family Member', domain="[('id','in',member_ids)]")
|
||||
member_ids = fields.One2many('family.member', 'benefit_id')
|
||||
# orphan
|
||||
orphan_ids = fields.Many2many('grant.benefit', 'orphan_list', 'id_number', 'mother_id',
|
||||
|
|
@ -243,6 +244,8 @@ class GrantBenefitProfile(models.Model):
|
|||
date_divorcee = fields.Date()
|
||||
# Education_data
|
||||
mother_education_status_ids = fields.One2many('education.status', 'mother_grant_benefit_id')
|
||||
mother_diseases_attachment_ids = fields.One2many('ir.attachment', 'mother_grant_benefit_id', string='Diseases Attachments',domain=[('diseases_id', '!=', False)])
|
||||
mother_disabilities_attachment_ids = fields.One2many('ir.attachment', 'mother_grant_benefit_id', string='Disabilities Attachments',domain=[('disabilities_id', '!=', False)])
|
||||
education_status = fields.Selection(string='Education Status',selection=[('educated', 'educated'), ('illiterate', 'illiterate'),('under_study_age','Under Study Age')])
|
||||
case_study = fields.Selection(string='Case Study',
|
||||
selection=[('continuous', 'continuous'), ('intermittent', 'intermittent'),
|
||||
|
|
@ -596,6 +599,14 @@ class GrantBenefitProfile(models.Model):
|
|||
def _expand_states(self, states, domain, order):
|
||||
return [key for key, val in type(self).state.selection if key != 'draft']
|
||||
|
||||
@api.constrains('short_number')
|
||||
def _check_short_number(self):
|
||||
pattern = re.compile(r'^[A-Za-z]{4}[0-9]{4}$')
|
||||
for record in self:
|
||||
if record.short_number and not pattern.match(record.short_number):
|
||||
raise ValidationError("Short Number must be 4 letters followed by 4 digits (e.g., ABCD1234).")
|
||||
|
||||
|
||||
@api.constrains('father_name', 'father_second_name', 'father_third_name', 'father_family_name',
|
||||
'mother_name', 'mother_second_name', 'mother_third_name', 'mother_family_name',
|
||||
'replacement_mother_name','replacement_mother_second_name','replacement_mother_third_name','replacement_mother_family_name')
|
||||
|
|
@ -966,7 +977,7 @@ class GrantBenefitProfile(models.Model):
|
|||
'message': _('Non-Saudi mothers and fathers cannot register')}
|
||||
return res
|
||||
|
||||
@api.onchange('father_id_number', 'mother_id_number', 'replacement_mother_id_number')
|
||||
@api.constrains('father_id_number', 'mother_id_number', 'replacement_mother_id_number')
|
||||
def _onchange_id_numbers(self):
|
||||
id_numbers = {
|
||||
'رقم هوية الأب': self.father_id_number,
|
||||
|
|
@ -1002,7 +1013,7 @@ class GrantBenefitProfile(models.Model):
|
|||
if id_number == self.father_id_number:
|
||||
conflict = self.env['grant.benefit'].search([
|
||||
('id', '!=', self._origin.id),
|
||||
'|', '|',
|
||||
'|',
|
||||
('mother_id_number', '=', id_number),
|
||||
('replacement_mother_id_number', '=', id_number),
|
||||
], limit=1)
|
||||
|
|
@ -1013,7 +1024,7 @@ class GrantBenefitProfile(models.Model):
|
|||
else:
|
||||
conflict = self.env['grant.benefit'].search([
|
||||
('id', '!=', self._origin.id),
|
||||
'|', '|', '|',
|
||||
'|', '|',
|
||||
('father_id_number', '=', id_number),
|
||||
('mother_id_number', '=', id_number),
|
||||
('replacement_mother_id_number', '=', id_number),
|
||||
|
|
@ -1812,10 +1823,15 @@ class GrantBenefitProfile(models.Model):
|
|||
'last_education_start_date': rec.last_education_start_date,
|
||||
'last_education_end_date': rec.last_education_end_date,
|
||||
'last_educational_certificate': rec.last_educational_certificate,
|
||||
'benefit_id': rec.id,
|
||||
}
|
||||
self.write({
|
||||
'member_ids': [(0, 0, val)]
|
||||
})
|
||||
mother_family_member_id = self.env['family.member'].create(val)
|
||||
rec.write({'mother_family_member_id': mother_family_member_id.id})
|
||||
for r in rec.mother_diseases_attachment_ids:
|
||||
r.write({'member_id': mother_family_member_id.id})
|
||||
for r in rec.mother_disabilities_attachment_ids:
|
||||
r.write({'member_id': mother_family_member_id.id})
|
||||
|
||||
def add_replacement_mother_as_member(self):
|
||||
for rec in self:
|
||||
mother_name = rec.get_replacement_mother_name()
|
||||
|
|
@ -1910,6 +1926,7 @@ class GrantBenefitProfile(models.Model):
|
|||
member = self.member_ids.browse(id)
|
||||
if member:
|
||||
member.write(val)
|
||||
|
||||
def replace_replacement_mother_as_member(self, id):
|
||||
for rec in self:
|
||||
mother_name = rec.get_replacement_mother_name()
|
||||
|
|
|
|||
|
|
@ -52,9 +52,12 @@ class FamilyMemberProfile(models.Model):
|
|||
default='non_minor', compute='_compute_get_age_status',store=True
|
||||
)
|
||||
is_work = fields.Boolean('Is Work?')
|
||||
salary_certificate = fields.Many2many('ir.attachment','member_salary_cert_rel','member_id','attachment_id',string="Salary Certificate")
|
||||
is_dead = fields.Boolean('Is Dead?')
|
||||
death_certificate = fields.Many2many('ir.attachment','member_death_cert_rel','member_id','attachment_id',string="Death Certificate")
|
||||
member_income = fields.Float('Member Income')
|
||||
is_married = fields.Boolean('Is Married?')
|
||||
marriage_certificate = fields.Many2many('ir.attachment','member_marriage_cert_rel','member_id','attachment_id',string="Marriage Certificate")
|
||||
relationn = fields.Many2one('relation.settings',domain="['|',('relation_type','=','son'),('relation_type','=','daughter')]",string="Relation")
|
||||
relation = fields.Selection(
|
||||
[('son', _('Son')), ('daughter', _('Daughter'))])
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ 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?')
|
||||
mother_grant_benefit_id = fields.Many2one('grant.benefit', string='Mother Grant Benefit')
|
||||
|
||||
def action_preview_attachment(self):
|
||||
# Custom function to open the preview
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ access_associations_line,access_associations_line,model_associations_line,,1,1,1
|
|||
access_hospital_hospital,access_hospital_hospital,model_hospital_hospital,,1,1,1,0
|
||||
access_insurance_type,access_insurance_type,model_insurance_type,,1,1,1,0
|
||||
access_housing_need,access_housing_need,model_housing_need,,1,1,1,0
|
||||
access_cars_line,access_cars_line,model_cars_line,,1,1,1,0
|
||||
access_cars_line,access_cars_line,model_cars_line,,1,1,1,1
|
||||
access_training_type,access_training_type,model_training_type,,1,1,1,0
|
||||
access_committees_line,access_committees_line,model_committees_line,,1,1,1,0
|
||||
access_benefit_followers,access_benefit_followers,model_benefit_followers,,1,1,1,0
|
||||
|
|
|
|||
|
|
|
@ -311,6 +311,7 @@
|
|||
<field name="member_income" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}" readonly="1" force_save="1"/>
|
||||
<field name="benefit_category_id" readonly="1" force_save="1"/>
|
||||
<field name="mother_family_member_id" readonly="1" force_save="1"/>
|
||||
</group>
|
||||
<group string="Contact Information">
|
||||
<field name="sms_phone" readonly="1"/>
|
||||
|
|
@ -464,7 +465,7 @@
|
|||
options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"
|
||||
groups="!odex_benefit.group_benefit_manager"
|
||||
required="1"/>
|
||||
<field name="mother_status" readonly="1" widget="badge"
|
||||
<field name="mother_status" invisible="1" readonly="1" widget="badge"
|
||||
decoration-success="mother_status == 'benefit'"
|
||||
decoration-danger="mother_status == 'non_benefit'"/>
|
||||
</group>
|
||||
|
|
@ -503,8 +504,37 @@
|
|||
<!-- <field name="is_mother_benefit"/>-->
|
||||
</group>
|
||||
</group>
|
||||
<h3>Education Status</h3>
|
||||
<field name="mother_education_status_ids" mode="tree,form"/>
|
||||
<notebook>
|
||||
<page string="Education Status">
|
||||
<field name="mother_education_status_ids" mode="tree,form"/>
|
||||
</page>
|
||||
<page string="Diseases">
|
||||
<field name="mother_diseases_attachment_ids" widget="one2many_list">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="diseases_id" required="1"/>
|
||||
<field name="datas" string="File content"/>
|
||||
<field name="expiration_date"/>
|
||||
<field name="attach_status"/>
|
||||
<field name="mother_grant_benefit_id" invisible="1"/>
|
||||
<field name="member_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Disabilities">
|
||||
<field name="mother_disabilities_attachment_ids" widget="one2many_list">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="disabilities_id" required="1"/>
|
||||
<field name="datas" string="File content"/>
|
||||
<field name="expiration_date"/>
|
||||
<field name="attach_status"/>
|
||||
<field name="mother_grant_benefit_id" invisible="1"/>
|
||||
<field name="member_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</page>
|
||||
<page string="Replacement Mother"
|
||||
attrs="{'invisible':[('add_replacement_mother','=',False)]}">
|
||||
|
|
@ -546,7 +576,8 @@
|
|||
attrs="{'readonly':[('state','not in',['draft','new','complete_info'])],'required':[('add_replacement_mother','=',True)]}"
|
||||
options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"
|
||||
groups="!odex_benefit.group_benefit_manager"/>
|
||||
<field name="replacement_mother_status" readonly="1" widget="badge"
|
||||
<field name="replacement_mother_status" invisible="1" readonly="1"
|
||||
widget="badge"
|
||||
decoration-success="replacement_mother_status == 'benefit'"
|
||||
decoration-danger="replacement_mother_status == 'non_benefit'"/>
|
||||
</group>
|
||||
|
|
@ -644,7 +675,7 @@
|
|||
attrs="{'invisible':[('is_mother','=',True)]}"/>
|
||||
<field name="member_location" force_save="1" invisible="1"/>
|
||||
<field name="member_location_conf" force_save="1"
|
||||
attrs="{'invisible':[('is_mother','=',True)]}"/>
|
||||
attrs="{'required':[('is_mother','=',False)],'invisible':[('is_mother','=',True)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="mother_second_name" force_save="1"
|
||||
|
|
@ -659,10 +690,16 @@
|
|||
<group>
|
||||
<group>
|
||||
<field name="is_dead"/>
|
||||
<field name="death_certificate"
|
||||
widget="many2many_attachment_preview"
|
||||
attrs="{'invisible':[('is_dead','=',False)],'required':[('is_dead','=',True)]}"/>
|
||||
<field name="minor_siblings"/>
|
||||
<!--<field name="gender" required="1"/>-->
|
||||
<field name="is_married"
|
||||
attrs="{'invisible':[('is_mother','=',True)]}"/>
|
||||
<field name="marriage_certificate"
|
||||
widget="many2many_attachment_preview"
|
||||
attrs="{'invisible':['|',('is_mother','=',True),('is_married','=',False)],'required':[('is_mother','=',False),('is_married','=',True)]}"/>
|
||||
<field name="mother_marital_conf"
|
||||
attrs="{'invisible':[('is_mother','=',False)]}"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
|
|
@ -676,17 +713,20 @@
|
|||
<group>
|
||||
<field name="is_work" attrs="{'invisible':[('age','<',18)]}"/>
|
||||
<field name="member_income"
|
||||
attrs="{'invisible':[('age','<',18)], 'required':[('is_work','=',True), ('age','>=',18)]}"/>
|
||||
attrs="{'invisible':['|',('age','<',18),('is_work','=',False)], 'required':[('is_work','=',True)]}"/>
|
||||
<field name="salary_certificate" widget="many2many_attachment_preview" attrs="{'invisible':['|',('age','<',18),('is_work','=',False)], 'required':[('is_work','=',True)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="sponsor_id"/>
|
||||
<field name="is_excluded_suspension" readonly="1" force_save="1"/>
|
||||
<field name="is_excluded_suspension" invisible="1" readonly="1"
|
||||
force_save="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="benefit_id" invisible="1"/>
|
||||
<field name="member_status" readonly="1" widget="badge"
|
||||
<field name="member_status" invisible="1" readonly="1"
|
||||
widget="badge"
|
||||
decoration-success="member_status == 'benefit'"
|
||||
decoration-danger="member_status == 'non_benefit'"/>
|
||||
</group>
|
||||
|
|
@ -697,12 +737,14 @@
|
|||
<tree editable="bottom">
|
||||
<field name="hobbies_id" required="1"/>
|
||||
<field name="name"/>
|
||||
<field name="datas" widget="binary"
|
||||
<field name="datas" widget="binary" string="File content"
|
||||
filename="attachment_file_name"/>
|
||||
<button name="action_preview_attachment" type="object"
|
||||
string="Preview Attachment"/>
|
||||
<button name="action_preview_attachment"
|
||||
type="object" icon="fa-search-plus"
|
||||
attrs="{'invisible': [('file_size', '=', 0)]}"/>
|
||||
<field name="attach_status"/>
|
||||
<field name="member_id" invisible="1"/>
|
||||
<field name="file_size" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
|
@ -711,13 +753,15 @@
|
|||
<tree editable="bottom">
|
||||
<field name="diseases_id" required="1"/>
|
||||
<field name="name"/>
|
||||
<field name="datas" widget="binary"
|
||||
<field name="datas" widget="binary" string="File content"
|
||||
filename="attachment_file_name"/>
|
||||
<button name="action_preview_attachment" type="object"
|
||||
string="Preview Attachment"/>
|
||||
<button name="action_preview_attachment"
|
||||
type="object" icon="fa-search-plus"
|
||||
attrs="{'invisible': [('file_size', '=', 0)]}"/>
|
||||
<field name="expiration_date"/>
|
||||
<field name="attach_status"/>
|
||||
<field name="member_id" invisible="1"/>
|
||||
<field name="file_size" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
|
@ -726,13 +770,15 @@
|
|||
<tree editable="bottom">
|
||||
<field name="disabilities_id" required="1"/>
|
||||
<field name="name"/>
|
||||
<field name="datas" widget="binary"
|
||||
<field name="datas" widget="binary" string="File content"
|
||||
filename="attachment_file_name"/>
|
||||
<button name="action_preview_attachment" type="object"
|
||||
string="Preview Attachment"/>
|
||||
<button name="action_preview_attachment"
|
||||
type="object" icon="fa-search-plus"
|
||||
attrs="{'invisible': [('file_size', '=', 0)]}"/>
|
||||
<field name="expiration_date"/>
|
||||
<field name="attach_status"/>
|
||||
<field name="member_id" invisible="1"/>
|
||||
<field name="file_size" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
|
@ -748,16 +794,18 @@
|
|||
attrs="{'readonly':[('is_default','=',True)]}"
|
||||
force_save="1"/>
|
||||
<field name="attach_id" invisible="1"/>
|
||||
<field name="datas" widget="binary"
|
||||
<field name="datas" widget="binary" string="File content"
|
||||
filename="attachment_file_name"/>
|
||||
<button name="action_preview_attachment" type="object"
|
||||
string="Preview Attachment"/>
|
||||
<button name="action_preview_attachment"
|
||||
type="object" icon="fa-search-plus"
|
||||
attrs="{'invisible': [('file_size', '=', 0)]}"/>
|
||||
<field name="expiration_date"/>
|
||||
<field name="attach_status"/>
|
||||
<field name="allow_days"/>
|
||||
<field name="benefit_id" invisible="1"/>
|
||||
<field name="is_required" invisible="1"/>
|
||||
<field name="is_default" invisible="1"/>
|
||||
<field name="file_size" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group>
|
||||
|
|
@ -919,7 +967,7 @@
|
|||
</form>
|
||||
</page>
|
||||
<page string="Family Loans">
|
||||
<field name="family_debits_ids"
|
||||
<field name="family_debits_ids" context="{'default_state': 'accepted'}"
|
||||
attrs="{'readonly':[('state','not in',['draft','new','complete_info'])]}">
|
||||
<form string="Family Loans">
|
||||
<sheet>
|
||||
|
|
@ -950,21 +998,12 @@
|
|||
<tree>
|
||||
<field name="loan_giver"/>
|
||||
<field name="loan_amount"/>
|
||||
<button name="action_accept" type="object" string="Accept"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':[('state','=','accepted')]}"
|
||||
groups="odex_benefit.group_accept_income_and_expenses"/>
|
||||
<button name="action_refuse" type="object" string="Refuse"
|
||||
class="oe_highlight" attrs="{'invisible':[('state','=','refused')]}"
|
||||
groups="odex_benefit.group_accept_income_and_expenses"/>
|
||||
<field name="state" readonly="1" force_save="1" widget="badge"
|
||||
decoration-success="state in ['accepted']"
|
||||
decoration-danger="state in ['refused']"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="expenses">
|
||||
<field name="expenses_ids"
|
||||
<field name="expenses_ids" context="{'default_state': 'accepted'}"
|
||||
attrs="{'readonly':[('state','not in',['draft','new','complete_info'])]}">
|
||||
<tree editable="top">
|
||||
<field name="benefit_id" invisible="1"/>
|
||||
|
|
@ -973,17 +1012,7 @@
|
|||
options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"/>
|
||||
<field name="note"/>
|
||||
<field name="amount" sum="amount"/>
|
||||
<button name="action_accept" type="object" string="Accept"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':[('state','=','accepted')]}"
|
||||
groups="odex_benefit.group_accept_income_and_expenses"/>
|
||||
<button name="action_refuse" type="object" string="Refuse"
|
||||
class="oe_highlight" attrs="{'invisible':[('state','=','refused')]}"
|
||||
groups="odex_benefit.group_accept_income_and_expenses"/>
|
||||
<field name="state" readonly="1" force_save="1" widget="badge"
|
||||
decoration-warning="state in ['waiting']"
|
||||
decoration-success="state in ['accepted']"
|
||||
decoration-danger="state in ['refused']"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
|
@ -1005,8 +1034,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
<group>
|
||||
<field name="income_required_attach"
|
||||
attrs="{'required':[('state','not in',['draft','new'])]}"/>
|
||||
<field name="income_required_attach" invisible="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<!-- <page string="Craft Skills" attrs="{'invisible': [('is_craft', '=', False)]}">-->
|
||||
|
|
@ -1228,13 +1256,15 @@
|
|||
attrs="{'readonly':[('state','not in',['draft','new','complete_info'])]}">
|
||||
<tree editable="bottom">
|
||||
<field name="benefit_id" invisible="1"/>
|
||||
<field name="member_id" options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"/>
|
||||
<field name="name"/>
|
||||
<field name="car_model" options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"/>
|
||||
<field name="member_id"
|
||||
options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"/>
|
||||
<field name="name" required="1"/>
|
||||
<field name="car_model" required="1"
|
||||
options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"/>
|
||||
<field name="status"/>
|
||||
<field name="application_form" widget="many2many_attachment_preview"/>
|
||||
<field name="driving_license" widget="many2many_attachment_preview"/>
|
||||
<field name="owner_identity" widget="many2many_attachment_preview"/>
|
||||
<field name="application_form" widget="many2many_attachment_preview"/>
|
||||
<field name="driving_license" widget="many2many_attachment_preview"/>
|
||||
<field name="owner_identity" widget="many2many_attachment_preview"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
|
|
|||
|
|
@ -119,10 +119,14 @@
|
|||
<group>
|
||||
<field name="is_dead"
|
||||
attrs="{'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
<field name="death_certificate" widget="many2many_attachment_preview"
|
||||
attrs="{'invisible':[('is_dead','=',False)],'readonly':[('state','not in',['draft','complete_info'])],'required':[('is_dead','=',True)]}"/>
|
||||
<field name="minor_siblings"
|
||||
attrs="{'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
<field name="is_married"
|
||||
attrs="{'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
<field name="marriage_certificate" widget="many2many_attachment_preview"
|
||||
attrs="{'invisible':[('is_married','=',False)],'readonly':[('state','not in',['draft','complete_info'])],'required':[('is_married','=',True)]}"/>
|
||||
<field name="mother_location_conf"
|
||||
attrs="{'invisible':['|',('relationn','=','mother'),('relationn','=','replacement_mother')]}"/>
|
||||
<field name="mother_location" invisible="1"/>
|
||||
|
|
@ -131,9 +135,10 @@
|
|||
</group>
|
||||
<group>
|
||||
<field name="is_work"
|
||||
attrs="{'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
attrs="{'invisible':[('age','<',18)],'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
<field name="member_income"
|
||||
attrs="{'required':[('is_work','=',True)],'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
attrs="{'invisible':['|',('age','<',18),('is_work','=',False)],'required':[('is_work','=',True)],'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
<field name="salary_certificate" widget="many2many_attachment_preview" attrs="{'invisible':['|',('age','<',18),('is_work','=',False)],'required':[('is_work','=',True)],'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
|
@ -145,12 +150,12 @@
|
|||
invisible="1"/>
|
||||
<field name="sponsorship_id"
|
||||
attrs="{'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
<field name="is_excluded_suspension" readonly="1" force_save="1"/>
|
||||
<field name="is_excluded_suspension" invisible="1" readonly="1" force_save="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="benefit_id" attrs="{'readonly': [('state','!=','draft')]}" force_save="1"
|
||||
required="1"/>
|
||||
<field name="member_status" readonly="1" widget="badge"
|
||||
<field name="member_status" invisible="1" readonly="1" widget="badge"
|
||||
decoration-success="member_status == 'benefit'"
|
||||
decoration-danger="member_status == 'non_benefit'"/>
|
||||
</group>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<field name="allow_days" invisible="1"/>
|
||||
<field name="is_required" invisible="1"/>
|
||||
<field name="is_default" invisible="1"/>
|
||||
<field name="mother_grant_benefit_id" invisible="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
Loading…
Reference in New Issue