odex30_standard/exp_employee_custody/views/employee_custody_views.xml

126 lines
6.9 KiB
XML

<?xml version="1.0"?>
<odoo>
<data>
<record model="ir.actions.act_window" id="employee_custody_action">
<field name="name">Employee Custody</field>
<field name="res_model">custom.employee.custody</field>
<field name="view_mode">list,form</field>
</record>
<record model="ir.ui.view" id="employee_custody_form_view">
<field name="name">Employee Custody</field>
<field name="model">custom.employee.custody</field>
<field name="arch" type="xml">
<form>
<header>
<button name="submit" string="submit" class="oe_highlight" type="object"
invisible="state != 'draft'"
groups="base.group_user"/>
<button name="direct" string="Direct Manager" class="oe_highlight" type="object"
invisible="state != 'submit'"
groups="hr_base.group_division_manager"/>
<button name="refuse" string="Refuse" class="oe_highlight" type="object"
invisible="state != 'submit'"
groups="hr_base.group_division_manager"/>
<button name="admin" string="Human Resources Manager" class="oe_highlight" type="object"
invisible="state != 'direct'"
groups="hr.group_hr_manager"/>
<button name="refuse" string="Refuse" class="oe_highlight" type="object"
invisible="state != 'direct'"
groups="hr.group_hr_manager"/>
<button name="approve" string="Warehouse Keeper" class="oe_highlight" type="object"
invisible="state != 'admin'"
groups="hr_base.group_general_manager,hr_base.group_executive_manager"/>
<button name="refuse" string="Refuse" class="oe_highlight" type="object"
invisible="state != 'admin'"
groups="hr_base.group_general_manager,hr_base.group_executive_manager"/>
<button name="done" string="Return Done" class="oe_highlight" type="object"
invisible="state != 'approve'"
groups="hr.group_hr_user"/>
<button name="refuse" string="Refuse" class="oe_highlight" type="object"
invisible="state != 'approve'"
groups="hr.group_hr_user"/>
<button name="draft" string="Rest To Draft" class="oe_highlight" type="object"
invisible="state != 'done'"
groups="hr.group_hr_user"/>
<button name="draft" string="Rest To Draft" class="oe_highlight" type="object"
invisible="state != 'refuse'"
groups="hr.group_hr_user"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<group>
<group>
<field name="current_date" string="Date" required="1"
readonly="state != 'draft'"/>
<field name="from_hr_department" string="Other Employee"
readonly="state != 'draft'"/>
<field name="employee_id" string="Employee"
readonly="from_hr_department == False"
required="True"/>
<field name="employee_no" string="Employee Number" readonly="1"/>
</group>
<group>
<field name="department_id" string="Department" readonly="1"/>
<field name="job_id" string="Job Title" readonly="1"/>
<field name="country_id" string="Nationality" readonly="1"/>
<field name="receiving_custody" string="receiving_custody" invisible="1"/>
</group>
</group>
<notebook>
<page string="Custody Lines">
<field name="custody_line_ids"
readonly="state != 'draft'">
<list string="Custody Lines" editable="top">
<field name="name" required="1" string="Description"/>
<field name="serial" string="Identification code" groups="hr.group_hr_user,hr_base.group_general_manager,hr_base.group_executive_manager"/>
<field name="quantity" required="1" string="Quantity"/>
<field name="receiving_quantity" readonly="1" string="Receiving Quantity"/>
<field name="note" string="Notes"/>
<field name="receiving_date" string="Date Delivering"/>
<field name="amount" string="Amount" readonly="1" groups="hr.group_hr_user,hr_base.group_general_manager,hr_base.group_executive_manager"/>
</list>
</field>
</page>
</notebook>
<field name="note"/>
</sheet>
<!--Discuss widgets for history and communication -->
<chatter/>
</form>
</field>
</record>
<record model="ir.ui.view" id="employee_custody_tree_view">
<field name="name">Employee Custody</field>
<field name="model">custom.employee.custody</field>
<field name="arch" type="xml">
<list decoration-danger="state == 'refuse'" decoration-info="state == 'draft'" string="Employee Custody">
<field name="current_date" string="Date"/>
<field name="employee_id" string="Employee"/>
<field name="department_id" string="Department"/>
<field name="state" string="Status"/>
</list>
</field>
</record>
<menuitem name="Custody" id="custody_submenu"
parent="employee_requests.employee_request_menu_item" sequence="11"/>
<menuitem name="Employee Custody" id="employee_custody"
parent="custody_submenu" action="employee_custody_action"/>
</data>
</odoo>