odex30_standard/employee_requests/views/customize_hr_employee.xml

146 lines
9.3 KiB
XML

<?xml version="1.0"?>
<odoo>
<data>
<record id="view_employee_form_leave_inherit_001" model="ir.ui.view">
<field name="name">hr.employee.leave.form.inherit_2</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='country_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='identification_id']" position="replace">
<group name="new_group" col="2" colspan="2">
<field name="country_id" options='{"no_open": True, "no_create": True}'
readonly="state != 'draft'"/>
<!--field name="identification_id" groups="hr.group_hr_user"
readonly="state != 'draft'"/-->
<field name="check_nationality" invisible="1"/>
<field name="religion" string="Religion" readonly="state != 'draft'"/>
<field name="blood_type" string="Blood Type" readonly="state != 'draft'"/>
</group>
</xpath>
<xpath expr="//group[@name='new_group']" position="inside">
<field name="date_of_employment" string="First Employment Date" readonly="state != 'draft'" invisible="1"/>
</xpath>
<xpath expr="//page[@name='personal_information']/group/group[2]" position="after">
<group name="passport_information" string="Passport or ID Information for employee" col="4"
colspan="4">
<field name="saudi_number" string="Saudi ID"
domain="[('employee_ref','=',id),('document_type','=','saudi')]"
context="{'default_employee_ref':id,'default_document_type':'saudi'}"
invisible="check_nationality == False" required="check_nationality == True" readonly="state != 'draft'"/>
<!-- ,'required':[('check_nationality','=',True)]-->
<field name="date_issuance_saudi_id" widget="date"
invisible="check_nationality == False"/>
<!-- ,'required':[('check_nationality','=',True)]-->
<field name="expiration_date_saudi_id" string="Saudi Expiry Date" widget="date"
invisible="check_nationality == False"/>
<field name="place_issuance_saudi_id" string="Place of issue"
invisible="check_nationality == False"/>
<field name="passport_id" domain="[('employee_ref','=',id),('document_type','=','passport')]"
readonly="state != 'draft'"
context="{'default_employee_ref':id,'default_document_type':'passport'}"/>
<field name="iqama_number" string="Identity No."
domain="[('employee_ref','=',id),('document_type','=','Iqama')]"
invisible="check_nationality == True" required="check_nationality == False" readonly="state != 'draft'"
context="{'default_employee_ref':id,'default_document_type':'Iqama'}"/>
<field name="date_issuance_passport" widget="date"
/>
<field name="emp_iqama_job" string="Identity Job"
invisible="check_nationality == True"/>
<field name="expiration_date_passport" string="Passport Expiry Date" widget="date"
/>
<field name="iqama_expiy_date" string="Identity Expiry Date"
invisible="check_nationality == True" required="check_nationality == False"/>
<field name="place_issuance_passport" string="Place Issue Passport"
invisible="check_nationality == True"/>
<field name="iqama_creat_date"
invisible="check_nationality == True" required="check_nationality == False"/>
</group>
</xpath>
<xpath expr="//field[@name='iqama_creat_date']" position="after">
<field name="own_license" string="Own a license" readonly="state != 'draft'"/>
</xpath>
<xpath expr="//field[@name='own_license']" position="after">
<field name="license_number_id" string="License number"
domain="[('employee_ref','=',id),('document_type','=','license')]"
invisible="own_license == False" readonly="state != 'draft'"
context="{'default_employee_ref':id,'default_document_type':'license'}"/>
<field name="expiry_license" string="License Expiry Date"
invisible="own_license == False" widget="date"/>
</xpath>
<xpath expr="//page[@name='hr_settings']" position="after">
<page name="medical_insurance" string="Accommodation and Medical insurance">
<group>
<group invisible="check_nationality == True">
<separator string="Guaranty" />
<field name="on_company_guarantee" string="On company guarantee?"
readonly="state != 'draft'"/>
<!--field name="validity_transfer_sponsorship" string="validity transfer of sponsorship"
readonly="state != 'draft'" invisible="on_company_guarantee == False"/-->
<field name="first_entry_into_saudi_arabia"
readonly="state != 'draft'" invisible="on_company_guarantee == False"
string="First date entry into Saudi Arabia"/>
</group>
<group>
<separator string="Insurances"
invisible="on_company_guarantee == False"/>
<field name="new_gosi" readonly="state != 'draft'"
invisible="on_company_guarantee == False"/>
<field name="residency_number" string="Insurances Number"
readonly="state != 'draft'" invisible="on_company_guarantee == False"/>
<field name="gosi_date"
readonly="state != 'draft'" invisible="on_company_guarantee == False"/>
<field name="gosi_years" invisible="on_company_guarantee == False or new_gosi == False"/>
<!--field name="expiration_date_residence" string="Expiration date of residence"
widget="date" readonly="state != 'draft'"/>
<field name="place_issuance_residence" string="Place issuance residence"
readonly="state != 'draft'"/-->
<!--field name="number_of_visa" string="Number of Visa"
readonly="state != 'draft'"/>
<field name="medical_exam_check"
invisible="check_nationality == True" required="check_nationality == False" readonly="state != 'draft'"/-->
</group>
</group>
<group>
<group>
<separator string="Medical Insurance"/>
<field name="medical_insurance" string="Medical insurance"
readonly="state != 'draft'"/>
<field name="degree_medical_insurance" string="Degree of medical insurance"
required="medical_insurance == True" readonly="state != 'draft'"/>
<field name="medical_insurance_number" string="Medical insurance number"
readonly="state != 'draft'"/>
<field name="copy_examination_file"
string="Copy of examination file"
domain="[('employee_ref','=',id),('document_type','=','medical_Examination')]"
readonly="state != 'draft'"
context="{'default_employee_ref':id,'default_document_type':'medical_Examination'}"/>
<!--field name="date_of_expiry" string="Date of expiry" widget="date"/-->
</group>
</group>
</page>
</xpath>
</field>
</record>
</data>
</odoo>