odoo18/addons_extensions/requisitions/views/hr_requisition.xml

99 lines
6.6 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<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_hr" invisible=" state != 'draft'"/>
<button string="Send to FM" type="object" name="action_send_finance" invisible=" state != 'hr' or not is_hr"/>
<button string="Approve &amp; Proceed" type="object" name="action_send_hr" invisible=" state != 'finance' or not is_finance_manager"/>
<button string="Reject" type="object" name="action_finance_reject" invisible="state != 'finance' or not is_finance_manager" confirm="Are you sure you want to reject? Please ensure Finance comments are added."/>
<button string="Approve" type="object" name="action_final_approve" invisible=" state != 'final'"/>
<button string="Cancel" type="object" name="action_cancel" invisible="state in ('draft','jd_created','cancel') or not is_hr"/>
<field name="state" widget="statusbar" statusbar_visible="draft,hr,finance,final,jd_created" 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="requested_by" readonly="not is_hr" widget="many2one_avatar_user"/>
<field name="client_id" readonly="not is_hr" invisible="not is_hr" force_save="1"/>
<field name="recruitment_type" readonly="not is_hr" force_save="1"/>
<field name="requested_on" invisible="requested_on == False" readonly="not is_hr" force_save="1"/>
<field name="requested_deadline" readonly="state != 'draft'" invisible="state != 'draft' and not requested_deadline"/>
<field name="hr_manager_id" widget="many2one_avatar_user"/>
<field name="finance_manager_id" widget="many2one_avatar_user"/>
<field name="jd_file" filename="jd_file_name"
widget="binary" force_save="1"/>
<field name="jd_file_name" invisible="1" force_save="1"/>
</group>
<group>
<field name="job_id" invisible="job_id == False" readonly="1" force_save="1" options="{'no_quick_create':True,'no_open':True}"/>
<field name="number_of_positions" readonly="(state != 'draft' and not is_hr) or state == 'jd_created'"/>
<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="contract_type_id" readonly="state in ['jd_created']"/>
<field name="is_hr" invisible="1" force_save="1"/>
<field name="is_finance_manager" invisible="1" force_save="1"/>
<field name="assign_to" invisible="state not in ['final','jd_created']" options="{'no_quick_create': True, 'no_create_edit': True, 'no_open': True}"/>
<field name="target_startdate" invisible="1" readonly="state in ['jd_created']"/>
<field name="target_deadline" widget="daterange" string="Target Deadline" options="{'start_date_field': 'target_startdate'}" on_change="1" readonly="state in ['jd_created']"/>
</group>
<field name="notes" placeholder="Remarks" readonly="state == 'jd_created'" invisible="not notes"/>
</group>
<notebook>
<page string="Job Summary" name="job_summary">
<field name="job_description" readonly="state == 'jd_created'" nolabel="1" placeholder="Please enter the JD Hear"/>
</page>
<page name="finance_notes" string="Finance Comments" invisible="state == 'draft' or (not is_hr and not is_finance_manager)">
<group>
<field name="budget" placeholder="15.5 - 17.5LPA"/>
</group>
<group string="Comments">
<field name="finance_notes" nolabel="1" string="Comments" placeholder="Enter the Finance Comments in Hear..."/>
</group>
</page>
</notebook>
</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="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
name="Recruitment"
id="menu_hr_recruitment_root"
web_icon="hr_recruitment,static/description/icon.png"
groups="hr_recruitment.group_hr_recruitment_user,hr_recruitment.group_hr_recruitment_interviewer"
sequence="210"/>
<menuitem id="menu_recruitment_requisition" name="Recruitment Requisition" active='1' sequence="0" parent="hr_recruitment.menu_hr_recruitment_root"/>
<menuitem id="menu_recruitment_requisition_main" name="Requisitions" parent="menu_recruitment_requisition" action="action_recruitment_requisition"/>
</odoo>