From 3f4c062023f80247ad97d4f3f03c48677751bf92 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 7 Jun 2016 15:03:58 +0200 Subject: [PATCH] [ADD] hr(_recruitement): onboarding tour Also some tweaks in views (mainly wording) --- addons/hr/models/hr.py | 4 +- addons/hr/views/hr_views.xml | 9 ++- addons/hr_recruitment/__openerp__.py | 2 + addons/hr_recruitment/models/hr_job.py | 4 ++ addons/hr_recruitment/static/src/js/tour.js | 36 +++++++++++ addons/hr_recruitment/views/hr_job_views.xml | 8 +-- .../views/hr_recruitment_templates.xml | 1 + .../views/hr_recruitment_views.xml | 63 +++++++++++++++---- addons/hr_recruitment/views/tour_views.xml | 7 +++ 9 files changed, 111 insertions(+), 23 deletions(-) create mode 100644 addons/hr_recruitment/static/src/js/tour.js create mode 100644 addons/hr_recruitment/views/tour_views.xml diff --git a/addons/hr/models/hr.py b/addons/hr/models/hr.py index e34eeaa151e..b51faaadb78 100644 --- a/addons/hr/models/hr.py +++ b/addons/hr/models/hr.py @@ -32,7 +32,7 @@ class Job(models.Model): _description = "Job Position" _inherit = ['mail.thread'] - name = fields.Char(string='Job Name', required=True, index=True, translate=True) + name = fields.Char(string='Job Title', required=True, index=True, translate=True) expected_employees = fields.Integer(compute='_compute_employees', string='Total Forecasted Employees', store=True, help='Expected number of employees for this job position after new recruitment.') no_of_employee = fields.Integer(compute='_compute_employees', string="Current Number of Employees", store=True, @@ -48,7 +48,7 @@ class Job(models.Model): company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.user.company_id) state = fields.Selection([ ('recruit', 'Recruitment in Progress'), - ('open', 'Recruitment Closed') + ('open', 'Not Recruiting') ], string='Status', readonly=True, required=True, track_visibility='always', copy=False, default='recruit', help="Set whether the recruitment process is open or closed for this job position.") _sql_constraints = [ diff --git a/addons/hr/views/hr_views.xml b/addons/hr/views/hr_views.xml index e20af0fbb55..bff1ec0c4fb 100644 --- a/addons/hr/views/hr_views.xml +++ b/addons/hr/views/hr_views.xml @@ -336,19 +336,19 @@
- - + +
@@ -358,7 +358,6 @@
-
diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py index d2214a3150f..1489c1ef49c 100644 --- a/addons/hr_recruitment/__openerp__.py +++ b/addons/hr_recruitment/__openerp__.py @@ -26,6 +26,7 @@ You can define the different phases of interviews and easily rate the applicant 'web_kanban_gauge', 'utm', 'document', + 'web_tour', ], 'data': [ 'security/hr_recruitment_security.xml', @@ -38,6 +39,7 @@ You can define the different phases of interviews and easily rate the applicant 'views/hr_recruitment_templates.xml', 'views/hr_department_views.xml', 'views/hr_job_views.xml', + 'views/tour_views.xml', ], 'demo': ['data/hr_recruitment_demo.xml'], 'test': ['test/recruitment_process.yml'], diff --git a/addons/hr_recruitment/models/hr_job.py b/addons/hr_recruitment/models/hr_job.py index a8bb7e18c79..bcbf5033661 100644 --- a/addons/hr_recruitment/models/hr_job.py +++ b/addons/hr_recruitment/models/hr_job.py @@ -91,3 +91,7 @@ class Job(models.Model): @api.multi def action_set_no_of_recruitment(self, value): return self.write({'no_of_recruitment': value}) + + @api.multi + def close_dialog(self): + return {'type': 'ir.actions.act_window_close'} diff --git a/addons/hr_recruitment/static/src/js/tour.js b/addons/hr_recruitment/static/src/js/tour.js new file mode 100644 index 00000000000..47fe9d60904 --- /dev/null +++ b/addons/hr_recruitment/static/src/js/tour.js @@ -0,0 +1,36 @@ +odoo.define('hr_recruitment.tour', function(require) { +"use strict"; + +var core = require('web.core'); +var tour = require('web_tour.tour'); + +var _t = core._t; + +tour.register('hr_recruitment_tour', { + 'skip_enabled': true, +}, [{ + trigger: '.o_app[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"], .oe_menu_toggler[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"]', + content: _t('Want to start recruiting like a pro? Start here.'), + position: 'bottom', +}, { + trigger: ".oe_kanban_action_button", + extra_trigger: '.o_hr_recruitment_kanban', + content: _t("Let\'s have a look at the applications pipeline for this job position."), + position: "bottom" +}, { + trigger: ".o_kanban_applicant .o_column_quick_create", + content: _t("Add columns to define the interview stages.
e.g. New > Qualified > First Interview > Recruited"), + position: "right" +}, { + trigger: ".breadcrumb li:not(.active):last", + extra_trigger: '.o_kanban_applicant', + content: _t("Use the breadcrumbs to go back to the dashboard."), + position: "bottom" +}, { + trigger: ".o_job_alias", + extra_trigger: '.o_hr_recruitment_kanban', + content: _t("Try to send an email to this address, it will create an application automatically."), + position: "bottom" +}]); + +}); diff --git a/addons/hr_recruitment/views/hr_job_views.xml b/addons/hr_recruitment/views/hr_job_views.xml index 68f2fb53cbb..74c2b6419e9 100644 --- a/addons/hr_recruitment/views/hr_job_views.xml +++ b/addons/hr_recruitment/views/hr_job_views.xml @@ -12,7 +12,7 @@ hr.job.kanban hr.job - + @@ -31,10 +31,8 @@
-
- - () - +
+
diff --git a/addons/hr_recruitment/views/hr_recruitment_templates.xml b/addons/hr_recruitment/views/hr_recruitment_templates.xml index b628713118b..45cf1317f0c 100644 --- a/addons/hr_recruitment/views/hr_recruitment_templates.xml +++ b/addons/hr_recruitment/views/hr_recruitment_templates.xml @@ -6,6 +6,7 @@ + diff --git a/addons/hr_recruitment/views/hr_recruitment_views.xml b/addons/hr_recruitment/views/hr_recruitment_views.xml index a8bc5a3dafc..50a11debc44 100644 --- a/addons/hr_recruitment/views/hr_recruitment_views.xml +++ b/addons/hr_recruitment/views/hr_recruitment_views.xml @@ -259,7 +259,7 @@ Hr Applicants kanban hr.applicant - + @@ -390,6 +390,41 @@ + + hr.job.simple.form + hr.job + 200 + +
+ + + + +
+
+
+
+
+
+ + Create a Job Position + hr.job + form + form + + new + + + hr.job.form1 hr.job @@ -454,13 +489,13 @@ hr.job form kanban,form - {'search_default_in_recruitment': 1} + {}

- Click here to create a new job. You can remove the "In Recruitment" filter to display all the job positions. -

-

- Define job position profile and manage recruitment in a context of a particular job: print interview survey, define number of expected new employees, and manage its recruitment pipe + Click here to create a new job position. +

+ Once a job position is created, you can track related applications + and manage the recruitment process.

@@ -474,10 +509,11 @@ {'search_default_in_recruitment': 1}

- Click here to create a new job. You can remove the "In Recruitment" filter to display all the job positions. -

-

- Define job position profile and manage recruitment in a context of a particular job: print interview survey, define number of expected new employees, and manage its recruitment pipe + Click here to create a new job position. +

+ Once a job position is created, you can track the applicants + and manage the recruitment process related to the job + position.

@@ -580,7 +616,12 @@ {'create': False}

- Search through resumes and motivation letters. + No document yet. +

+ This menu helps you search through resumes and motivation + letters. Odoo automatically indexes .PDF, .DOC, DOCX, .TXT + files so that you can search keywords from the content of these + files.

diff --git a/addons/hr_recruitment/views/tour_views.xml b/addons/hr_recruitment/views/tour_views.xml new file mode 100644 index 00000000000..6f6a9638aa3 --- /dev/null +++ b/addons/hr_recruitment/views/tour_views.xml @@ -0,0 +1,7 @@ + + + + + + +