odex30_standard/hr_job_request/views/job_request_view.xml

124 lines
6.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="job_request_form_view">
<field name="name">job_request_form_view</field>
<field name="model">hr.job.request</field>
<field name="arch" type="xml">
<form>
<header>
<button name="action_send" type="object" string="Send" class="oe_highlight"
invisible="state != 'draft'"
groups="hr_base.group_division_manager"/>
<button name="action_hr_manager" type="object" string="Confirm" class="oe_highlight"
invisible="state != 'recruitment_officer'"
groups="hr_recruitment.group_hr_recruitment_user"/>
<button name="action_refused" type="object" string="Refused" class="oe_highlight"
invisible="state != 'recruitment_officer'"
groups="hr_recruitment.group_hr_recruitment_user"/>
<button name="action_general_manager" type="object" string="Confirm"
class="oe_highlight"
invisible="state != 'hr_manager'"
groups="hr_recruitment.group_hr_recruitment_manager"/>
<button name="action_refused" type="object" string="Refused" class="oe_highlight"
invisible="state != 'hr_manager'"
groups="hr_recruitment.group_hr_recruitment_manager"/>
<button name="action_confirm" type="object" string="Confirm" class="oe_highlight"
invisible="state != 'general_manager'"
groups="hr_base.group_general_manager"/>
<button name="action_refused" type="object" string="Refused" class="oe_highlight"
invisible="state != 'general_manager'"
groups="hr_base.group_general_manager"/>
<button name="action_set_draft" type="object" string="Set To Draft" class="oe_highlight"
invisible="state not in ['refused', 'confirm']"
groups="hr_recruitment.group_hr_recruitment_user"
confirm="Are you sure to Reset To Draft This Record?"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name" placeholder="Name" readonly="state != 'draft'"/>
</h1>
</div>
<group string="Requesting Administration Information">
<group>
<field name="employee_id" readonly="state != 'draft'"/>
<field name="date" readonly="state != 'draft'"/>
</group>
<group>
<field name="department_id" readonly="state != 'draft'"/>
</group>
</group>
<group string="Job Details">
<group>
<field name="job_id" readonly="state != 'draft'"/>
<field name="job_related_department_id" readonly="state != 'draft'"/>
<field name="job_number" readonly="state != 'draft'"/>
<field name="job_type" readonly="state != 'draft'"/>
</group>
<group>
<field name="needed_employee" readonly="state != 'draft'"/>
<field name="working_location" readonly="state != 'draft'"/>
<field name="requested_start_date" readonly="state != 'draft'"/>
<field name="request_reason" readonly="state != 'draft'"/>
</group>
</group>
<group>
<group>
<field name="number_of_job_empty_total"/>
<field name="expected_employee"/>
</group>
<group>
<field name="quarter" invisible="1" readonly="state != 'draft'"/>
<field name="company_id" groups="base.group_multi_company"
readonly="state != 'draft'"/>
<field name="number_of_employees"/>
</group>
</group>
<notebook>
<page string="Job Requirements">
<field name="job_requirements"
nolabel="1"
colspan="2"
readonly="state != 'draft'"
placeholder="Job Requirements"/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record model="ir.ui.view" id="job_request_list_view">
<field name="name">job_request_list_view</field>
<field name="model">hr.job.request</field>
<field name="arch" type="xml">
<list>
<field name="job_id"/>
<field name="needed_employee"/>
<field name="number_of_job_empty_total"/>
<field name="expected_employee"/>
<field name="number_of_employees"/>
<field name="state" widget="badge"
decoration-success="state == 'confirm'"
decoration-info="state == 'draft'"
decoration-danger="state == 'refused'"
decoration-warning="state in ['recruitment_officer', 'hr_manager', 'general_manager']"/>
</list>
</field>
</record>
<record model="ir.actions.act_window" id="job_request_action">
<field name="name">Job Request</field>
<field name="res_model">hr.job.request</field>
<field name="view_mode">list,form</field>
</record>
</data>
</odoo>