odoo18/addons_extensions/requisitions/views/hr_requisition.xml

83 lines
4.6 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_hr_job_form" model="ir.ui.view">
<field name="name">view.hr.job.form</field>
<field name="model">hr.job</field>
<field name="inherit_id" ref="hr.view_hr_job_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='department_id']" position="before">
<field name="requested_by"/>
</xpath>
</field>
</record>
<record id="view_requisition_form" model="ir.ui.view">
<field name="name">requisition.form</field>
<field name="model">recruitment.requisition</field>
<field name="arch" type="xml">
<form string="Recruitment Requisition">
<header>
<button string="Submit" type="object" name="action_submit" invisible=" state != 'draft'"/>
<button string="Approve &amp; Create JD" type="object" name="action_approve" invisible=" state != 'waiting_approval'" groups="hr_recruitment.group_hr_recruitment_manager"/>
<button name="button_create_jd" type="object" string="Create JD" invisible=" state != 'approved'"/>
<button string="Cancel" type="object" name="action_cancel" invisible=" state in ('draft','done','cancel')"/>
<field name="state" widget="statusbar" statusbar_visible="draft,waiting_approval,done" readonly="1"/>
</header>
<sheet>
<div class="row justify-content-between position-relative w-100 m-0 mb-2">
<div class="oe_title mw-75 ps-0 pe-2">
<h1 class="d-flex flex-row align-items-center">
<field name="name" placeholder="Serial Number" required="True" readonly="1" force_save="1"/>
</h1>
</div>
</div>
<group>
<group>
<field name="department_id" readonly="state != 'draft'"/>
<field name="requested_by" readonly="1" widget="many2one_avatar_user"/>
<field name="requested_on" invisible="requested_on == False"/>
<field name="hr_manager_id" widget="many2one_avatar_user"/>
</group>
<group>
<field name="position_title" readonly="state != 'draft'"/>
<field name="number_of_positions" readonly="state != 'draft'"/>
<field name="primary_skill_ids" widget="many2many_tags" options="{'color_field': 'color'}" readonly="state != 'draft'"/>
<field name="secondary_skill_ids" widget="many2many_tags" options="{'color_field': 'color'}" readonly="state != 'draft'"/>
<field name="assign_to" invisible="state not in ['approved','waiting_approval','done']" options="{'no_quick_create': True, 'no_create_edit': True, 'no_open': True}"/>
<field name="job_id" invisible="job_id == False" readonly="1" force_save="1"/>
</group>
<field name="notes" placeholder="Remarks" readonly="state == 'done'"/>
</group>
<group string="Job Summary">
<field name="job_description" readonly="state == 'done'" nolabel="1" placeholder="Please enter the JD Hear"/>
</group>
</sheet>
<chatter reload_on_follower="True"/>
</form>
</field>
</record>
<record id="view_requisition_tree" model="ir.ui.view">
<field name="name">requisition.tree</field>
<field name="model">recruitment.requisition</field>
<field name="arch" type="xml">
<list string="Recruitment Requisitions">
<field name="name"/>
<field name="department_id"/>
<field name="requested_by"/>
<field name="state"/>
</list>
</field>
</record>
<record id="action_recruitment_requisition" model="ir.actions.act_window">
<field name="name">Recruitment Requisitions</field>
<field name="res_model">recruitment.requisition</field>
<field name="view_mode">list,form</field>
</record>
<menuitem id="menu_recruitment_requisition" name="Recruitment Requisition" parent="hr_recruitment.menu_hr_recruitment_root"/>
<menuitem id="menu_recruitment_requisition_main" name="Requisitions" parent="menu_recruitment_requisition" action="action_recruitment_requisition"/>
</odoo>