odoo/addons/hr_recruitment/hr_recruitment_view.xml

669 lines
35 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
<openerp>
<data>
<menuitem
id="menu_hr_recruitment_recruitment"
name="Recruitment"
parent="hr.menu_hr_configuration"
sequence="40" />
<act_window
domain="[('applicant_id', '=', active_id)]"
id="act_hr_applicant_to_meeting"
name="Meetings"
res_model="crm.meeting"
src_model="hr.applicant"
view_mode="tree,form,calendar,graph"
view_type="form"/>
# ------------------------------------------------------
# Job Categories
# ------------------------------------------------------
<record id="hr_job_categ_action" model="ir.actions.act_window">
<field name="name">Applicant Categories</field>
<field name="res_model">crm.case.categ</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
<field name="domain">[('object_id.model', '=', 'hr.applicant')]</field>
<field name="context" eval="{'object_id': ref('model_hr_applicant')}"/>
</record>
# ------------------------------------------------------
# Stage
# ------------------------------------------------------
<record id="hr_job_stage_act" model="ir.actions.act_window">
<field name="name">Recruitment / Applicants Stages</field>
<field name="res_model">hr.recruitment.stage</field>
<field name="view_type">form</field>
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="help">Define here your stages of the recruitment process, for example: qualification call, first interview, second interview, refused, hired.</field>
</record>
# ------------------------------------------------------
# Jobs
# ------------------------------------------------------
<record model="ir.ui.view" id="crm_case_tree_view_job">
<field name="name">Applicants</field>
<field name="model">hr.applicant</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Applicants" fonts="bold:needaction_pending==True" colors="grey:state in ('cancel','done');blue:state=='pending'">
<field name="needaction_pending" invisible="1"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="name" string="Subject"/>
<field name="partner_name"/>
<field name="email_from"/>
<field name="partner_phone"/>
<field name="job_id"/>
<field name="stage_id"/>
<field name="title_action" invisible="context.get('invisible_next_action', True)"/>
<field name="date_action" invisible="context.get('invisible_next_date', True)"/>
<field name="source_id" invisible="1"/>
<field name="survey" invisible="1"/>
<field name="response" invisible="1"/>
<field name="priority"/>
<field name="type_id" invisible="1"/>
<field name="availability" invisible="1"/>
<field name="department_id" invisible="context.get('invisible_department', True)"/>
<field name="user_id"/>
<field name="state" groups="base.group_no_one"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="crm_case_form_view_job">
<field name="name">Jobs - Recruitment Form</field>
<field name="model">hr.applicant</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Jobs - Recruitment Form" version="7.0">
<header>
<button name="%(action_hr_recruitment_hired_employee)d" string="Hire" type="action"
states="open,pending"/>
<button name="case_open" string="Open" type="object"
states="draft,pending"/>
<button name="case_pending" string="Pending" type="object"
states="open"/>
<button name="case_reset" string="Reset to New" type="object"
states="done,cancel"/>
<button name="case_cancel" string="Refuse" type="object"
states="draft,open,pending"/>
<button name="stage_previous" string="Previous" type="object"
states="open" icon="gtk-go-back"/>
<button name="stage_next" string="Next" type="object"
states="open" icon="gtk-go-forward"/>
<field name="stage_id" widget="statusbar"/>
</header>
<sheet>
<div class="oe_right oe_form_button_box">
<button name="action_makeMeeting" type="object" string="Schedule Interview" icon="gtk-index" help="Schedule interview with this applicant"/>
<button name="%(survey.action_view_survey_question_message)d" string="Start Interview" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant'}" attrs="{'invisible':[('survey','=',False)]}" help="Answer related job question"/>
<button name="action_print_survey" string="Print Interview" type="object" icon="gtk-print" attrs="{'invisible':[('survey','=',False)]}" help="Print interview report"/>
</div>
<div class="oe_form_title">
<label for="name" class="oe_form_readonly_hidden"/>
<h1><field name="name"/></h1>
<field name="type_id" placeholder="Degree"/>
</div>
<group>
<group>
<field name="partner_name"/>
<field name="user_id"/>
<field name="title_action"/>
<field name="date_action"/>
</group>
<group>
<field name="job_id" on_change="onchange_job(job_id)"/>
<field name="priority" string="Appreciation"/>
<field name="survey" invisible="1"/>
<field name="response" invisible="1"/>
<field name="department_id" widget="selection" on_change="onchange_department_id(department_id)"/>
<field name="state" groups="base.group_no_one"/>
</group>
</group>
<notebook>
<page string="Application">
<group>
<group string="Contact">
<label for="partner_id"/>
<div>
<field name="partner_id" class="oe_form_inline" on_change="onchange_partner_id(partner_id, email_from)"/>
<button class="oe_form_inline"
string="Create Contact" icon="gtk-index"
name="%(action_hr_recruitment_partner_create)d" type="action"
attrs="{'invisible':[('partner_id','!=',False)]}"/>
</div>
<field name="email_from" widget="email"/>
<field name="partner_phone"/>
<field name="partner_mobile"/>
</group>
<group string="Reference">
<field name="source_id"/>
<field name="reference"/>
</group>
<group string="Contract">
<field name="salary_expected"/>
<field name="salary_expected_extra"/>
<field name="salary_proposed"/>
<field name="salary_proposed_extra"/>
<field name="availability"/>
</group>
</group>
<separator string="Details"/>
<field name="description"/>
</page>
</notebook>
</sheet>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>
<record model="ir.ui.view" id="crm_case_graph_view_job">
<field name="name">Jobs - Recruitment Graph</field>
<field name="model">hr.applicant</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Cases By Stage and Estimates" type="bar" orientation="vertical">
<field name="job_id"/>
<field name="salary_expected" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_case_jobs_filter" model="ir.ui.view">
<field name="name">Jobs - Recruitment Search</field>
<field name="model">hr.applicant</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Jobs">
<filter icon="terp-document-new" string="New" name="filter_new"
domain="[('state','=','draft')]"
help="All Initial Jobs"
/>
<filter icon="terp-camera_test" string="In Progress" name="filter_inprogress"
domain="[('state','=','open')]"
help="Open Jobs"
/>
<filter icon="terp-gtk-media-pause" string="Pending"
domain="[('state','=','pending')]"
help="Pending Jobs"
/>
<separator orientation="vertical"/>
<filter icon="terp-gtk-jump-to-ltr" string="Next Actions"
context="{'invisible_next_action':False, 'invisible_next_date':False}"
domain="[('date_action','&lt;&gt;',False)]"
help="Filter and view on next actions and date"/>
<separator orientation="vertical"/>
<field name="partner_name" filter_domain="['|','|',('name','ilike',self),('partner_name','ilike',self),('email_from','ilike',self)]" string="Subject / Applicant"/>
<field name="job_id" widget="selection"/>
<field name="user_id">
<filter domain="[('user_id','=',False)]" help="Unassigned Recruitments" icon="terp-personal-" />
</field>
<newline/>
<group expand="0" string="Group By...">
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
<separator orientation="vertical"/>
<filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
<filter string="Degree" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'type_id'}"/>
<filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'availability'}"/>
<separator orientation="vertical"/>
<filter string="Appreciation" icon="terp-face-plain" domain="[]" context="{'group_by':'priority'}"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Source" icon="terp-face-plain" domain="[]" context="{'group_by':'source_id'}"/>
<separator orientation="vertical" groups="base.group_no_one"/>
<filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
</group>
</search>
</field>
</record>
<!-- CRM Lead Calendar View -->
<record model="ir.ui.view" id="hr_applicant_calendar_view">
<field name="name">Hr Applicants Calendar</field>
<field name="model">hr.applicant</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Applicants"
date_start="date_action" color="user_id">
<field name="name" />
<field name="partner_name" />
<field name="title_action"/>
</calendar>
</field>
</record>
<!-- hr Applicant Kanban View -->
<record model="ir.ui.view" id="hr_kanban_view_applicant">
<field name="name">Hr Applicants kanban</field>
<field name="model">hr.applicant</field>
<field name="type">kanban</field>
<field name="arch" type="xml">
<kanban default_group_by="stage_id">
<field name="color"/>
<field name="state" groups="base.group_no_one"/>
<field name="priority"/>
<field name="survey"/>
<field name="user_id"/>
<field name="user_email"/>
<field name="partner_name"/>
<field name="type_id"/>
<field name="job_id"/>
<field name="title_action"/>
<templates>
<t t-name="kanban-box">
<t t-if="record.priority.raw_value == '1'" t-set="border">oe_kanban_color_green</t>
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_auto_height">
<a class="oe_kanban_menuaction oe_i">B</a>
<ul class="oe_kanban_menu">
<li><a type="edit">Edit...</a></li>
<li><a type="delete">Delete</a></li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
<div class="oe_kanban_content" >
<h3 class="oe_kanban_ellipsis"><field name="name"/>
</h3>
<div style="margin-bottom:2;padding-top:5px;white-space: nowrap;" >
<field name="partner_name"/>
<div class="oe_kanban_right">
<span class="oe_kanban_highlight">
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3">
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['5']" t-if="priority lte 3">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['2']">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['1']">
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
</span>
</div>
</div>
<div style="white-space: nowrap;" >
<div t-if="record.type_id.raw_value">
(<field name="type_id"/>)
</div>
</div>
<div style="padding-top:5px;white-space: nowrap;" >
<t t-if="record.job_id.raw_value">Applied for <field name="job_id" /></t>
</div>
<div style="padding-top:5px;white-space: nowrap;" >
<t t-if="record.title_action.raw_value">
<field name="title_action" /> on
<field name="date_action" />
</t>
</div>
<div align="left" width="22" style="padding-top:5px;white-space: nowrap;" >
<div align="right">
<img t-att-src="kanban_image('res.users', 'avatar', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
# ------------------------------------------------------
# HR Job
# ------------------------------------------------------
<record id="hr_job_survey" model="ir.ui.view">
<field name="name">hr.job.form1</field>
<field name="model">hr.job</field>
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_hr_job_form"/>
<field name="arch" type="xml">
<field name="expected_employees" position="after">
<field name="survey_id" />
<button name="action_print_survey" string="Interview" type="object" icon="gtk-print" attrs="{'invisible':[('survey_id','=',False)]}"/>
</field>
</field>
</record>
<!-- Stage Tree View -->
<record model="ir.ui.view" id="hr_recruitment_stage_tree">
<field name="name">hr.recruitment.stage.tree</field>
<field name="model">hr.recruitment.stage</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Stages">
<field name="sequence" invisible="1"/>
<field name="name"/>
<field name="department_id"/>
<field name="state"/>
</tree>
</field>
</record>
<!-- Stage Form View -->
<record model="ir.ui.view" id="hr_recruitment_stage_form">
<field name="name">hr.recruitment.stage.form</field>
<field name="model">hr.recruitment.stage</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Stage" version="7.0">
<group colspan="4" col="6">
<separator string="Stage Definition" colspan="6"/>
<field name="name" select="1"/>
<field name="department_id"/>
<field name="sequence"/>
<field name="state"/>
</group>
<separator string="Requirements" colspan="4"/>
<field name="requirements" nolabel="1" colspan="4"/>
</form>
</field>
</record>
<!-- Stage Action -->
<record id="hr_recruitment_stage_act" model="ir.actions.act_window">
<field name="name">Stages</field>
<field name="res_model">hr.recruitment.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_recruitment_stage_tree"/>
<field name="help"> Check if the following stages are matching your recruitment process. Don't forget to specify the department if your recruitment process is different according to the job position.</field>
</record>
<menuitem
id="menu_hr_recruitment_stage"
name="Stages"
parent="menu_hr_recruitment_recruitment"
action="hr_recruitment_stage_act"
sequence="1" groups="base.group_no_one"/>
<!-- Degree Tree View -->
<record model="ir.ui.view" id="hr_recruitment_degree_tree">
<field name="name">hr.recruitment.degree.tree</field>
<field name="model">hr.recruitment.degree</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Degree">
<field name="sequence" invisible="1"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- Degree Form View -->
<record model="ir.ui.view" id="hr_recruitment_degree_form">
<field name="name">hr.recruitment.degree.form</field>
<field name="model">hr.recruitment.degree</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Degree" version="7.0">
<field name="name" select="1"/>
<field name="sequence"/>
</form>
</field>
</record>
<!-- Degree Action -->
<record id="hr_recruitment_degree_action" model="ir.actions.act_window">
<field name="name">Degree</field>
<field name="res_model">hr.recruitment.degree</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_recruitment_degree_tree"/>
</record>
<menuitem
id="menu_hr_recruitment_degree"
name="Degrees"
parent="menu_hr_recruitment_recruitment"
action="hr_recruitment_degree_action"
sequence="5" groups="base.group_no_one"/>
<!-- Source Tree View -->
<record model="ir.ui.view" id="hr_recruitment_source_tree">
<field name="name">hr.recruitment.source.tree</field>
<field name="model">hr.recruitment.source</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Sources of Applicants">
<field name="name"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="hr_recruitment_source_form">
<field name="name">hr.recruitment.source.form</field>
<field name="model">hr.recruitment.source</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sources of Applicants">
<field name="name"/>
</form>
</field>
</record>
<record id="hr_recruitment_source_action" model="ir.actions.act_window">
<field name="name">Sources of Applicants</field>
<field name="res_model">hr.recruitment.source</field>
<field name="view_type">form</field>
</record>
<menuitem
id="menu_hr_recruitment_source"
parent="menu_hr_recruitment_recruitment"
action="hr_recruitment_source_action"
sequence="10" groups="base.group_no_one"/>
<record model="ir.ui.view" id="crm_case_form_view_meet1">
<field name="name">CRM - Meetings Form</field>
<field name="model">crm.meeting</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Meetings" version="7.0">
<header>
<button name="case_open" string="Confirm" type="object"
states="draft"/>
<button name="case_close" string="Done" type="object"
states="open"/>
<button name="case_reset" string="Reset to Unconfirmed" type="object"
states="cancel,done"/>
<button name="case_cancel" string="Cancel" type="object"
states="draft,open"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done"/>
</header>
<sheet>
<group col="6" colspan="4">
<field name="name" select="1" string="Title"
required="1" />
<field name="categ_id" widget="selection"
string="Meeting Type"
domain="[('object_id.model', '=', 'crm.meeting')]" />
<field name="allday" on_change="onchange_dates(date,False,False,allday)" />
<newline/>
<field name="date" string="Start Date" required="1"
on_change="onchange_dates(date,duration,False,allday)" />
<field name="duration" widget="float_time"
on_change="onchange_dates(date,duration,False,allday)" />
<field name="date_deadline" string="End Date" required="1"
on_change="onchange_dates(date,False,date_deadline)" />
<field name="location" />
<field name="alarm_id" string="Reminder"
widget="selection" />
<group colspan="2" col="4" attrs="{'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">
<field name="recurrency" string="Recurrence"/>
</group>
</group>
<notebook colspan="4">
<page string="Meeting">
<group col="6" colspan="4">
<group col="2" colspan="2">
<separator colspan="2" string="Assignment"/>
<field name="user_id" />
<field name="organizer"/>
</group><group col="2" colspan="2">
<separator colspan="2" string="Contacts"/>
<field name="applicant_id" string="Application"/>
<field name="email_from"/>
</group><group col="2" colspan="2">
<separator colspan="2" string="Visibility"/>
<field name="class" string="Privacy"/>
<field name="show_as" string="Show Time as"/>
<field name="rrule" invisible="1" readonly="1"/>
<field name="recurrent_id" invisible="1"/>
<field name="recurrent_uid" invisible="1"/>
</group>
</group>
<separator string="Description" colspan="4" />
<field name="description" nolabel="1" colspan="4" />
</page>
<page string="Invitation Detail">
<button string="Invite People"
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
icon="terp-partner" type="action"
attrs="{'readonly': [('state', '=', 'done')]}"
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
<field name="attendee_ids" colspan="4"
nolabel="1" widget="one2many" mode="tree,form">
<tree string="Invitation details" editable="top">
<field name="sent_by_uid" string="From"/>
<field name="user_id" string="To"/>
<field name="email" string="Mail To"/>
<field name="role" select="1" />
<field name="state" />
<button name="do_tentative"
states="needs-action,declined,accepted"
string="Uncertain" type="object"
icon="terp-crm" />
<button name="do_accept" string="Accept"
states="needs-action,tentative,declined"
type="object" icon="gtk-apply" />
<button name="do_decline" string="Decline"
states="needs-action,tentative,accepted"
type="object" icon="gtk-cancel" />
<button
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
string="Delegate" type="action"
icon="gtk-sort-descending"
states="needs-action,tentative,declined,accepted"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
</tree>
<form string="Invitation details">
<notebook colspan="4">
<page string="Details">
<field name="email" />
<field name="rsvp" select="1" />
<field name="cutype" select="1" />
<field name="role" select="1" />
<separator colspan="4" string="" />
<group col="6" colspan="4">
<field name="state" />
<button name="do_tentative"
states="needs-action,declined,accepted"
string="Uncertain"
type="object"
icon="terp-crm" />
<button name="do_accept"
string="Accept"
states="needs-action,tentative,declined"
type="object"
icon="gtk-apply" />
<button name="do_decline"
string="Decline"
states="needs-action,tentative,accepted"
type="object"
icon="gtk-cancel" />
<button
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
string="Delegate"
type="action"
icon="gtk-sort-descending"
states="needs-action,tentative,declined,accepted"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
</group>
</page>
<page string="Other">
<field name="user_id"/>
<newline />
</page>
</notebook>
</form>
</field>
</page>
<page string="Recurrence Options" attrs="{'invisible': [('recurrency','=',False)], 'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">
<group col="4" colspan="4" name="rrule">
<group col="4" colspan="4">
<field name="rrule_type" string=" Recurrence Pattern" />
<field name="interval" />
<separator string="End of Recurrence" colspan="4"/>
<field name="end_type" />
<label string=" " colspan="2" />
<newline />
<field name="count" attrs="{'invisible' : [('end_type', '!=', 'count')] }"/>
<label string=" " colspan="2" />
<newline />
<field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date')]}"/>
<newline />
</group>
<group col="8" colspan="4" name="Select weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
<separator string="Choose day where repeat the meeting" colspan="8"/>
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="10" colspan="4"
attrs="{'invisible' : [('rrule_type','!=','monthly')]}">
<separator string="Choose day in the month where repeat the meeting" colspan="12"/>
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1">
<field name="day"
attrs="{'required' : [('select1','=','date'), ('rrule_type','=','monthly')],
'invisible' : [('select1','=','day')]}" />
</group>
<group col="3" colspan="1">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')], 'invisible' : [('select1','=','date')]}" />
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')], 'invisible' : [('select1','=','date')]}" />
</group>
</group>
</group>
</page>
</notebook>
</sheet>
<div class="oe_form_bottom">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
</data>
</openerp>