146 lines
7.9 KiB
XML
146 lines
7.9 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
<data>
|
|
<record model="ir.actions.act_window" id="request_visa_action">
|
|
<field name="name">Request Visa</field>
|
|
<field name="res_model">hr.request.visa</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
|
|
<record id="request_visa_form_view" model="ir.ui.view">
|
|
<field name="name">Request Visa</field>
|
|
<field name="model">hr.request.visa</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Request Visa">
|
|
<header>
|
|
<button string="Employee Request" name="request" type="object" class="oe_highlight"
|
|
invisible="state != 'draft'"/>
|
|
|
|
<button string="Direct Manager" name="send" type="object" class="oe_highlight" invisible="state != 'request'"
|
|
groups="hr_base.group_division_manager"/>
|
|
<button string="Refuse" name="refuse" type="object" class="oe_highlight" invisible="state != 'request'"
|
|
groups="hr_base.group_division_manager"/>
|
|
|
|
<button string="Government Relations" name="hr_manager" type="object" class="oe_highlight"
|
|
invisible="state != 'send'"
|
|
groups="hr_base.group_government_relations"/>
|
|
<button string="Refuse" name="refuse" type="object" class="oe_highlight" invisible="state != 'send'"
|
|
groups="hr_base.group_government_relations"/>
|
|
<button string="HR Manager" name="financial_manager" class="oe_highlight" type="object"
|
|
invisible="state != 'confirm'"
|
|
groups="hr.group_hr_user, hr.group_hr_manager"/>
|
|
<button string="Re-draft" name="draft" type="object" class="oe_highlight" invisible="state not in ('refuse', 'done')"
|
|
groups="hr.group_hr_user" confirm="Are you sure to Reset To Draft This Record?"/>
|
|
<button string="Refuse" name="refuse" type="object" class="oe_highlight" invisible="state != 'confirm'"
|
|
groups="hr.group_hr_user, hr.group_hr_manager"/>
|
|
<field name="state" widget="statusbar"/>
|
|
|
|
</header>
|
|
|
|
<sheet>
|
|
<group string="Employee Info">
|
|
<group>
|
|
<field name="from_hr" string="Request via HR"
|
|
readonly="state != 'draft'"/>
|
|
<field name="employee_id" string="Employe" readonly="from_hr == False and state != 'draft'"/>
|
|
|
|
<field name="department_id" string="Department" readonly="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="date" string="Request Date" readonly="state != 'draft'"/>
|
|
</group>
|
|
</group>
|
|
<group string="Person Info">
|
|
<group>
|
|
<field name="name" string="Person Nmae" readonly="state != 'draft'" required="1"/>
|
|
<field name="passport" string="Passport Number" readonly="state != 'draft'" required="1"/>
|
|
<field name="passport_date" string="Passport Date" readonly="state != 'draft'"/>
|
|
<field name="birth_date" string="Birth Date" readonly="state != 'draft'"/>
|
|
<field name="religion" string="Religion" readonly="state != 'draft'"/>
|
|
</group>
|
|
|
|
<group>
|
|
<field name="working" string="Working" readonly="state != 'draft'"/>
|
|
<!-- <field name="activity" string="Activity" readonly="state != 'draft'"/>-->
|
|
<field name="job" string="Name Job" readonly="state != 'draft'"/>
|
|
<field name="nationality_id" string="Nationality" readonly="state != 'draft'"/>
|
|
<field name="note" string="Note" readonly="state != 'draft'"/>
|
|
</group>
|
|
|
|
<group string="Visa Type">
|
|
<div>
|
|
Onece
|
|
<field name="onece" readonly="state != 'draft'"/>
|
|
</div>
|
|
<div>
|
|
Multi
|
|
<field name="multi" readonly="state != 'draft'"/>
|
|
</div>
|
|
</group>
|
|
<group string="Visa Period">
|
|
<div>
|
|
<field name="one" readonly="state != 'draft'"/>
|
|
15
|
|
<field name="tow" readonly="state != 'draft'"/>
|
|
30
|
|
<field name="three" readonly="state != 'draft'"/>
|
|
90
|
|
<field name="four" readonly="state != 'draft'"/>
|
|
180
|
|
<field name="five" readonly="state != 'draft'"/>
|
|
365
|
|
<field name="sex" readonly="state != 'draft'"/>
|
|
1825
|
|
</div>
|
|
|
|
|
|
</group>
|
|
<group>
|
|
<field name="cost" string="Cost" readonly="state != 'send'"/>
|
|
<field name="account_journal_id" string="Journal"
|
|
required="cost > 0 and state == 'confirm'" readonly="state != 'confirm'"/>
|
|
<field name="account_debit_id" string="Account"
|
|
required="cost > 0 and state == 'confirm'" readonly="state != 'confirm'"/>
|
|
<field name="account_move_id" string="Account move" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
|
|
<notebook>
|
|
|
|
<page string="Attachment">
|
|
<field name="attach_ids" readonly="state != 'draft'">
|
|
<list string="Files" editable="bottom">
|
|
<field name="name" string="Attachment Name"/>
|
|
<field name="datas" string="File Content"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
|
|
|
|
</notebook>
|
|
</sheet>
|
|
<!--Discuss widgets for history and communication -->
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="request_visa_tree_view">
|
|
<field name="name">Request Visa</field>
|
|
<field name="model">hr.request.visa</field>
|
|
<field name="arch" type="xml">
|
|
<list decoration-success="state=='done'" decoration-danger="state == 'refuse'"
|
|
decoration-info="state == 'draft'" string="Request Visa">
|
|
<field name="employee_id"/>
|
|
<field name="name"/>
|
|
<field name="date"/>
|
|
<field name="note" string="Notes"/>
|
|
<field name="state"/>
|
|
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|