[IMP] hr_recruitment: improve usability (back2basics)
TaskID: 2053569 closes odoo/odoo#35767 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
committed by
Yannick Tivisse
parent
3bfde1891f
commit
d3a6330b2b
@@ -22,6 +22,8 @@
|
||||
<group name="recruitment">
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<field name="department_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="no_of_recruitment"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -1,6 +1,27 @@
|
||||
.o_kanban_view.o_kanban_dashboard {
|
||||
&.o_hr_recruitment_kanban.o_kanban_ungrouped .o_kanban_record {
|
||||
width: 350px;
|
||||
&.o_hr_recruitment_kanban.o_kanban_ungrouped {
|
||||
.o_kanban_record {
|
||||
width: 350px;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.ribbon {
|
||||
&::before, &::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
span {
|
||||
padding: 10px;
|
||||
z-index: unset;
|
||||
}
|
||||
}
|
||||
.ribbon-top-right {
|
||||
margin-top: -9px;
|
||||
}
|
||||
}
|
||||
|
||||
.o_kanban_record_subtitle {
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
.o_recruitment_kanban_boxes {
|
||||
@@ -9,7 +30,6 @@
|
||||
|
||||
.o_recruitment_kanban_box {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding: 0 0 0 0;
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
@@ -20,9 +40,10 @@
|
||||
justify-content: flex-start;
|
||||
padding-left: 16px;
|
||||
}
|
||||
&:last-child {
|
||||
div:last-child {
|
||||
justify-content: flex-end;
|
||||
padding-right: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.o_value {
|
||||
@@ -56,5 +77,12 @@
|
||||
.o_kanban_state_with_padding {
|
||||
padding-left:7%;
|
||||
padding-bottom:5%;
|
||||
width: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.o_recruitment_list {
|
||||
.o_list_button {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
@@ -27,9 +27,14 @@
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}">
|
||||
<div t-attf-class="o_kanban_card_header">
|
||||
<div class="o_kanban_card_header">
|
||||
<div class="o_kanban_card_header_title">
|
||||
<div class="o_primary col-12"><t t-esc="record.name.value"/></div>
|
||||
<div class="o_primary col-12">
|
||||
<span><t t-esc="record.name.value"/></span>
|
||||
</div>
|
||||
<div class="o_kanban_record_subtitle col-12 text-muted">
|
||||
<field name="user_id" />
|
||||
</div>
|
||||
<field name="is_favorite" widget="boolean_favorite" nolabel="1"/>
|
||||
<div t-if="record.alias_name.value and record.alias_domain.value and record.state.raw_value == 'recruit'" class="o_secondary o_job_alias">
|
||||
<small> <i class="fa fa-envelope-o" role="img" aria-label="Alias" title="Alias"></i> <field name="alias_id"/> </small>
|
||||
@@ -43,15 +48,15 @@
|
||||
<t t-if="record.state.raw_value == 'recruit'">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-secondary" name="%(action_hr_job_applications)d" type="action">Applications</button>
|
||||
<button class="btn btn-primary" name="%(action_hr_job_applications)d" type="action">
|
||||
<field name="application_count"/> Applications
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<field name="new_application_count"/> New Applications <br/>
|
||||
<field name="no_of_hired_employee"/> Hired Employees
|
||||
<field name="no_of_recruitment"/> To Recruit
|
||||
</div>
|
||||
</div>
|
||||
<div name="kanban_boxes" class="row o_recruitment_kanban_boxes">
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="record.state.raw_value == 'open'">
|
||||
<div class="row">
|
||||
@@ -60,6 +65,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<div name="kanban_boxes" class="row o_recruitment_kanban_boxes">
|
||||
<div class="o_recruitment_kanban_box o_kanban_primary_bottom bottom_block" style="padding-left:8px;">
|
||||
<div class="col-6"></div>
|
||||
<div class="col-6">
|
||||
<a type="action" name="%(action_hr_job_sources)d">Share Trackers</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_card_manage_pane dropdown-menu" role="menu">
|
||||
<div class="o_kanban_card_manage_section">
|
||||
@@ -89,6 +102,12 @@
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<filter string="My Job Positions" name="my_positions" domain="[('user_id', '=', uid)]"/>
|
||||
</xpath>
|
||||
<xpath expr="//group" position="after">
|
||||
<searchpanel>
|
||||
<field name="company_id" groups="base.group_multi_company" icon="fa-building"/>
|
||||
<field name="user_id" icon="fa-users"/>
|
||||
</searchpanel>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -88,12 +88,6 @@
|
||||
help="Schedule interview with this applicant">
|
||||
<field name="meeting_count" widget="statinfo" string="Meetings"/>
|
||||
</button>
|
||||
<button name="action_get_attachment_tree_view"
|
||||
class="oe_stat_button"
|
||||
icon="fa-file-text-o"
|
||||
type="object">
|
||||
<field name="attachment_number" widget="statinfo" string="Documents"/>
|
||||
</button>
|
||||
<button name="toggle_active" type="object"
|
||||
class="oe_stat_button" icon="fa-archive"
|
||||
attrs="{'invisible': [('active', '=', True)]}">
|
||||
@@ -164,7 +158,7 @@
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread" options="{'post_refresh': 'recipients'}"/>
|
||||
<field name="message_ids" widget="mail_thread" options="{'post_refresh': 'recipients', 'open_attachments': True}"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
@@ -471,8 +465,10 @@
|
||||
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||
</div>
|
||||
</div>
|
||||
<field name="user_id"/>
|
||||
</xpath>
|
||||
<field name="no_of_recruitment" position="after">
|
||||
<field name="user_id"/>
|
||||
</field>
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button"
|
||||
icon="fa-pencil"
|
||||
@@ -820,10 +816,10 @@ action = act
|
||||
<field name="name">hr.recruitment.source.tree</field>
|
||||
<field name="model">hr.recruitment.source</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sources of Applicants" editable="top">
|
||||
<tree string="Sources of Applicants" editable="top" class="o_recruitment_list">
|
||||
<field name="source_id"/>
|
||||
<button name="create_alias" string="Generate email alias" type="object" icon="fa-repeat text-success" />
|
||||
<field name="email"/>
|
||||
<button name="create_alias" string="Create alias" type="object" icon="fa-repeat text-success" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -928,7 +924,7 @@ action = act
|
||||
<filter string="Department" name="department" context="{'group_by':'department_id'}"/>
|
||||
<filter string="Stage" name="stage" context="{'group_by':'stage_id'}" />
|
||||
<separator/>
|
||||
<filter string="Creation Date" name="creation_week" context="{'group_by':'create_date:week'}" help="Creation Date"/>
|
||||
<filter string="Creation Date" name="creation_month" context="{'group_by':'create_date:month'}" help="Creation Date"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -941,9 +937,9 @@ action = act
|
||||
<field name="search_view_id" ref="hr_applicant_view_search"/>
|
||||
<field name="view_ids" eval="[
|
||||
(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'pivot', 'view_id': ref('hr_applicant_view_pivot')}),
|
||||
(0, 0, {'view_mode': 'graph', 'view_id': ref('hr_applicant_view_graph')})]"/>
|
||||
<field name="context">{}</field> <!-- force empty -->
|
||||
(0, 0, {'view_mode': 'graph', 'view_id': ref('hr_applicant_view_graph')}),
|
||||
(0, 0, {'view_mode': 'pivot', 'view_id': ref('hr_applicant_view_pivot')})]"/>
|
||||
<field name="context">{'search_default_creation_month': 1, 'search_default_job': 2}</field>
|
||||
</record>
|
||||
<menuitem name="Reporting" id="report_hr_recruitment" parent="menu_hr_recruitment_root"
|
||||
sequence="99"/>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<field name="model">hr.job</field>
|
||||
<field name="inherit_id" ref="hr_recruitment.hr_job_survey"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='address_id']" position="before">
|
||||
<xpath expr="//field[@name='user_id']" position="before">
|
||||
<label for="survey_id" groups="survey.group_survey_user"/>
|
||||
<div groups="survey.group_survey_user" class="o_row">
|
||||
<field name="survey_id"
|
||||
|
||||
@@ -59,7 +59,6 @@ var Chatter = Widget.extend({
|
||||
|
||||
this.attachments = {};
|
||||
this.fields = {};
|
||||
|
||||
this._areAttachmentsLoaded = false;
|
||||
this._disableAttachmentBox = !!options.disable_attachment_box;
|
||||
this._dp = new concurrency.DropPrevious();
|
||||
@@ -84,6 +83,7 @@ var Chatter = Widget.extend({
|
||||
this.hasLogButton = options.display_log_button || nodeOptions.display_log_button;
|
||||
this.postRefresh = nodeOptions.post_refresh || 'never';
|
||||
this.reloadOnUploadAttachment = this.postRefresh === 'always';
|
||||
this.openAttachments = nodeOptions.open_attachments || false;
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -390,6 +390,9 @@ var Chatter = Widget.extend({
|
||||
// disable widgets in create mode, otherwise enable
|
||||
self._isCreateMode ? self._disableChatter() : self._enableChatter();
|
||||
$spinner.remove();
|
||||
if (self.openAttachments) {
|
||||
self._onClickAttachmentButton();
|
||||
}
|
||||
};
|
||||
|
||||
return def.then(function () {
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
<field name="name"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_area o_kanban_attachment">
|
||||
<div class="oe_kanban_global_area oe_kanban_global_click o_kanban_attachment">
|
||||
<div class="row">
|
||||
<div class="offset-10">
|
||||
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,14 +5,18 @@
|
||||
<field name="model">hr.job</field>
|
||||
<field name="inherit_id" ref="hr_recruitment.view_hr_job_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='kanban_boxes']" position="inside">
|
||||
<field name="website_url" invisible="1"/>
|
||||
<div class="o_recruitment_kanban_box o_kanban_primary_bottom bottom_block" style="padding-left:8px; text-align:right">
|
||||
<span>
|
||||
<a t-attf-href="#{record.website_url.raw_value}">Website Description</a>
|
||||
</span>
|
||||
<xpath expr="//div[hasclass('o_kanban_card_header')]" position="before">
|
||||
<field name="website_published" invisible="1"/>
|
||||
<div class="ribbon ribbon-top-right" attrs="{'invisible': [('website_published', '=', False)]}">
|
||||
<span class="bg-success">Published</span>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='kanban_boxes']/div/div[1]" position="inside">
|
||||
<field name="website_url" invisible="1"/>
|
||||
<span>
|
||||
<a t-attf-href="#{record.website_url.raw_value}">Job Description</a>
|
||||
</span>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<field name="model">hr.recruitment.source</field>
|
||||
<field name="inherit_id" ref="hr_recruitment.hr_recruitment_source_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='create_alias']" position="before">
|
||||
<xpath expr="//field[@name='email']" position="after">
|
||||
<field name="url" widget="url"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user