From ab64129ac50f93da98b1c308de39528cfcd2704c Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Thu, 28 Mar 2013 18:33:38 +0530 Subject: [PATCH 001/344] [IMP] Hr-Recruitment:Improved Kanban view on job position bzr revid: ggh@tinyerp.com-20130328130338-2igc32a7qsc23dxu --- addons/hr/hr_view.xml | 3 +- addons/hr_recruitment/hr_recruitment.py | 4 ++ addons/hr_recruitment/hr_recruitment_menu.xml | 2 +- addons/hr_recruitment/hr_recruitment_view.xml | 44 +++++++++++++++++++ 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index e0c3edfdb39..3ebc0b8ee34 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -375,7 +375,7 @@ - + Job hr.job @@ -434,7 +434,6 @@ - diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index deccf10619f..8cde174f746 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -493,6 +493,10 @@ class hr_job(osv.osv): _name = "hr.job" _inherits = {'mail.alias': 'alias_id'} _columns = { + 'name': fields.char('Job Name', size=128, required=True, select=True), + 'no_of_recruitment': fields.float('Expected in Recruitment', help='Number of new employees you expect to recruit.'), + 'department_id': fields.many2one('hr.department', 'Department'), + 'color': fields.integer('Color Index'), 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, help="Email alias for this job position. New emails will automatically " diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index dbd4335d730..e5e170f4b35 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -66,7 +66,7 @@ parent="base.menu_crm_case_job_req_main" id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="1"/> - + diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index ccf5c8f7934..75f63ca97dd 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -321,6 +321,50 @@ + + + hr.job.kanban + hr.job + + + + + + + + +
+
+ i +
+
+

+
+ +
+
+ Employees +
+
+
+
+
+
+
+ + + + + Job Positions + hr.job + form + kanban,tree,form + From 7702943aecc1af17317eea22f2019ceaad987df2 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Fri, 29 Mar 2013 15:47:43 +0530 Subject: [PATCH 002/344] [IMP]improve code bzr revid: vja@tinyerp.com-20130329101743-5yltwjpd706wj4zi --- addons/hr_recruitment/hr_recruitment.py | 4 ---- addons/hr_recruitment/hr_recruitment_view.xml | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 8cde174f746..deccf10619f 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -493,10 +493,6 @@ class hr_job(osv.osv): _name = "hr.job" _inherits = {'mail.alias': 'alias_id'} _columns = { - 'name': fields.char('Job Name', size=128, required=True, select=True), - 'no_of_recruitment': fields.float('Expected in Recruitment', help='Number of new employees you expect to recruit.'), - 'department_id': fields.many2one('hr.department', 'Department'), - 'color': fields.integer('Color Index'), 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, help="Email alias for this job position. New emails will automatically " diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 75f63ca97dd..ce78d403fd6 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -330,10 +330,9 @@ - -
+
i
    From a9b4d527b2b975e739f4c3ad2ffdb0fb50b95e00 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Fri, 29 Mar 2013 18:08:27 +0530 Subject: [PATCH 003/344] [IMP]Improve code bzr revid: vja@tinyerp.com-20130329123827-8cxamllyjuqrczz3 --- addons/hr_recruitment/hr_recruitment_menu.xml | 60 +------------------ addons/hr_recruitment/hr_recruitment_view.xml | 60 +++++++++++++++++-- 2 files changed, 58 insertions(+), 62 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index e5e170f4b35..39fdf2dcccf 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -1,58 +1,6 @@ - - ######################## JOB OPPORTUNITIES (menu) ########################### - - Applications - hr.applicant - kanban,tree,form,graph,calendar - - - -

    - Click to add a new job applicant. -

    - OpenERP helps you track applicants in the recruitment - process and follow up all operations: meetings, interviews, etc. -

    - If you setup the email gateway, applicants and their attached - CV are created automatically when an email is sent to - jobs@yourcompany.com. If you install the document management - modules, all resumes are indexed automatically, so that you can - easily search through their content. -

    -
    -
    - - - - kanban - - - - - - - tree - - - - - - - form - - - - - - - graph - - - - - + - - - - + id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="2"/>
    diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index ce78d403fd6..094a9ad7caf 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -295,7 +295,56 @@ + ######################## JOB OPPORTUNITIES (menu) ########################### + + Applications + hr.applicant + kanban,tree,form,graph,calendar + + + +

    + Click to add a new job applicant. +

    + OpenERP helps you track applicants in the recruitment + process and follow up all operations: meetings, interviews, etc. +

    + If you setup the email gateway, applicants and their attached + CV are created automatically when an email is sent to + jobs@yourcompany.com. If you install the document management + modules, all resumes are indexed automatically, so that you can + easily search through their content. +

    +
    +
    + + + kanban + + + + + + + tree + + + + + + + form + + + + + + + graph + + + hr.job.form1 @@ -330,6 +379,7 @@ +
    @@ -343,11 +393,13 @@

    -
    - -
    +

    - Employees +
    Expected in Recruitment
    + + Applications + Application +
From ccb758a4aa65842c01bb632cc076de89a73fae14 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Mon, 1 Apr 2013 16:50:10 +0530 Subject: [PATCH 004/344] [IMP]indentation and display message_summary bzr revid: vja@tinyerp.com-20130401112010-4paw5r6w7e5xs8kb --- addons/hr_recruitment/hr_recruitment_view.xml | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 094a9ad7caf..3eddfe8c275 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -295,8 +295,9 @@ - ######################## JOB OPPORTUNITIES (menu) ########################### - + + ######################## JOB OPPORTUNITIES (menu) ########################### + Applications hr.applicant kanban,tree,form,graph,calendar @@ -316,35 +317,36 @@ easily search through their content.

-
+
- + kanban - + - + tree - + - + form - + - + graph - + + hr.job.form1 @@ -380,11 +382,12 @@ + -
+
- i + í
-

+
+
Expected in Recruitment
- +
+
From c6c64ae8b5e6d1373b5a004b902424c17e6f6e2e Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Mon, 1 Apr 2013 18:53:04 +0530 Subject: [PATCH 005/344] [IMP]Minor change bzr revid: vja@tinyerp.com-20130401132304-giaqs5idsic8n5q0 --- addons/hr_recruitment/hr_recruitment_menu.xml | 51 +++++++++++++++ addons/hr_recruitment/hr_recruitment_view.xml | 65 +++---------------- 2 files changed, 60 insertions(+), 56 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index 39fdf2dcccf..009029d7524 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -1,6 +1,57 @@ + ######################## JOB OPPORTUNITIES (menu) ########################### + + Applications + hr.applicant + kanban,tree,form,graph,calendar + + + +

+ Click to add a new job applicant. +

+ OpenERP helps you track applicants in the recruitment + process and follow up all operations: meetings, interviews, etc. +

+ If you setup the email gateway, applicants and their attached + CV are created automatically when an email is sent to + jobs@yourcompany.com. If you install the document management + modules, all resumes are indexed automatically, so that you can + easily search through their content. +

+
+
+ + + + kanban + + + + + + + tree + + + + + + + form + + + + + + + graph + + + + - - ######################## JOB OPPORTUNITIES (menu) ########################### - - Applications - hr.applicant - kanban,tree,form,graph,calendar - - - -

- Click to add a new job applicant. -

- OpenERP helps you track applicants in the recruitment - process and follow up all operations: meetings, interviews, etc. -

- If you setup the email gateway, applicants and their attached - CV are created automatically when an email is sent to - jobs@yourcompany.com. If you install the document management - modules, all resumes are indexed automatically, so that you can - easily search through their content. -

-
-
- - - kanban - - - - - - - tree - - - - - - - form - - - - - - - graph - - - - hr.job.form1 @@ -373,6 +322,13 @@ + + Applications + hr.applicant + kanban,tree,form,graph,calendar + {'search_default_job_id': [active_id], 'default_job_id': active_id} + + hr.job.kanban hr.job @@ -395,18 +351,16 @@
-
+
-
Expected in Recruitment
- -
@@ -414,7 +368,6 @@
- Job Positions From 4d1905fa5eecd0c9cc8c2550e76d4c44453c04de Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Tue, 2 Apr 2013 12:20:52 +0530 Subject: [PATCH 006/344] [IMP] Recruitment: count applicant priority ratio in job position bzr revid: ggh@tinyerp.com-20130402065052-ghvng16dau69dpca --- addons/hr_recruitment/hr_recruitment.py | 27 ++++++++++++++++--- addons/hr_recruitment/hr_recruitment_menu.xml | 2 +- addons/hr_recruitment/hr_recruitment_view.xml | 24 ++++++++++++++--- 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 8cde174f746..2477bc18f78 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -492,15 +492,36 @@ class hr_job(osv.osv): _inherit = "hr.job" _name = "hr.job" _inherits = {'mail.alias': 'alias_id'} + + def _count_priority(self, cr, uid, ids, name, args, context=None): + res = {} + for position in self.browse(cr, uid,ids, context=context): + res[position.id] = {} + priority1 = 0 + priority2 = 0 + priority3 = 0 + applicant_obj = self.pool.get('hr.applicant') + a_ids = applicant_obj.search(cr, uid, [('job_id', '=', position.id)], context=context) + for applicant in self.pool.get('hr.applicant').browse(cr, uid, a_ids, context=context): + if applicant.job_id.id == position.id: + if applicant.priority == '3': + priority1 += 1 + elif applicant.priority == '2': + priority2 += 1 + elif applicant.priority == '1': + priority3 += 1 + else: + pass + res[position.id] = {'priority1': priority1, 'priority2': priority2, 'priority3': priority3} + return res + _columns = { - 'name': fields.char('Job Name', size=128, required=True, select=True), - 'no_of_recruitment': fields.float('Expected in Recruitment', help='Number of new employees you expect to recruit.'), - 'department_id': fields.many2one('hr.department', 'Department'), 'color': fields.integer('Color Index'), 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, help="Email alias for this job position. New emails will automatically " "create new applicants for this job position."), + 'priority_count': fields.function(_count_priority, string='Total Priority Employees', type="char"), } _defaults = { 'alias_domain': False, # always hide alias during creation diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index e5e170f4b35..009a03289a1 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -66,7 +66,7 @@ parent="base.menu_crm_case_job_req_main" id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="1"/> - + diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 75f63ca97dd..952cc9e55be 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -331,6 +331,7 @@ +
@@ -344,11 +345,26 @@

+
+ Employees +
- + + + + + +
+ + + + +
+ + + +
-
- Employees
@@ -359,7 +375,7 @@ - + Job Positions hr.job form From 77410101c2b1ad1146d332cbb9a77b057855f322 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Wed, 3 Apr 2013 11:14:54 +0530 Subject: [PATCH 007/344] [IMP] hr_recruitment: manager image set in jobposition kanban bzr revid: ggh@tinyerp.com-20130403054454-e7jt6ayolrxeevqc --- addons/hr_recruitment/hr_recruitment.py | 12 ++++++++++++ addons/hr_recruitment/hr_recruitment_view.xml | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 2477bc18f78..670b31c289b 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -515,6 +515,17 @@ class hr_job(osv.osv): res[position.id] = {'priority1': priority1, 'priority2': priority2, 'priority3': priority3} return res + def _get_department_mgr(self, cr, uid, ids, name, args, context=None): + res = {} + for obj_job in self.browse(cr, uid,ids, context=context): + + res[obj_job.id] = {} + if obj_job.department_id: + emp_ids = self.pool.get('hr.employee').search(cr, uid, [('id', '=', obj_job.department_id.manager_id.id)], context=context) + if emp_ids: + res[obj_job.id] = emp_ids + return res + _columns = { 'color': fields.integer('Color Index'), 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), @@ -522,6 +533,7 @@ class hr_job(osv.osv): help="Email alias for this job position. New emails will automatically " "create new applicants for this job position."), 'priority_count': fields.function(_count_priority, string='Total Priority Employees', type="char"), + 'user_id': fields.function(_get_department_mgr, string='Department Manager', type="char"),#manager image in kanban } _defaults = { 'alias_domain': False, # always hide alias during creation diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 952cc9e55be..ff6e8f50abb 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -332,6 +332,7 @@ +
@@ -345,7 +346,8 @@

-
+ +

Employees
From b8d2569a5a3aee63c853c1a950ed2047c9191662 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Wed, 3 Apr 2013 12:45:29 +0530 Subject: [PATCH 008/344] [IMP] Demo data color add in kanban bzr revid: ggh@tinyerp.com-20130403071529-qmm2f9rcrwx23f96 --- addons/hr/hr_demo.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/hr/hr_demo.xml b/addons/hr/hr_demo.xml index 3f34a703475..42d24fc7d29 100644 --- a/addons/hr/hr_demo.xml +++ b/addons/hr/hr_demo.xml @@ -31,11 +31,13 @@ Chief Executive Officer + 3 Chief Technical Officer + 5 @@ -46,6 +48,7 @@ Developer + 2 From d1e9bfab5ef3f006a2907c479899c3b9940ef6f2 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Wed, 3 Apr 2013 16:12:29 +0530 Subject: [PATCH 009/344] [IMP] hr_recruitment: Improve code bzr revid: ggh@tinyerp.com-20130403104229-kgfdhg94lygfzvfz --- addons/hr/hr.py | 1 + addons/hr_recruitment/hr_recruitment.py | 14 ++++++++++---- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 467f34f708b..2f2494aea81 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -118,6 +118,7 @@ class hr_job(osv.osv): 'company_id': fields.many2one('res.company', 'Company'), 'state': fields.selection([('open', 'No Recruitment'), ('recruit', 'Recruitement in Progress')], 'Status', readonly=True, required=True, help="By default 'In position', set it to 'In Recruitment' if recruitment process is going on for this job position."), + 'color': fields.integer('Color Index'), } _defaults = { 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr.job', context=c), diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 670b31c289b..d09b6430e01 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -494,6 +494,8 @@ class hr_job(osv.osv): _inherits = {'mail.alias': 'alias_id'} def _count_priority(self, cr, uid, ids, name, args, context=None): + """Applicant, priority count like number of star 3,2,1(star rating) + """ res = {} for position in self.browse(cr, uid,ids, context=context): res[position.id] = {} @@ -501,8 +503,8 @@ class hr_job(osv.osv): priority2 = 0 priority3 = 0 applicant_obj = self.pool.get('hr.applicant') - a_ids = applicant_obj.search(cr, uid, [('job_id', '=', position.id)], context=context) - for applicant in self.pool.get('hr.applicant').browse(cr, uid, a_ids, context=context): + rate_ids = applicant_obj.search(cr, uid, [('job_id', '=', position.id)], context=context) + for applicant in self.pool.get('hr.applicant').browse(cr, uid, rate_ids, context=context): if applicant.job_id.id == position.id: if applicant.priority == '3': priority1 += 1 @@ -516,14 +518,18 @@ class hr_job(osv.osv): return res def _get_department_mgr(self, cr, uid, ids, name, args, context=None): + """get manager image for specific job position. + """ res = {} + employee_obj = self.pool.get('hr.employee') for obj_job in self.browse(cr, uid,ids, context=context): res[obj_job.id] = {} if obj_job.department_id: - emp_ids = self.pool.get('hr.employee').search(cr, uid, [('id', '=', obj_job.department_id.manager_id.id)], context=context) + emp_ids = employee_obj.search(cr, uid, [('id', '=', obj_job.department_id.manager_id.id)], context=context) if emp_ids: - res[obj_job.id] = emp_ids + for employee in employee_obj.browse(cr, uid, emp_ids, context=context): + res[obj_job.id] = {'id':employee.id, 'name': employee.name} return res _columns = { diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index ff6e8f50abb..f8dabe70915 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -347,7 +347,7 @@

-

+

Employees
From 66e897a31dd717c4e1ed843c5c895a387ca69feb Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Wed, 3 Apr 2013 17:22:25 +0530 Subject: [PATCH 010/344] [IMP] Improved kanban view in hr_recruitment bzr revid: ggh@tinyerp.com-20130403115225-w44mmr7mo25r2mxr --- addons/hr_recruitment/hr_recruitment_view.xml | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index f70b2e55b4f..1408296ed4a 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -354,37 +354,35 @@
-

- -

- Employees - -
- - - - - -
- - - - -
- - - - -

+

+ Employees +
Expected in Recruitment
+
+ + + + + +
+ + + + +
+ + + + +
From 5003f09d78777b78ed894800335e0eace1ba7079 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Wed, 3 Apr 2013 18:26:38 +0530 Subject: [PATCH 011/344] [Rem] Remove code bzr revid: ggh@tinyerp.com-20130403125638-vq0qtl7byslv97nr --- addons/hr_recruitment/hr_recruitment.py | 1 - addons/hr_recruitment/hr_recruitment_view.xml | 3 --- 2 files changed, 4 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index d09b6430e01..3698eb20838 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -533,7 +533,6 @@ class hr_job(osv.osv): return res _columns = { - 'color': fields.integer('Color Index'), 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, help="Email alias for this job position. New emails will automatically " diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 1408296ed4a..7b723408310 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -358,8 +358,6 @@


- Employees -
Expected in Recruitment
Applications @@ -391,7 +389,6 @@ - Job Positions From b4e50d23e49c0093e82958916c0082522b309d5c Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Thu, 4 Apr 2013 10:45:48 +0530 Subject: [PATCH 012/344] [IMP] hr_recruitment: Improve code bzr revid: ggh@tinyerp.com-20130404051548-wuvqgt1dvza9rm9e --- addons/hr_recruitment/hr_recruitment_menu.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index 0fcbd7bbff2..25501c99afd 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -59,12 +59,11 @@ sequence="1"/> + - - + id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="2"/> From 07c0e087d9485390432e7213173e00619ddd3f07 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Thu, 4 Apr 2013 11:36:08 +0530 Subject: [PATCH 013/344] [IMP]Improve Code bzr revid: vja@tinyerp.com-20130404060608-nfm6xrq53qcbl1un --- addons/hr_recruitment/__openerp__.py | 1 + addons/hr_recruitment/hr_recruitment_view.xml | 9 +++++---- addons/hr_recruitment/static/src/css/job_position.css | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 addons/hr_recruitment/static/src/css/job_position.css diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py index 749af25e765..6cbb32fdab3 100644 --- a/addons/hr_recruitment/__openerp__.py +++ b/addons/hr_recruitment/__openerp__.py @@ -61,6 +61,7 @@ You can define the different phases of interviews and easily rate the applicant ], 'demo': ['hr_recruitment_demo.yml'], 'test': ['test/recruitment_process.yml'], + 'css':['static/src/css/job_position.css'], 'installable': True, 'auto_install': False, 'application': True, diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 0546c3a7f29..f01dfd7f23b 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -344,7 +344,7 @@ -
+
í
    @@ -354,10 +354,11 @@
- -
+

+
+
+

-

Expected in Recruitment
Applications diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css new file mode 100644 index 00000000000..2d26094836b --- /dev/null +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -0,0 +1,5 @@ + +.openerp .oe_kanban_job { + width: 230px; + min-height: 140px !important; +} \ No newline at end of file From 22bd170d6dec9a19732bcd5d50149cb18a6a8e1d Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Thu, 4 Apr 2013 12:57:47 +0530 Subject: [PATCH 014/344] [IMP]Count total number of application bzr revid: vja@tinyerp.com-20130404072747-b2ez9113w7x185el --- addons/hr_recruitment/hr_recruitment.py | 2 +- addons/hr_recruitment/hr_recruitment_view.xml | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 3698eb20838..533c04c3bd5 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -514,7 +514,7 @@ class hr_job(osv.osv): priority3 += 1 else: pass - res[position.id] = {'priority1': priority1, 'priority2': priority2, 'priority3': priority3} + res[position.id] = {'priority1': priority1, 'priority2': priority2, 'priority3': priority3, 'total_application':len(rate_ids)} return res def _get_department_mgr(self, cr, uid, ids, name, args, context=None): diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index f01dfd7f23b..551d5db8820 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -340,7 +340,6 @@ - @@ -360,12 +359,12 @@

Expected in Recruitment
-
- Applications - Application + -
+
+
From b1aa97a01b3d92ef4ba53146e07ce667946a387a Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Thu, 4 Apr 2013 14:40:22 +0530 Subject: [PATCH 015/344] [IMP]css for image bzr revid: vja@tinyerp.com-20130404091022-d3qv0gnde6ui5dmm --- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 551d5db8820..8a9b8651118 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -355,7 +355,7 @@

-
+

Expected in Recruitment
From 4eab305c90804bb60262446400dc895d278a3c34 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Thu, 4 Apr 2013 15:07:17 +0530 Subject: [PATCH 016/344] [FIX]Minor changes bzr revid: vja@tinyerp.com-20130404093717-fekwk9vg0ebxt0c9 --- addons/hr_recruitment/hr_recruitment_view.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 8a9b8651118..a927d520a51 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -365,18 +365,18 @@
- +
- +
- + From d4c43e9fedd97a0eccff376d3e932d3a107eb258 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Thu, 4 Apr 2013 16:37:26 +0530 Subject: [PATCH 017/344] [IMP] hr_recruitment:Improved code bzr revid: ggh@tinyerp.com-20130404110726-7boff71lsajo3mww --- addons/hr_recruitment/hr_recruitment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 533c04c3bd5..0b9bf0e670e 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -507,11 +507,11 @@ class hr_job(osv.osv): for applicant in self.pool.get('hr.applicant').browse(cr, uid, rate_ids, context=context): if applicant.job_id.id == position.id: if applicant.priority == '3': - priority1 += 1 + priority3 += 1 elif applicant.priority == '2': priority2 += 1 elif applicant.priority == '1': - priority3 += 1 + priority1 += 1 else: pass res[position.id] = {'priority1': priority1, 'priority2': priority2, 'priority3': priority3, 'total_application':len(rate_ids)} From 9c0103c56b2542a6888e7eb36b4aa84171de24d1 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Thu, 4 Apr 2013 17:56:40 +0530 Subject: [PATCH 018/344] [IMP]Improve Code bzr revid: vja@tinyerp.com-20130404122640-nib2nd3dszy1vwju --- addons/hr_recruitment/hr_recruitment_view.xml | 7 +++---- addons/hr_recruitment/static/src/css/job_position.css | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index a927d520a51..03d4f691902 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -353,12 +353,11 @@
-

-
+

+
-
-
Expected in Recruitment
+
Expected in Recruitment
Applications Application diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index 2d26094836b..298b919090e 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -2,4 +2,8 @@ .openerp .oe_kanban_job { width: 230px; min-height: 140px !important; +} +.openerp .oe_job{ + font-size:113%; + margin:6px 0px; } \ No newline at end of file From 91b707601c3c82544a7465e3740fc8e0cb0ed132 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Thu, 4 Apr 2013 18:53:27 +0530 Subject: [PATCH 019/344] [IMP]Improve code for message bzr revid: vja@tinyerp.com-20130404132327-plhkcvcen1419po7 --- addons/hr_recruitment/hr_recruitment_view.xml | 9 ++++----- addons/hr_recruitment/static/src/css/job_position.css | 9 +++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 03d4f691902..a691707c4d0 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -354,15 +354,14 @@
diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index 298b919090e..d02bb9efdc5 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -4,6 +4,11 @@ min-height: 140px !important; } .openerp .oe_job{ - font-size:113%; - margin:6px 0px; + font-size:112%; + margin:2px 0px; +} +.openerp .oe_job_kanban{ + float: right; + margin-right: 80px; + margin-top: -4px !important; } \ No newline at end of file From 0e9937f9754b447241342491f4f319f02fecb610 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Fri, 5 Apr 2013 12:19:33 +0530 Subject: [PATCH 020/344] [IMP]css bzr revid: vja@tinyerp.com-20130405064933-9a73250m7ptklyke --- addons/hr_recruitment/hr_recruitment_view.xml | 4 ++-- .../hr_recruitment/static/src/css/job_position.css | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index a691707c4d0..f05515f35c6 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -354,8 +354,8 @@

- - +
+
Expected in Recruitment
Applications diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index d02bb9efdc5..f42634566f6 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -5,10 +5,20 @@ } .openerp .oe_job{ font-size:112%; - margin:2px 0px; + margin:3px 0px; } .openerp .oe_job_kanban{ float: right; margin-right: 80px; margin-top: -4px !important; -} \ No newline at end of file +} +.openerp img.oe_kanban_avatar{ + float: right; + margin-top: -24px !important; + margin-right: 18px; + width:30px; + height:30px +} +.openerp div.oe_kanban_ellipsis{ + width:180px; +} From df4e9cfe554278b496f46ca948a6c7e69744b4f8 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Fri, 5 Apr 2013 12:57:39 +0530 Subject: [PATCH 021/344] [IMP]text-decoration on hover bzr revid: vja@tinyerp.com-20130405072739-iidgnfu5kjd6xswn --- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- addons/hr_recruitment/static/src/css/job_position.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index f05515f35c6..5e2724139a7 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -357,7 +357,7 @@
Expected in Recruitment
-
+
Applications Application diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index f42634566f6..94bdee54f32 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -22,3 +22,7 @@ .openerp div.oe_kanban_ellipsis{ width:180px; } +.openerp .oe_kanban_action_a > span:hover{ + margin: 4px 0; + text-decoration: underline +} \ No newline at end of file From 8aedb65d2a70af0ced7a3ed7c9189e08881cdbba Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Fri, 5 Apr 2013 18:52:43 +0530 Subject: [PATCH 022/344] [IMP]put message counter in menu bzr revid: vja@tinyerp.com-20130405132243-b333jiqthz6mcaf9 --- addons/hr/hr.py | 2 +- addons/hr/hr_view.xml | 1 + addons/hr_recruitment/hr_recruitment_view.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 2f2494aea81..570a8b94aaa 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -90,7 +90,7 @@ class hr_job(osv.osv): _name = "hr.job" _description = "Job Description" - _inherit = ['mail.thread'] + _inherit = ['mail.thread','ir.needaction_mixin'] _columns = { 'name': fields.char('Job Name', size=128, required=True, select=True), # TO CLEAN: when doing a cleaning, we should change like this: diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 3ebc0b8ee34..3e5b58aeb8d 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -382,6 +382,7 @@ + diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 5e2724139a7..691246d7a5f 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -357,7 +357,7 @@
Expected in Recruitment
-
+
Applications Application From 245dc708541a71bca5c30477e12f1e924cd8c757 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Tue, 9 Apr 2013 10:58:56 +0530 Subject: [PATCH 023/344] [IMP]Minor change bzr revid: vja@tinyerp.com-20130409052856-lekkyllythvpcrrx --- addons/hr_recruitment/hr_recruitment.py | 3 +-- addons/hr_recruitment/hr_recruitment_view.xml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 0b9bf0e670e..043ab2bfd28 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -523,7 +523,6 @@ class hr_job(osv.osv): res = {} employee_obj = self.pool.get('hr.employee') for obj_job in self.browse(cr, uid,ids, context=context): - res[obj_job.id] = {} if obj_job.department_id: emp_ids = employee_obj.search(cr, uid, [('id', '=', obj_job.department_id.manager_id.id)], context=context) @@ -538,7 +537,7 @@ class hr_job(osv.osv): help="Email alias for this job position. New emails will automatically " "create new applicants for this job position."), 'priority_count': fields.function(_count_priority, string='Total Priority Employees', type="char"), - 'user_id': fields.function(_get_department_mgr, string='Department Manager', type="char"),#manager image in kanban + 'depart_id': fields.function(_get_department_mgr, string='Department Manager', type="char"),#manager image in kanban } _defaults = { 'alias_domain': False, # always hide alias during creation diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 691246d7a5f..9dbb00567d5 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -339,7 +339,7 @@ - + @@ -355,7 +355,7 @@

- +
Expected in Recruitment
Applications From ce4064a34f23d94c59c97edc22d3312c615e6406 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Wed, 10 Apr 2013 12:57:31 +0530 Subject: [PATCH 024/344] [IMP]improve code bzr revid: vja@tinyerp.com-20130410072731-571veon8fh877yuc --- addons/hr_recruitment/hr_recruitment.py | 16 +++++------ addons/hr_recruitment/hr_recruitment_view.xml | 28 ++++++++++--------- .../static/src/css/job_position.css | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 043ab2bfd28..2b6d4b34b42 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -494,17 +494,15 @@ class hr_job(osv.osv): _inherits = {'mail.alias': 'alias_id'} def _count_priority(self, cr, uid, ids, name, args, context=None): - """Applicant, priority count like number of star 3,2,1(star rating) + """Applicant, priority count like number of star 3,2,1(star rating) """ + applicant_obj = self.pool.get('hr.applicant') res = {} - for position in self.browse(cr, uid,ids, context=context): + for position in self.browse(cr, uid, ids, context=context): res[position.id] = {} - priority1 = 0 - priority2 = 0 - priority3 = 0 - applicant_obj = self.pool.get('hr.applicant') + priority1, priority2, priority3 = 0 rate_ids = applicant_obj.search(cr, uid, [('job_id', '=', position.id)], context=context) - for applicant in self.pool.get('hr.applicant').browse(cr, uid, rate_ids, context=context): + for applicant in applicant_obj.browse(cr, uid, rate_ids, context=context): if applicant.job_id.id == position.id: if applicant.priority == '3': priority3 += 1 @@ -518,7 +516,7 @@ class hr_job(osv.osv): return res def _get_department_mgr(self, cr, uid, ids, name, args, context=None): - """get manager image for specific job position. + """Get manager image for specific job position. """ res = {} employee_obj = self.pool.get('hr.employee') @@ -537,7 +535,7 @@ class hr_job(osv.osv): help="Email alias for this job position. New emails will automatically " "create new applicants for this job position."), 'priority_count': fields.function(_count_priority, string='Total Priority Employees', type="char"), - 'depart_id': fields.function(_get_department_mgr, string='Department Manager', type="char"),#manager image in kanban + 'manager_id': fields.function(_get_department_mgr, string='Department Manager', type="char"),#manager image in kanban } _defaults = { 'alias_domain': False, # always hide alias during creation diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 9dbb00567d5..37cdf3a48d1 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -322,7 +322,7 @@ - + Applications hr.applicant kanban,tree,form,graph,calendar @@ -333,17 +333,17 @@ hr.job.kanban hr.job - + - + -
+
í
    @@ -355,28 +355,30 @@ diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index 94bdee54f32..25a10a5d388 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -7,7 +7,7 @@ font-size:112%; margin:3px 0px; } -.openerp .oe_job_kanban{ +.openerp .oe_job_message{ float: right; margin-right: 80px; margin-top: -4px !important; From 8fa0dd85178c52c14bbc6da74a2254257f3929e6 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Fri, 3 May 2013 00:10:59 +0530 Subject: [PATCH 025/344] [IMP]Minor changes bzr revid: vja@tinyerp.com-20130502184059-vhaam5qvross66it --- addons/hr_recruitment/hr_recruitment.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index bc0013740f6..8ab7c9fc67d 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -506,7 +506,9 @@ class hr_job(osv.osv): res = {} for position in self.browse(cr, uid, ids, context=context): res[position.id] = {} - priority1, priority2, priority3 = 0 + priority1 = 0 + priority2 = 0 + priority3 = 0 rate_ids = applicant_obj.search(cr, uid, [('job_id', '=', position.id)], context=context) for applicant in applicant_obj.browse(cr, uid, rate_ids, context=context): if applicant.job_id.id == position.id: From 866c2b42364ef8655be8ef08782ad5cc58078f54 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Tue, 7 May 2013 12:49:09 +0530 Subject: [PATCH 026/344] [IMP]Improve code for job position bzr revid: vja@tinyerp.com-20130507071909-ses82n9qvqxdt4gn --- addons/hr_recruitment/hr_recruitment.py | 7 ---- addons/hr_recruitment/hr_recruitment_view.xml | 32 +++++-------------- .../static/src/css/job_position.css | 24 ++++++++------ 3 files changed, 23 insertions(+), 40 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 8ab7c9fc67d..6ac8d7cf4dd 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -400,13 +400,6 @@ class hr_applicant(base_stage, osv.Model): return super(hr_applicant, self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context) - def create(self, cr, uid, vals, context=None): - obj_id = super(hr_applicant, self).create(cr, uid, vals, context=context) - applicant = self.browse(cr, uid, obj_id, context=context) - if applicant.job_id: - self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('Applicant created'), subtype="hr_recruitment.mt_job_new_applicant", context=context) - return obj_id - def case_open(self, cr, uid, ids, context=None): """ open Request of the applicant for the hr_recruitment diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index a40ec39568e..96ddd2e9e4e 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -358,35 +358,19 @@
-
+ diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index 25a10a5d388..0f30df708dd 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -1,11 +1,12 @@ .openerp .oe_kanban_job { width: 230px; - min-height: 140px !important; } .openerp .oe_job{ font-size:112%; - margin:3px 0px; + margin:3px 3px; + margin-left: 45px; + color: #4c4c4c; } .openerp .oe_job_message{ float: right; @@ -13,16 +14,21 @@ margin-top: -4px !important; } .openerp img.oe_kanban_avatar{ - float: right; - margin-top: -24px !important; - margin-right: 18px; - width:30px; - height:30px + margin-top: -23px; + width:38px; + height:38px; } .openerp div.oe_kanban_ellipsis{ width:180px; } -.openerp .oe_kanban_action_a > span:hover{ +.openerp div.oe_application > span:hover{ margin: 4px 0; text-decoration: underline -} \ No newline at end of file +} +.openerp .oe_name { + margin-left: 44px; + margin-top: -18px; + margin-bottom: -15px; + font-size: 11px; + color: gray; +} From c79b0b48def9ddfc93d8bbb5ca97a69dae7fc15c Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Wed, 8 May 2013 11:51:48 +0530 Subject: [PATCH 027/344] [IMP] In other info tab,renamed salesperson field to Responsible in supplier invoice and refunds bzr revid: fka@tinyerp.com-20130508062148-kypmyo2oi3b2pu9i --- addons/account/account_invoice_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 7469c38decb..96d6324ec7d 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -250,7 +250,7 @@ - + From 3b87fc2c872187298922a34c4af69a0e4e8345f4 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Wed, 8 May 2013 12:37:33 +0530 Subject: [PATCH 028/344] [IMP] add help in use_preprint_check and change help text for Check Date in Period in journal form view bzr revid: fka@tinyerp.com-20130508070733-h8lnupl2vc530ks9 --- addons/account/account.py | 3 +-- addons/account_check_writing/account.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 3959799f1bb..9b9878e6cb9 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -721,8 +721,7 @@ class account_journal(osv.osv): 'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'), 'entry_posted': fields.boolean('Skip \'Draft\' State for Manual Entries', help='Check this box if you don\'t want new journal entries to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation. \nNote that journal entries that are automatically created by the system are always skipping that state.'), 'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"), - 'allow_date':fields.boolean('Check Date in Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'), - + 'allow_date':fields.boolean('Check Date in Period', help= 'If checked, the entry won\'t be created if the entry date is not included into the selected period'), 'profit_account_id' : fields.many2one('account.account', 'Profit Account'), 'loss_account_id' : fields.many2one('account.account', 'Loss Account'), 'internal_account_id' : fields.many2one('account.account', 'Internal Transfers Account', select=1), diff --git a/addons/account_check_writing/account.py b/addons/account_check_writing/account.py index 035e3a710b0..2bdb0dc734d 100644 --- a/addons/account_check_writing/account.py +++ b/addons/account_check_writing/account.py @@ -26,7 +26,7 @@ class account_journal(osv.osv): _columns = { 'allow_check_writing': fields.boolean('Allow Check writing', help='Check this if the journal is to be used for writing checks.'), - 'use_preprint_check': fields.boolean('Use Preprinted Check'), + 'use_preprint_check': fields.boolean('Use Preprinted Check', help='Check if you use a preformated sheet for check'), } From b64931ac5e5337ecaa1fc750c7807e5952d3d7ce Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Wed, 8 May 2013 16:22:19 +0530 Subject: [PATCH 029/344] [IMP] change text in chart of account & tax wizard bzr revid: fka@tinyerp.com-20130508105219-675r49quptzjtmv6 --- addons/account/wizard/account_chart_view.xml | 2 +- addons/account/wizard/account_tax_chart_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/account_chart_view.xml b/addons/account/wizard/account_chart_view.xml index 7533cb117eb..8ee79a08530 100644 --- a/addons/account/wizard/account_chart_view.xml +++ b/addons/account/wizard/account_chart_view.xml @@ -10,7 +10,7 @@ From 8ef6bf2da9f724684b520ac0166d4a96d43f1ad7 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Wed, 8 May 2013 16:41:44 +0530 Subject: [PATCH 030/344] [IMP] remove Payment Lines label bzr revid: fka@tinyerp.com-20130508111144-cint98dzh9quatp7 --- .../wizard/account_payment_populate_statement_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_payment/wizard/account_payment_populate_statement_view.xml b/addons/account_payment/wizard/account_payment_populate_statement_view.xml index acc85d661c2..2c775853e23 100644 --- a/addons/account_payment/wizard/account_payment_populate_statement_view.xml +++ b/addons/account_payment/wizard/account_payment_populate_statement_view.xml @@ -8,7 +8,7 @@
- +
From 16010ff34a9554089775829286f8221857422cb8 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Wed, 8 May 2013 19:03:32 +0530 Subject: [PATCH 032/344] [IMP] remove sheet from journal entry form view bzr revid: fka@tinyerp.com-20130508133332-2inxe5he1afdhc9t --- addons/account/account_view.xml | 12 +++++------- addons/account_budget/account_budget_view.xml | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 13bc694a1cc..a7e64be146e 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1261,12 +1261,11 @@ account.move -
-
- +
+
diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index 0f30df708dd..a52291b974a 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -32,3 +32,6 @@ font-size: 11px; color: gray; } +.openerp .oe_kanban_footer_right { + float: right; +} From 0c62543724319eaeb957f14cff05caecee9d1fb9 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 15 May 2013 18:56:25 +0530 Subject: [PATCH 038/344] [IMP] Improved string 'recruitement' => 'recruitment'. bzr revid: psa@tinyerp.com-20130515132625-r7t7ittv2zqno1rc --- addons/hr/hr.py | 4 ++-- addons/hr/hr_view.xml | 2 +- addons/hr/i18n/hr.pot | 4 ++-- addons/hr/test/open2recruit2close_job.yml | 4 ++-- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 8491ca39312..d8497f7f589 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -117,7 +117,7 @@ class hr_job(osv.osv): 'requirements': fields.text('Requirements'), 'department_id': fields.many2one('hr.department', 'Department'), 'company_id': fields.many2one('res.company', 'Company'), - 'state': fields.selection([('open', 'No Recruitment'), ('recruit', 'Recruitement in Progress')], 'Status', readonly=True, required=True, + 'state': fields.selection([('open', 'No Recruitment'), ('recruit', 'Recruitment in Progress')], 'Status', readonly=True, required=True, help="By default 'In position', set it to 'In Recruitment' if recruitment process is going on for this job position."), 'color': fields.integer('Color Index'), } @@ -136,7 +136,7 @@ class hr_job(osv.osv): context = {} return {'value': {'expected_employees': no_of_recruitment + no_of_employee}} - def job_recruitement(self, cr, uid, ids, *args): + def job_recruitment(self, cr, uid, ids, *args): for job in self.browse(cr, uid, ids): no_of_recruitment = job.no_of_recruitment == 0 and 1 or job.no_of_recruitment self.write(cr, uid, [job.id], {'state': 'recruit', 'no_of_recruitment': no_of_recruitment}) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index b130f47a888..5476901382f 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -324,7 +324,7 @@
-
diff --git a/addons/hr/i18n/hr.pot b/addons/hr/i18n/hr.pot index bee35b49346..7bb34f2ce68 100644 --- a/addons/hr/i18n/hr.pot +++ b/addons/hr/i18n/hr.pot @@ -162,7 +162,7 @@ msgstr "" #. module: hr #: view:hr.job:0 -msgid "Launch Recruitement" +msgid "Launch Recruitment" msgstr "" #. module: hr @@ -690,7 +690,7 @@ msgstr "" #. module: hr #: selection:hr.job,state:0 -msgid "Recruitement in Progress" +msgid "Recruitment in Progress" msgstr "" #. module: hr diff --git a/addons/hr/test/open2recruit2close_job.yml b/addons/hr/test/open2recruit2close_job.yml index 5a01b55439b..c1d5c606d56 100644 --- a/addons/hr/test/open2recruit2close_job.yml +++ b/addons/hr/test/open2recruit2close_job.yml @@ -10,10 +10,10 @@ - state == 'open' - no_of_recruitment == 0 - - Now, Recruitement is started so I start recruitement of Job Postion of "Developer" Profile. + Now, Recruitment is started so I start recruitment of Job Postion of "Developer" Profile. - !python {model: hr.job}: | - self.job_recruitement(cr, uid, [ref('job_developer')]) + self.job_recruitment(cr, uid, [ref('job_developer')]) - I check 'state' and number of 'Expected in Recruitment' after initiating the recruitment - diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 7fd7ebce51a..408d2080839 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -375,7 +375,7 @@
From c1b6c1dc92fcdeececf6c1ab28c6335e77742f0d Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Thu, 16 May 2013 15:16:13 +0530 Subject: [PATCH 039/344] [IMP] improve code bzr revid: fka@tinyerp.com-20130516094613-tscfrxx13cvshgwj --- addons/analytic/analytic.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index d44acf1f54c..f70ab695719 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -28,8 +28,6 @@ from openerp.tools.translate import _ import openerp.addons.decimal_precision as dp class account_analytic_account(osv.osv): - _order = "parent_left" - _parent_order = "name" _name = 'account.analytic.account' _inherit = ['mail.thread'] _description = 'Analytic Account' @@ -186,7 +184,6 @@ class account_analytic_account(osv.osv): 'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2), 'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'), 'child_complete_ids': fields.function(_child_compute, relation='account.analytic.account', string="Account Hierarchy", type='many2many'), - 'parent_left': fields.integer('Parent Left', select=1), 'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'), 'balance': fields.function(_debit_credit_bal_qtty, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')), 'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')), @@ -256,6 +253,7 @@ class account_analytic_account(osv.osv): def check_recursion(self, cr, uid, ids, context=None, parent=None): return super(account_analytic_account, self)._check_recursion(cr, uid, ids, context=context, parent=parent) + _order = 'code, name asc' _constraints = [ (check_recursion, 'Error! You cannot create recursive analytic accounts.', ['parent_id']), ] From 1a0daca6b2e9550b28035543990ea201c9bfeccc Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Thu, 16 May 2013 15:20:52 +0530 Subject: [PATCH 040/344] [IMP] Added 'state' field in kanban view to get the kanban header with the state name. bzr revid: psa@tinyerp.com-20130516095052-hhoan2uzybtgbqkb --- addons/hr_recruitment/hr_recruitment_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 408d2080839..f1a25de92fe 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -348,6 +348,7 @@ +
From 382c43852a49bb2f4a8d070a089df3ff9c2a5f17 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Thu, 16 May 2013 15:27:44 +0530 Subject: [PATCH 041/344] [IMP] improve xpath bzr revid: fka@tinyerp.com-20130516095744-an2ab81tp1c58ay6 --- addons/account_analytic_plans/account_analytic_plans_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml index be46b9a6923..f9164f2ebb0 100644 --- a/addons/account_analytic_plans/account_analytic_plans_view.xml +++ b/addons/account_analytic_plans/account_analytic_plans_view.xml @@ -20,10 +20,10 @@ account.move - + - + From 0d8e1c3865f2df2f7d53f5eb0c94d9bc409f18bc Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Thu, 16 May 2013 15:42:02 +0530 Subject: [PATCH 042/344] [IMP] improve data of code in project data bzr revid: fka@tinyerp.com-20130516101202-ymh0wz1nfdx7zv27 --- addons/project/project_data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml index 7bf1a623a2c..98b1ca0363a 100644 --- a/addons/project/project_data.xml +++ b/addons/project/project_data.xml @@ -20,7 +20,7 @@ Projects - 3 + PP001 view From 90585320ee318e2ded07d951ec4b06da7eadff15 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Thu, 16 May 2013 17:03:30 +0530 Subject: [PATCH 043/344] [IMP] Added Recruitment Done button in kanban. bzr revid: psa@tinyerp.com-20130516113330-e43v2aqwh7r1pk3o --- addons/hr_recruitment/hr_recruitment_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index f1a25de92fe..d67427dc382 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -374,9 +374,9 @@
From 9bd2299a6999e63e518d3bafbcfdfee08aaa6d44 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Fri, 17 May 2013 11:14:03 +0530 Subject: [PATCH 044/344] [REV]Revert last commmit bzr revid: vja@tinyerp.com-20130517054403-kv361vjdn620egns --- addons/hr/hr.py | 6 ----- addons/hr_recruitment/hr_recruitment.py | 25 +++++++++++++++++++ addons/hr_recruitment/hr_recruitment_view.xml | 25 +++---------------- .../static/src/css/job_position.css | 6 ----- 4 files changed, 29 insertions(+), 33 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 8e899186cfa..8491ca39312 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -74,14 +74,11 @@ class hr_job(osv.osv): def _no_of_employee(self, cr, uid, ids, name, args, context=None): res = {} - applicant_obj = self.pool.get('hr.applicant') for job in self.browse(cr, uid, ids, context=context): nb_employees = len(job.employee_ids or []) - job_ids = len(applicant_obj.search(cr, uid, [('job_id', '=', job.id)], context=context)) res[job.id] = { 'no_of_employee': nb_employees, 'expected_employees': nb_employees + job.no_of_recruitment, - 'no_of_application':job_ids } return res @@ -108,9 +105,6 @@ class hr_job(osv.osv): 'hr.employee': (_get_job_position, ['job_id'], 10), }, multi='no_of_employee'), - 'no_of_application': fields.function(_no_of_employee, type="integer" ,string='Total Number of Application', - help='Expected number of employees for this job position after new recruitment.', - multi='no_of_employee'), 'no_of_employee': fields.function(_no_of_employee, string="Current Number of Employees", help='Number of employees currently occupying this job position.', store = { diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 8098e4b1ecb..6ac8d7cf4dd 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -492,6 +492,30 @@ class hr_job(osv.osv): _name = "hr.job" _inherits = {'mail.alias': 'alias_id'} + def _count_priority(self, cr, uid, ids, name, args, context=None): + """Applicant, priority count like number of star 3,2,1(star rating) + """ + applicant_obj = self.pool.get('hr.applicant') + res = {} + for position in self.browse(cr, uid, ids, context=context): + res[position.id] = {} + priority1 = 0 + priority2 = 0 + priority3 = 0 + rate_ids = applicant_obj.search(cr, uid, [('job_id', '=', position.id)], context=context) + for applicant in applicant_obj.browse(cr, uid, rate_ids, context=context): + if applicant.job_id.id == position.id: + if applicant.priority == '3': + priority3 += 1 + elif applicant.priority == '2': + priority2 += 1 + elif applicant.priority == '1': + priority1 += 1 + else: + pass + res[position.id] = {'priority1': priority1, 'priority2': priority2, 'priority3': priority3, 'total_application':len(rate_ids)} + return res + def _get_department_mgr(self, cr, uid, ids, name, args, context=None): """Get manager image for specific job position. """ @@ -511,6 +535,7 @@ class hr_job(osv.osv): 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, help="Email alias for this job position. New emails will automatically " "create new applicants for this job position."), + 'priority_count': fields.function(_count_priority, string='Total Priority Employees', type="char"), 'manager_id': fields.function(_get_department_mgr, string='Department Manager', type="char"),#manager image in kanban } _defaults = { diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index c20fabea9d8..96ddd2e9e4e 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -303,12 +303,10 @@ -
diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index 0f30df708dd..04f288e53a7 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -25,6 +25,10 @@ margin: 4px 0; text-decoration: underline } +.openerp div.oe_application { + margin-top: 24px; +} + .openerp .oe_name { margin-left: 44px; margin-top: -18px; From 92992932a83b44fb4f2d72f2d511552eaa986bb3 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Fri, 17 May 2013 11:49:53 +0530 Subject: [PATCH 046/344] [IMP] Added css kanban_draghandle. bzr revid: psa@tinyerp.com-20130517061953-5qu18at7zkrzjjiu --- addons/hr_recruitment/static/src/css/job_position.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index a52291b974a..07f721f468d 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -35,3 +35,6 @@ .openerp .oe_kanban_footer_right { float: right; } +.openerp .oe_kanban_draghandle { + height: 114px; +} \ No newline at end of file From 1d9a315be4ffef5acb7e7967e0707cfc75596077 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Fri, 17 May 2013 12:27:10 +0530 Subject: [PATCH 047/344] [Revert] Reverted some code of last commits which was removed by mistake. bzr revid: psa@tinyerp.com-20130517065710-zktm4zm955w0wlgf --- addons/hr_recruitment/hr_recruitment_view.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index e0c2725e39c..b830c10be20 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -374,6 +374,10 @@
Expected in Recruitment
+ + +

To start a recruitment phase for this job position,click here

+
-
- -

+
+

+
+ %% +
- +
- +
-
Expected in Recruitment
+
Expected New Employees
+ Forecast - -

To start a recruitment phase for this job position,click here

+

To start a recruitment phase for this job position,click here

-
diff --git a/addons/hr_recruitment/static/lib/justgage.js b/addons/hr_recruitment/static/lib/justgage.js new file mode 100644 index 00000000000..52b5c6ea0c3 --- /dev/null +++ b/addons/hr_recruitment/static/lib/justgage.js @@ -0,0 +1,883 @@ +/** + * JustGage - this is work-in-progress, unreleased, unofficial code, so it might not work top-notch :) + * Check http://www.justgage.com for official releases + * Licensed under MIT. + * @author Bojan Djuricic (@Toorshia) + * + * LATEST UPDATES + + * ----------------------------- + * April 01, 2013. + * ----------------------------- + * fix - https://github.com/toorshia/justgage/issues/46 + + * ----------------------------- + * March 26, 2013. + * ----------------------------- + * customSectors - define specific color for value range (0-10 : red, 10-30 : blue etc.) + + * ----------------------------- + * March 23, 2013. + * ----------------------------- + * counter - option to animate value in counting fashion + * fix - https://github.com/toorshia/justgage/issues/45 + + * ----------------------------- + * March 13, 2013. + * ----------------------------- + * refresh method - added optional 'max' parameter to use when you need to update max value + + * ----------------------------- + * February 26, 2013. + * ----------------------------- + * decimals - option to define/limit number of decimals when not using humanFriendly or customRenderer to display value + * fixed a missing parameters bug when calling generateShadow() for IE < 9 + + * ----------------------------- + * December 31, 2012. + * ----------------------------- + * fixed text y-position for hidden divs - workaround for Raphael 'dy' bug - https://github.com/DmitryBaranovskiy/raphael/issues/491 + * 'show' parameters, like showMinMax are now 'hide' because I am lame developer - please update these in your setups + * Min and Max labels are now auto-off when in donut mode + * Start angle in donut mode is now 90 + * donutStartAngle - option to define start angle for donut + + * ----------------------------- + * November 25, 2012. + * ----------------------------- + * Option to define custom rendering function for displayed value + + * ----------------------------- + * November 19, 2012. + * ----------------------------- + * Config.value is now updated after gauge refresh + + * ----------------------------- + * November 13, 2012. + * ----------------------------- + * Donut display mode added + * Option to hide value label + * Option to enable responsive gauge size + * Removed default title attribute + * Option to accept min and max defined as string values + * Option to configure value symbol + * Fixed bad aspect ratio calculations + * Option to configure minimum font size for all texts + * Option to show shorthand big numbers (human friendly) + */ + + JustGage = function(config) { + + if (!config.id) {alert("Missing id parameter for gauge!"); return false;} + if (!config.node) { + if (!document.getElementById(config.id)) {alert("No element with id: \""+config.id+"\" found!"); return false;} + config.node = document.getElementById(config.id); + } + + var obj = this; + + // configurable parameters + obj.config = + { + // id : string + // this is container element id + id : config.id, + + // node : string + // the node to use instead of DOM + node : config.node, + + // title : string + // gauge title + title : (config.title) ? config.title : "", + + // titleFontColor : string + // color of gauge title + titleFontColor : (config.titleFontColor) ? config.titleFontColor : "#999999", + + // value : int + // value gauge is showing + value : (config.value) ? config.value : 0, + + + // valueFontColor : string + // color of label showing current value + valueFontColor : (config.valueFontColor) ? config.valueFontColor : "#010101", + + // symbol : string + // special symbol to show next to value + symbol : (config.symbol) ? config.symbol : "", + + // min : int + // min value + min : (config.min) ? parseFloat(config.min) : 0, + + // max : int + // max value + max : (config.max) ? parseFloat(config.max) : 100, + + // humanFriendlyDecimal : int + // number of decimal places for our human friendly number to contain + humanFriendlyDecimal : (config.humanFriendlyDecimal) ? config.humanFriendlyDecimal : 0, + + // textRenderer: func + // function applied before rendering text + textRenderer : (config.textRenderer) ? config.textRenderer : null, + + // gaugeWidthScale : float + // width of the gauge element + gaugeWidthScale : (config.gaugeWidthScale) ? config.gaugeWidthScale : 1.0, + + // gaugeColor : string + // background color of gauge element + gaugeColor : (config.gaugeColor) ? config.gaugeColor : "#edebeb", + + // label : string + // text to show below value + label : (config.label) ? config.label : "", + + // labelFontColor : string + // color of label showing label under value + labelFontColor : (config.labelFontColor) ? config.labelFontColor : "#b3b3b3", + + // shadowOpacity : int + // 0 ~ 1 + shadowOpacity : (config.shadowOpacity) ? config.shadowOpacity : 0.2, + + // shadowSize: int + // inner shadow size + shadowSize : (config.shadowSize) ? config.shadowSize : 5, + + // shadowVerticalOffset : int + // how much shadow is offset from top + shadowVerticalOffset : (config.shadowVerticalOffset) ? config.shadowVerticalOffset : 3, + + // levelColors : string[] + // colors of indicator, from lower to upper, in RGB format + levelColors : (config.levelColors) ? config.levelColors : [ + "#a9d70b", + "#f9c802", + "#ff0000" + ], + + // startAnimationTime : int + // length of initial animation + startAnimationTime : (config.startAnimationTime) ? config.startAnimationTime : 700, + + // startAnimationType : string + // type of initial animation (linear, >, <, <>, bounce) + startAnimationType : (config.startAnimationType) ? config.startAnimationType : ">", + + // refreshAnimationTime : int + // length of refresh animation + refreshAnimationTime : (config.refreshAnimationTime) ? config.refreshAnimationTime : 700, + + // refreshAnimationType : string + // type of refresh animation (linear, >, <, <>, bounce) + refreshAnimationType : (config.refreshAnimationType) ? config.refreshAnimationType : ">", + + // donutStartAngle : int + // angle to start from when in donut mode + donutStartAngle : (config.donutStartAngle) ? config.donutStartAngle : 90, + + // valueMinFontSize : int + // absolute minimum font size for the value + valueMinFontSize : config.valueMinFontSize || 16, + + // titleMinFontSize + // absolute minimum font size for the title + titleMinFontSize : config.titleMinFontSize || 10, + + // labelMinFontSize + // absolute minimum font size for the label + labelMinFontSize : config.labelMinFontSize || 10, + + // minLabelMinFontSize + // absolute minimum font size for the minimum label + minLabelMinFontSize : config.minLabelMinFontSize || 10, + + // maxLabelMinFontSize + // absolute minimum font size for the maximum label + maxLabelMinFontSize : config.maxLabelMinFontSize || 10, + + // hideValue : bool + // hide value text + hideValue : (config.hideValue) ? config.hideValue : false, + + // hideMinMax : bool + // hide min and max values + hideMinMax : (config.hideMinMax) ? config.hideMinMax : false, + + // hideInnerShadow : bool + // hide inner shadow + hideInnerShadow : (config.hideInnerShadow) ? config.hideInnerShadow : false, + + // humanFriendly : bool + // convert large numbers for min, max, value to human friendly (e.g. 1234567 -> 1.23M) + humanFriendly : (config.humanFriendly) ? config.humanFriendly : false, + + // noGradient : bool + // whether to use gradual color change for value, or sector-based + noGradient : (config.noGradient) ? config.noGradient : false, + + // donut : bool + // show full donut gauge + donut : (config.donut) ? config.donut : false, + + // relativeGaugeSize : bool + // whether gauge size should follow changes in container element size + relativeGaugeSize : (config.relativeGaugeSize) ? config.relativeGaugeSize : false, + + // counter : bool + // animate level number change + counter : (config.counter) ? config.counter : false, + + // decimals : int + // number of digits after floating point + decimals : (config.decimals) ? config.decimals : 0, + + // customSectors : [] of objects + // number of digits after floating point + customSectors : (config.customSectors) ? config.customSectors : [] + }; + + // variables + var + canvasW, + canvasH, + widgetW, + widgetH, + aspect, + dx, + dy, + titleFontSize, + titleX, + titleY, + valueFontSize, + valueX, + valueY, + labelFontSize, + labelX, + labelY, + minFontSize, + minX, + minY, + maxFontSize, + maxX, + maxY; + + // overflow values + if (this.config.value > this.config.max) this.config.value = this.config.max; + if (this.config.value < this.config.min) this.config.value = this.config.min; + this.originalValue = config.value; + + // canvas + this.canvas = Raphael(this.config.node, "100%", "100%"); + if (this.config.relativeGaugeSize === true) { + this.canvas.setViewBox(0, 0, 200, 150, true); + } + + // canvas dimensions + if (this.config.relativeGaugeSize === true) { + canvasW = 200; + canvasH = 150; + } else { + canvasW = getStyle(this.config.node, "width").slice(0, -2) * 1; + canvasH = getStyle(this.config.node, "height").slice(0, -2) * 1; + } + + // widget dimensions + if (this.config.donut === true) { + + // DONUT ******************************* + + // width more than height + if(canvasW > canvasH) { + widgetH = canvasH; + widgetW = widgetH; + // width less than height + } else if (canvasW < canvasH) { + widgetW = canvasW; + widgetH = widgetW; + // if height don't fit, rescale both + if(widgetH > canvasH) { + aspect = widgetH / canvasH; + widgetH = widgetH / aspect; + widgetW = widgetH / aspect; + } + // equal + } else { + widgetW = canvasW; + widgetH = widgetW; + } + + // delta + dx = (canvasW - widgetW)/2; + dy = (canvasH - widgetH)/2; + + // title + titleFontSize = ((widgetH / 8) > 10) ? (widgetH / 10) : 10; + titleX = dx + widgetW / 2; + titleY = dy + widgetH / 11; + + // value + valueFontSize = ((widgetH / 6.4) > 16) ? (widgetH / 5.4) : 18; + valueX = dx + widgetW / 2; + if(this.config.label !== '') { + valueY = dy + widgetH / 1.85; + } else { + valueY = dy + widgetH / 1.7; + } + + // label + labelFontSize = ((widgetH / 16) > 10) ? (widgetH / 16) : 10; + labelX = dx + widgetW / 2; + labelY = valueY + labelFontSize; + + // min + minFontSize = ((widgetH / 16) > 10) ? (widgetH / 16) : 10; + minX = dx + (widgetW / 10) + (widgetW / 6.666666666666667 * this.config.gaugeWidthScale) / 2 ; + minY = labelY; + + // max + maxFontSize = ((widgetH / 16) > 10) ? (widgetH / 16) : 10; + maxX = dx + widgetW - (widgetW / 10) - (widgetW / 6.666666666666667 * this.config.gaugeWidthScale) / 2 ; + maxY = labelY; + + } else { + // HALF ******************************* + + // width more than height + if(canvasW > canvasH) { + widgetH = canvasH; + widgetW = widgetH * 1.25; + //if width doesn't fit, rescale both + if(widgetW > canvasW) { + aspect = widgetW / canvasW; + widgetW = widgetW / aspect; + widgetH = widgetH / aspect; + } + // width less than height + } else if (canvasW < canvasH) { + widgetW = canvasW; + widgetH = widgetW / 1.25; + // if height don't fit, rescale both + if(widgetH > canvasH) { + aspect = widgetH / canvasH; + widgetH = widgetH / aspect; + widgetW = widgetH / aspect; + } + // equal + } else { + widgetW = canvasW; + widgetH = widgetW * 0.75; + } + + // delta + dx = (canvasW - widgetW)/2; + dy = (canvasH - widgetH)/2; + + // title + titleFontSize = ((widgetH / 8) > this.config.titleMinFontSize) ? (widgetH / 10) : this.config.titleMinFontSize; + titleX = dx + widgetW / 2; + titleY = dy + widgetH / 6.4; + + // value + valueFontSize = ((widgetH / 6.5) > this.config.valueMinFontSize) ? (widgetH / 6.5) : this.config.valueMinFontSize; + valueX = dx + widgetW / 2; + valueY = dy + widgetH / 1.275; + + // label + labelFontSize = ((widgetH / 16) > this.config.labelMinFontSize) ? (widgetH / 16) : this.config.labelMinFontSize; + labelX = dx + widgetW / 2; + labelY = valueY + valueFontSize / 2 + 5; + + // min + minFontSize = ((widgetH / 16) > this.config.minLabelMinFontSize) ? (widgetH / 16) : this.config.minLabelMinFontSize; + minX = dx + (widgetW / 10) + (widgetW / 6.666666666666667 * this.config.gaugeWidthScale) / 2 ; + minY = labelY; + + // max + maxFontSize = ((widgetH / 16) > this.config.maxLabelMinFontSize) ? (widgetH / 16) : this.config.maxLabelMinFontSize; + maxX = dx + widgetW - (widgetW / 10) - (widgetW / 6.666666666666667 * this.config.gaugeWidthScale) / 2 ; + maxY = labelY; + } + + // parameters + this.params = { + canvasW : canvasW, + canvasH : canvasH, + widgetW : widgetW, + widgetH : widgetH, + dx : dx, + dy : dy, + titleFontSize : titleFontSize, + titleX : titleX, + titleY : titleY, + valueFontSize : valueFontSize, + valueX : valueX, + valueY : valueY, + labelFontSize : labelFontSize, + labelX : labelX, + labelY : labelY, + minFontSize : minFontSize, + minX : minX, + minY : minY, + maxFontSize : maxFontSize, + maxX : maxX, + maxY : maxY + }; + + // var clear + canvasW, canvasH, widgetW, widgetH, aspect, dx, dy, titleFontSize, titleX, titleY, valueFontSize, valueX, valueY, labelFontSize, labelX, labelY, minFontSize, minX, minY, maxFontSize, maxX, maxY = null + + // pki - custom attribute for generating gauge paths + this.canvas.customAttributes.pki = function (value, min, max, w, h, dx, dy, gws, donut) { + + var alpha, Ro, Ri, Cx, Cy, Xo, Yo, Xi, Yi, path; + + if (donut) { + alpha = (1 - 2 * (value - min) / (max - min)) * Math.PI; + Ro = w / 2 - w / 7; + Ri = Ro - w / 6.666666666666667 * gws; + + Cx = w / 2 + dx; + Cy = h / 1.95 + dy; + + Xo = w / 2 + dx + Ro * Math.cos(alpha); + Yo = h - (h - Cy) + 0 - Ro * Math.sin(alpha); + Xi = w / 2 + dx + Ri * Math.cos(alpha); + Yi = h - (h - Cy) + 0 - Ri * Math.sin(alpha); + + path += "M" + (Cx - Ri) + "," + Cy + " "; + path += "L" + (Cx - Ro) + "," + Cy + " "; + if (value > ((max - min) / 2)) { + path += "A" + Ro + "," + Ro + " 0 0 1 " + (Cx + Ro) + "," + Cy + " "; + } + path += "A" + Ro + "," + Ro + " 0 0 1 " + Xo + "," + Yo + " "; + path += "L" + Xi + "," + Yi + " "; + if (value > ((max - min) / 2)) { + path += "A" + Ri + "," + Ri + " 0 0 0 " + (Cx + Ri) + "," + Cy + " "; + } + path += "A" + Ri + "," + Ri + " 0 0 0 " + (Cx - Ri) + "," + Cy + " "; + path += "Z "; + + return { path: path }; + + } else { + alpha = (1 - (value - min) / (max - min)) * Math.PI; + Ro = w / 2 - w / 10; + Ri = Ro - w / 6.666666666666667 * gws; + + Cx = w / 2 + dx; + Cy = h / 1.25 + dy; + + Xo = w / 2 + dx + Ro * Math.cos(alpha); + Yo = h - (h - Cy) + 0 - Ro * Math.sin(alpha); + Xi = w / 2 + dx + Ri * Math.cos(alpha); + Yi = h - (h - Cy) + 0 - Ri * Math.sin(alpha); + + path += "M" + (Cx - Ri) + "," + Cy + " "; + path += "L" + (Cx - Ro) + "," + Cy + " "; + path += "A" + Ro + "," + Ro + " 0 0 1 " + Xo + "," + Yo + " "; + path += "L" + Xi + "," + Yi + " "; + path += "A" + Ri + "," + Ri + " 0 0 0 " + (Cx - Ri) + "," + Cy + " "; + path += "Z "; + + return { path: path }; + } + + // var clear + alpha, Ro, Ri, Cx, Cy, Xo, Yo, Xi, Yi, path = null; + }; + + // gauge + this.gauge = this.canvas.path().attr({ + "stroke": "none", + "fill": this.config.gaugeColor, + pki: [this.config.max, this.config.min, this.config.max, this.params.widgetW, this.params.widgetH, this.params.dx, this.params.dy, this.config.gaugeWidthScale, this.config.donut] + }); + this.gauge.id = this.config.id+"-gauge"; + + // level + this.level = this.canvas.path().attr({ + "stroke": "none", + "fill": getColor(this.config.value, (this.config.value - this.config.min) / (this.config.max - this.config.min), this.config.levelColors, this.config.noGradient, this.config.customSectors), + pki: [this.config.min, this.config.min, this.config.max, this.params.widgetW, this.params.widgetH, this.params.dx, this.params.dy, this.config.gaugeWidthScale, this.config.donut] + }); + if(this.config.donut) { + this.level.transform("r" + this.config.donutStartAngle + ", " + (this.params.widgetW/2 + this.params.dx) + ", " + (this.params.widgetH/1.95 + this.params.dy)); + } + this.level.id = this.config.id+"-level"; + + // title + this.txtTitle = this.canvas.text(this.params.titleX, this.params.titleY, this.config.title); + this.txtTitle.attr({ + "font-size":this.params.titleFontSize, + "font-weight":"bold", + "font-family":"Arial", + "fill":this.config.titleFontColor, + "fill-opacity":"1" + }); + setDy(this.txtTitle, this.params.titleFontSize, this.params.titleY); + this.txtTitle.id = this.config.id+"-txttitle"; + + // value + this.txtValue = this.canvas.text(this.params.valueX, this.params.valueY, 0); + this.txtValue.attr({ + "font-size":this.params.valueFontSize, + "font-weight":"bold", + "font-family":"Arial", + "fill":this.config.valueFontColor, + "fill-opacity":"0" + }); + setDy(this.txtValue, this.params.valueFontSize, this.params.valueY); + this.txtValue.id = this.config.id+"-txtvalue"; + + // label + this.txtLabel = this.canvas.text(this.params.labelX, this.params.labelY, this.config.label); + this.txtLabel.attr({ + "font-size":this.params.labelFontSize, + "font-weight":"normal", + "font-family":"Arial", + "fill":this.config.labelFontColor, + "fill-opacity":"0" + }); + setDy(this.txtLabel, this.params.labelFontSize, this.params.labelY); + this.txtLabel.id = this.config.id+"-txtlabel"; + + // min + this.txtMinimum = this.config.min; + if( this.config.humanFriendly ) this.txtMinimum = humanFriendlyNumber( this.config.min, this.config.humanFriendlyDecimal ); + this.txtMin = this.canvas.text(this.params.minX, this.params.minY, this.txtMinimum); + this.txtMin.attr({ + "font-size":this.params.minFontSize, + "font-weight":"normal", + "font-family":"Arial", + "fill":this.config.labelFontColor, + "fill-opacity": (this.config.hideMinMax || this.config.donut)? "0" : "1" + }); + setDy(this.txtMin, this.params.minFontSize, this.params.minY); + this.txtMin.id = this.config.id+"-txtmin"; + + // max + this.txtMaximum = this.config.max; + if( this.config.humanFriendly ) this.txtMaximum = humanFriendlyNumber( this.config.max, this.config.humanFriendlyDecimal ); + this.txtMax = this.canvas.text(this.params.maxX, this.params.maxY, this.txtMaximum); + this.txtMax.attr({ + "font-size":this.params.maxFontSize, + "font-weight":"normal", + "font-family":"Arial", + "fill":this.config.labelFontColor, + "fill-opacity": (this.config.hideMinMax || this.config.donut)? "0" : "1" + }); + setDy(this.txtMax, this.params.maxFontSize, this.params.maxY); + this.txtMax.id = this.config.id+"-txtmax"; + + var defs = this.canvas.canvas.childNodes[1]; + var svg = "http://www.w3.org/2000/svg"; + + if (ie < 9) { + onCreateElementNsReady(function() { + this.generateShadow(svg, defs); + }); + } else { + this.generateShadow(svg, defs); + } + + // var clear + defs, svg = null; + + // execute on each animation frame + function onAnimate() { + if (obj.config.counter) { + var currentValue = obj.level.attr("pki"); + + if(obj.config.textRenderer) { + // this.originalValue = this.config.textRenderer(this.originalValue); + obj.txtValue.attr("text", obj.config.textRenderer(Math.floor(currentValue[0]))); + } else if(obj.config.humanFriendly) { + // this.originalValue = humanFriendlyNumber( this.originalValue, this.config.humanFriendlyDecimal ) + this.config.symbol; + obj.txtValue.attr("text", humanFriendlyNumber( Math.floor(currentValue[0]), obj.config.humanFriendlyDecimal ) + obj.config.symbol); + } else { + // this.originalValue += this.config.symbol; + obj.txtValue.attr("text", (currentValue[0] * 1).toFixed(obj.config.decimals) + obj.config.symbol); + } + + setDy(obj.txtValue, obj.params.valueFontSize, obj.params.valueY); + currentValue = null; + } + } + + if(!obj.config.counter) { + if(obj.config.textRenderer) { + obj.originalValue = obj.config.textRenderer(obj.originalValue); + } else if(obj.config.humanFriendly) { + obj.originalValue = humanFriendlyNumber( obj.originalValue, obj.config.humanFriendlyDecimal ) + obj.config.symbol; + } else { + obj.originalValue = (obj.originalValue * 1).toFixed(obj.config.decimals) + obj.config.symbol; + } + + obj.txtValue.attr("text", obj.originalValue); + setDy(obj.txtValue, obj.params.valueFontSize, obj.params.valueY); + } + + //event fired on each animation frame + eve.on("raphael.anim.frame.*", onAnimate); + + // animate gauge level + this.level.animate({pki: [this.config.value, this.config.min, this.config.max, this.params.widgetW, this.params.widgetH, this.params.dx, this.params.dy, this.config.gaugeWidthScale, this.config.donut]}, this.config.startAnimationTime, this.config.startAnimationType); + + // animate value + this.txtValue.animate({"fill-opacity":"1"}, this.config.startAnimationTime, this.config.startAnimationType); + + // animate label + this.txtLabel.animate({"fill-opacity":"1"}, this.config.startAnimationTime, this.config.startAnimationType); +}; + +/** Refresh gauge level */ +JustGage.prototype.refresh = function(val, max) { + + var originalVal, displayVal, color, max = max || null; + + // set new max + if(max !== null) { + this.config.max = max; + + this.txtMaximum = this.config.max; + if( this.config.humanFriendly ) this.txtMaximum = humanFriendlyNumber( this.config.max, this.config.humanFriendlyDecimal ); + this.txtMax.attr({"text" : this.config.max}); + setDy(this.txtMax, this.params.maxFontSize, this.params.maxY); + } + + // overflow values + originalVal = val; + displayVal = val; + if ((val * 1) > (this.config.max * 1)) {val = (this.config.max * 1);} + if ((val * 1) < (this.config.min * 1)) {val = (this.config.min * 1);} + + color = getColor(val, (val - this.config.min) / (this.config.max - this.config.min), this.config.levelColors, this.config.noGradient, this.config.customSectors); + + if(this.config.textRenderer) { + displayVal = this.config.textRenderer(displayVal); + } else if( this.config.humanFriendly ) { + displayVal = humanFriendlyNumber( displayVal, this.config.humanFriendlyDecimal ) + this.config.symbol; + } else { + displayVal = (displayVal * 1).toFixed(this.config.decimals) + this.config.symbol; + } + + if(!this.config.counter) { + this.canvas.getById(this.config.id+"-txtvalue").attr({"text":displayVal}); + setDy(this.canvas.getById(this.config.id+"-txtvalue"), this.params.valueFontSize, this.params.valueY); + } + + this.canvas.getById(this.config.id+"-level").animate({pki: [val, this.config.min, this.config.max, this.params.widgetW, this.params.widgetH, this.params.dx, this.params.dy, this.config.gaugeWidthScale, this.config.donut], "fill":color}, this.config.refreshAnimationTime, this.config.refreshAnimationType); + this.config.value = val * 1; + + // var clear + originalVal, displayVal, color, max = null; +}; + +/** Generate shadow */ +JustGage.prototype.generateShadow = function(svg, defs) { + + var gaussFilter, feOffset, feGaussianBlur, feComposite1, feFlood, feComposite2, feComposite3; + + // FILTER + gaussFilter=document.createElementNS(svg,"filter"); + gaussFilter.setAttribute("id", this.config.id + "-inner-shadow"); + defs.appendChild(gaussFilter); + + // offset + feOffset = document.createElementNS(svg,"feOffset"); + feOffset.setAttribute("dx", 0); + feOffset.setAttribute("dy", this.config.shadowVerticalOffset); + gaussFilter.appendChild(feOffset); + + // blur + feGaussianBlur = document.createElementNS(svg,"feGaussianBlur"); + feGaussianBlur.setAttribute("result","offset-blur"); + feGaussianBlur.setAttribute("stdDeviation", this.config.shadowSize); + gaussFilter.appendChild(feGaussianBlur); + + // composite 1 + feComposite1 = document.createElementNS(svg,"feComposite"); + feComposite1.setAttribute("operator","out"); + feComposite1.setAttribute("in", "SourceGraphic"); + feComposite1.setAttribute("in2","offset-blur"); + feComposite1.setAttribute("result","inverse"); + gaussFilter.appendChild(feComposite1); + + // flood + feFlood = document.createElementNS(svg,"feFlood"); + feFlood.setAttribute("flood-color","black"); + feFlood.setAttribute("flood-opacity", this.config.shadowOpacity); + feFlood.setAttribute("result","color"); + gaussFilter.appendChild(feFlood); + + // composite 2 + feComposite2 = document.createElementNS(svg,"feComposite"); + feComposite2.setAttribute("operator","in"); + feComposite2.setAttribute("in", "color"); + feComposite2.setAttribute("in2","inverse"); + feComposite2.setAttribute("result","shadow"); + gaussFilter.appendChild(feComposite2); + + // composite 3 + feComposite3 = document.createElementNS(svg,"feComposite"); + feComposite3.setAttribute("operator","over"); + feComposite3.setAttribute("in", "shadow"); + feComposite3.setAttribute("in2","SourceGraphic"); + gaussFilter.appendChild(feComposite3); + + // set shadow + if (!this.config.hideInnerShadow) { + this.canvas.canvas.childNodes[2].setAttribute("filter", "url(#" + this.config.id + "-inner-shadow)"); + this.canvas.canvas.childNodes[3].setAttribute("filter", "url(#" + this.config.id + "-inner-shadow)"); + } + + // var clear + gaussFilter, feOffset, feGaussianBlur, feComposite1, feFlood, feComposite2, feComposite3 = null; + +}; + +/** Get color for value */ +function getColor(val, pct, col, noGradient, custSec) { + + var no, inc, colors, percentage, rval, gval, bval, lower, upper, range, rangePct, pctLower, pctUpper, color; + var noGradient = noGradient || custSec.length > 0; + + if(custSec.length > 0) { + for(var i = 0; i < custSec.length; i++) { + if(val > custSec[i].lo && val <= custSec[i].hi) { + return custSec[i].color; + } + } + } + + no = col.length; + if (no === 1) return col[0]; + inc = (noGradient) ? (1 / no) : (1 / (no - 1)); + colors = []; + for (var i = 0; i < col.length; i++) { + percentage = (noGradient) ? (inc * (i + 1)) : (inc * i); + rval = parseInt((cutHex(col[i])).substring(0,2),16); + gval = parseInt((cutHex(col[i])).substring(2,4),16); + bval = parseInt((cutHex(col[i])).substring(4,6),16); + colors[i] = { pct: percentage, color: { r: rval, g: gval, b: bval } }; + } + + if(pct === 0) { + return 'rgb(' + [colors[0].color.r, colors[0].color.g, colors[0].color.b].join(',') + ')'; + } + + for (var j = 0; j < colors.length; j++) { + if (pct <= colors[j].pct) { + if (noGradient) { + return 'rgb(' + [colors[j].color.r, colors[j].color.g, colors[j].color.b].join(',') + ')'; + } else { + lower = colors[j - 1]; + upper = colors[j]; + range = upper.pct - lower.pct; + rangePct = (pct - lower.pct) / range; + pctLower = 1 - rangePct; + pctUpper = rangePct; + color = { + r: Math.floor(lower.color.r * pctLower + upper.color.r * pctUpper), + g: Math.floor(lower.color.g * pctLower + upper.color.g * pctUpper), + b: Math.floor(lower.color.b * pctLower + upper.color.b * pctUpper) + }; + return 'rgb(' + [color.r, color.g, color.b].join(',') + ')'; + } + } + } + +} + +/** Fix Raphael display:none tspan dy attribute bug */ +function setDy(elem, fontSize, txtYpos) { + if ((!ie || ie > 9) && (elem.node.firstChild.attributes.dy)) { + elem.node.firstChild.attributes.dy.value = 0; + } +} + +/** Random integer */ +function getRandomInt (min, max) { + return Math.floor(Math.random() * (max - min + 1)) + min; +} + +/** Cut hex */ +function cutHex(str) { + return (str.charAt(0)=="#") ? str.substring(1,7):str; +} + +/** Human friendly number suffix - From: http://stackoverflow.com/questions/2692323/code-golf-friendly-number-abbreviator */ +function humanFriendlyNumber( n, d ) { + var p, d2, i, s; + + p = Math.pow; + d2 = p(10, d); + i = 7; + while( i ) { + s = p(10,i--*3); + if( s <= n ) { + n = Math.round(n*d2/s)/d2+"KMGTPE"[i]; + } + } + return n; +} + +/** Get style */ +function getStyle(oElm, strCssRule){ + var strValue = ""; + if(document.defaultView && document.defaultView.getComputedStyle){ + strValue = document.defaultView.getComputedStyle(oElm).getPropertyValue(strCssRule); + } + else if(oElm.currentStyle){ + strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){ + return p1.toUpperCase(); + }); + strValue = oElm.currentStyle[strCssRule]; + } + return strValue; +} + +/** Create Element NS Ready */ +function onCreateElementNsReady(func) { + if (document.createElementNS !== undefined) { + func(); + } else { + setTimeout(function() { onCreateElementNsReady(func); }, 100); + } +} + +/** Get IE version */ +// ---------------------------------------------------------- +// A short snippet for detecting versions of IE in JavaScript +// without resorting to user-agent sniffing +// ---------------------------------------------------------- +// If you're not in IE (or IE version is less than 5) then: +// ie === undefined +// If you're in IE (>=5) then you can determine which version: +// ie === 7; // IE7 +// Thus, to detect IE: +// if (ie) {} +// And to detect the version: +// ie === 6 // IE6 +// ie > 7 // IE8, IE9 ... +// ie < 9 // Anything less than IE9 +// ---------------------------------------------------------- +// UPDATE: Now using Live NodeList idea from @jdalton +var ie = (function(){ + + var undef, + v = 3, + div = document.createElement('div'), + all = div.getElementsByTagName('i'); + + while ( + div.innerHTML = '', + all[0] + ); + return v > 4 ? v : undef; +}()); \ No newline at end of file diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index 34f7a6cf6b1..a6e3cada1cf 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -21,8 +21,8 @@ .openerp div.oe_kanban_ellipsis{ width:180px; } -.openerp div.oe_application > span:hover{ - margin: 4px 0; +.openerp .oe_job_launch > a:hover{ + text-decoration: underline } .openerp div.oe_application { @@ -36,9 +36,28 @@ font-size: 11px; color: gray; } +.openerp .oe_kanban_job{ + width: 275px; + min-height: 147px !important; +} +.openerp .oe_gage{ + height: 102px !important; +} .openerp .oe_kanban_footer_right { float: right; } .openerp .oe_kanban_draghandle { height: 114px; -} \ No newline at end of file +} +.openerp .oe_kanban_footer_right{ + width: 220px; +} +.openerp .link{ + float:right; +} +.openerp .oe_job_launch{ + float: right; + position: absolute; + bottom: 3px; + right: 10px; +} diff --git a/addons/hr_recruitment/static/src/img/down1.png b/addons/hr_recruitment/static/src/img/down1.png new file mode 100644 index 0000000000000000000000000000000000000000..31538d03ea05b60a0c66ea2c0f5d983aee7fd9c1 GIT binary patch literal 2446 zcmYk8c{tSDAIHBljbVn-7)xkm8$va?S+5%gLw2LA_agh&48mxxb&~a$J!{I6kU_FU zwwWoqZXskBM!FIGWJJvrm*32Pzvnz>`#hi5`Ml5b`JCrDnFRYw2)Ha9004xQCH^vR zrt-SC5R^Ag$HrRmCaAB?B|LD%Z&m&EcK`rpW`#F#qTJiMpFli$LuQCEHg=+SyG8-y zHT8?v!o%n*Zat4tD3U>^>B6FCfsYHMytEWvWIz(JQ0cTfCDc$TIi;8#7Hmq=`(@OI z$WlR^sTI~#ReW0~-Z4e;IrpKqQG2FD$NlZD;elAoo=OOjwf*Hr=k~5^fx*}=xiUAY zB(5FiYrBGuuiBLglIxilx|b1_jNA&w}0-xJ?jB8E8f z4U>4lzT~;B?JU@hZWx**FD>Fy>H*sl_b!W4`;^~gPo5B6-%a;&lw0%khv9m{!W18* zBMWM7E2aXAGgBQAu|`Rs^k@SBDs6gUfi_yE#R;Kq7l=K|nTuH)X^4YDq39yTi?BTF z+Ch54eiw*qovN}74nE?BxS^qH=TqWdke9l2?0(ZTFo+ceP?>|aL)Qc0ihpLfDeXh&JOPq1WDl`A@tvhth;HbV6VhKS@h~5kVX(U2o#%NmUQW#!_L~;kLOj4 zesp2?>Dx=^FE^Er5sr$OCb=)Lhtg1Yad@`xg!Ir=7hq^~+9 z-2k|N@AD%PiLOaWN5Qp*Hr36|=O)HAN7cd#jE?6P2!gbZn4M9_8$WsG18Ebjrbm7@K=`Uxom z6;s-+-SzeBl@)KTUTBa0IkI;SxF)vjIR(}t&&AZ~{aqITBgC5{d<#ftdD-;!HFIzn zOM3Y5PL_|fyb|i9Sv=)ubT#tY#^=w6aRh{ol=s%cQ^aZedk2QpT2~20v>0qco%fZueUC&siSO(dJm_7)?%6M*FwgJE;DANFh;DQ<2|^-35R zm089bsvR&s3n`v?%?2?$;|?*9Fld$k4KnJnGD@9M?m-q%tC*Dsj}s0iOql(nZB0r0 za<&3nTU+v~ZxiiOQfciHGJZKa?_xNL3|ZSA@WadMCKCGshsFoW>tlKyGn;HsRaY11 zYR=>nG|mmXm?18iC@Mep#6H%5^8LRYOePjxlc*(CQ`EVXu-KyD^ZwJstpQ=F5!SH` z9elNZa5U-4l@EM=Av15@f~2~~w{smn zPj2jm%p)4JiMny{l{n{h>GV^1UOTJdJv}`}pY*?c9-%z%Y`^BO*BB^LqlI9fkQj*ws71IniCTWzva@EkK1G{XM6h~4BHn@xFvFm{qn;MT4xU>=96OiEWZ6cI?-A>#%f4-_%?U40|J`~;>a#!zfjTjR^NzW=} ztIT%I&i&=JY+KbR)C!3fr8&9P7V3$_3H7`r3+KMl@Msh=$pv{oRp+|67eRm~ul`sp zwY`(XP;HE8E*K3wf{s%cBsw~pn@KrY)?gqd&SW77N@1<(})rjw05@H%d6(egsOC5c{+hB#C$Da6> z{%Bf-RIr2_W?0?t!X<gZ$}f(8^;XQH@q1A*|Lms6=;`W;QC+6p!E27guZ=u7U;t;76kPQN zLz!x8Q^$R+Pjl8HW1gqJKb8-a5Cl;k7vdFAEAUXaW}n^GOxQR8*lhkF4^iStb{x^TTlbq;!BKa*iJt zr*4vr;F#``bOd4;El$ZjXO# H>Ye;Q0!CHt literal 0 HcmV?d00001 diff --git a/addons/hr_recruitment/static/src/js/job_position.js b/addons/hr_recruitment/static/src/js/job_position.js new file mode 100644 index 00000000000..bad91e78088 --- /dev/null +++ b/addons/hr_recruitment/static/src/js/job_position.js @@ -0,0 +1,82 @@ +openerp.hr_recruitment = function (openerp) { + + openerp.hr_recruitment.GaugeWidget = openerp.web_kanban.AbstractField.extend({ + start: function() { + var self = this; + + var parent = self.getParent(); + console.log("thisss >>>>>>>>>>>>",parent.record[this.options.label_field]) + var unique_id = _.uniqueId("JustGage"); + var label = this.options.label_field ? parent.record[this.options.label_field].string : ""; + var value = parent.values.no_of_hired_employee.value; + //var min_value = parent.no_of_employee.value; + this.$el.empty() + .attr('style', this.$node.attr('style') + ';float: right;margin-top: -84px;margin-right: -31px;') + .attr('id', unique_id); + this.gage = new JustGage({ + id: unique_id, + node: this.$el[0], + value: value, + min: 0, + max: self.field.raw_value, + relativeGaugeSize: true, + humanFriendly: true, + titleFontColor: '#333333', + valueFontColor: '#333333', + labelFontColor: '#808080', + showInnerShadow:true, + label: label, + levelColors: [ + "#ff0000", + "#f9c802", + "#a9d70b" + ], + }); + var flag_open = false; + if (self.options.action_change) { + self.$el.click(function (event) { + event.stopPropagation(); + flag_open = false; + if (!parent.view.is_action_enabled('edit')) { + return; + } + if (!self.$el.find(".oe_justgage_edit").size()) { + var $svg = self.$el.find('svg'); + $div = $('
'); + $input = $('').val(value); + $div.append($input); + self.$el.prepend($div) + $input.focus() + .keydown(function (event) { + event.stopPropagation(); + if (event.keyCode == 13 || event.keyCode == 9) { + if ($input.val() != value) { + parent.view.dataset.call(self.options.action_change, [parent.id, $input.val()]).then(function () { + parent.do_reload(); + }); + } else { + $div.remove(); + } + } + }) + .click(function (event) { + event.stopPropagation(); + flag_open = false; + }) + .blur(function (event) { + if(!flag_open) { + self.$el.find(".oe_justgage_edit").remove(); + } else { + flag_open = false; + setTimeout(function () {$input.focus();}, 0); + } + }); + } + }).mousedown(function () { + flag_open = true; + }); + } + }, + }); +openerp.web_kanban.fields_registry.add("gage", "openerp.hr_recruitment.GaugeWidget"); +} From 9f35da63763685c578031dcefe652cc95d8e3dd1 Mon Sep 17 00:00:00 2001 From: "sgo@tinyerp.com" <> Date: Wed, 22 May 2013 15:19:47 +0530 Subject: [PATCH 049/344] [IMP]move buttons to footer from header and improve button name bzr revid: sgo@tinyerp.com-20130522094947-5m5nu4jtlv8d3ajl --- .../project/wizard/account_analytic_chart_view.xml | 10 +++++----- .../wizard/account_payment_populate_statement_view.xml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account/project/wizard/account_analytic_chart_view.xml b/addons/account/project/wizard/account_analytic_chart_view.xml index 5c1bad5ed54..45053179288 100644 --- a/addons/account/project/wizard/account_analytic_chart_view.xml +++ b/addons/account/project/wizard/account_analytic_chart_view.xml @@ -7,11 +7,6 @@ account.analytic.chart -
-
+
+
diff --git a/addons/account_payment/wizard/account_payment_populate_statement_view.xml b/addons/account_payment/wizard/account_payment_populate_statement_view.xml index 2c775853e23..2133f3bece9 100644 --- a/addons/account_payment/wizard/account_payment_populate_statement_view.xml +++ b/addons/account_payment/wizard/account_payment_populate_statement_view.xml @@ -11,7 +11,7 @@
-
From 874a27a9c09c3cad8c9c05b2eecf9a9838dbccf6 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Thu, 23 May 2013 17:38:19 +0530 Subject: [PATCH 050/344] [IMP] improve code and add field in hr configuration to add default alias prefix for the job. bzr revid: tpa@tinyerp.com-20130523120819-o2p3ziex4ioaatil --- addons/hr/res_config_view.xml | 2 +- addons/hr_recruitment/hr_recruitment.py | 3 +- addons/hr_recruitment/hr_recruitment_view.xml | 58 ++++++++++++------- addons/hr_recruitment/res_config.py | 1 + addons/hr_recruitment/res_config_view.xml | 6 ++ 5 files changed, 48 insertions(+), 22 deletions(-) diff --git a/addons/hr/res_config_view.xml b/addons/hr/res_config_view.xml index 632ceb56918..043b77e21c2 100644 --- a/addons/hr/res_config_view.xml +++ b/addons/hr/res_config_view.xml @@ -35,7 +35,7 @@
+ +
+
+
From f990ad3b369bedc75fbeda7474214f9b1190cbb2 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Thu, 23 May 2013 18:32:32 +0530 Subject: [PATCH 051/344] [IMP] improved conditions in kanban bzr revid: tpa@tinyerp.com-20130523130232-31bshcp04dntraxd --- addons/hr_recruitment/hr_recruitment_view.xml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index aee301b25fc..eb4bb7835db 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -368,10 +368,8 @@

-
- - %% - +
+ %%
From 572c8ddfc65b877c9ff53f956c6e9be6466d45b4 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Thu, 23 May 2013 18:52:11 +0530 Subject: [PATCH 052/344] [IMP] use related field insted of function field to get manager_id of reated department bzr revid: tpa@tinyerp.com-20130523132211-b9uf21w007i6adtb --- addons/hr_recruitment/hr_recruitment.py | 16 +--------------- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 555d7f1c028..e92fdb92c0b 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -516,27 +516,13 @@ class hr_job(osv.osv): res[position.id] = {'priority1': priority1, 'priority2': priority2, 'priority3': priority3, 'total_application':len(rate_ids)} return res - def _get_department_mgr(self, cr, uid, ids, name, args, context=None): - """Get manager image for specific job position. - """ - res = {} - employee_obj = self.pool.get('hr.employee') - for obj_job in self.browse(cr, uid,ids, context=context): - res[obj_job.id] = {} - if obj_job.department_id: - emp_ids = employee_obj.search(cr, uid, [('id', '=', obj_job.department_id.manager_id.id)], context=context) - if emp_ids: - for employee in employee_obj.browse(cr, uid, emp_ids, context=context): - res[obj_job.id] = {'id':employee.id, 'name': employee.name} - return res - _columns = { 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, help="Email alias for this job position. New emails will automatically " "create new applicants for this job position."), 'priority_count': fields.function(_count_priority, string='Total Priority Employees', type="char"), - 'manager_id': fields.function(_get_department_mgr, string='Department Manager', type="char"),#manager image in kanban + 'manager_id': fields.related('department_id', 'manager_id', type='many2one', string='Department Manager', relation='hr.employee', readonly=True, store=True), 'alias_prefix': fields.char("Alias Name Prefix For Jobs",help="Default Prefix for Alias name of jobs"), } _defaults = { diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index eb4bb7835db..f7cd82e5fa9 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -374,7 +374,7 @@
- +
From 348a88c44b2ad1c2d20813f9d050ab29207533e9 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 24 May 2013 15:22:00 +0530 Subject: [PATCH 053/344] [IMP] remove inline css and improve view bzr revid: tpa@tinyerp.com-20130524095200-vgd6829vk1znn9na --- addons/hr_recruitment/hr_recruitment_view.xml | 20 +++++----- .../static/src/css/job_position.css | 40 ++++++++++++------- .../static/src/js/job_position.js | 1 - 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index f7cd82e5fa9..4a5d9b9faf0 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -371,12 +371,14 @@
%%
-
- -
- -
- +
+
+ +
+ +
+ +
@@ -392,9 +394,9 @@
-
-

To start a recruitment phase for this job position,click here

- +
+

To start a recruitment phase for this job position,click here

+
diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index a6e3cada1cf..ace9af4115f 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -1,34 +1,28 @@ - -.openerp .oe_kanban_job { - width: 230px; -} -.openerp .oe_job{ +.openerp .oe_job { font-size:112%; margin:3px 3px; margin-left: 45px; color: #4c4c4c; } -.openerp .oe_job_message{ +.openerp .oe_job_message { float: right; margin-right: 80px; margin-top: -4px !important; } -.openerp img.oe_kanban_avatar{ +.openerp img.oe_kanban_avatar { margin-top: -23px; width:38px; height:38px; } -.openerp div.oe_kanban_ellipsis{ +.openerp div.oe_kanban_ellipsis { width:180px; } -.openerp .oe_job_launch > a:hover{ - +.openerp .oe_job_launch > a:hover { text-decoration: underline } .openerp div.oe_application { margin-top: 24px; } - .openerp .oe_name { margin-left: 44px; margin-top: -18px; @@ -40,9 +34,6 @@ width: 275px; min-height: 147px !important; } -.openerp .oe_gage{ - height: 102px !important; -} .openerp .oe_kanban_footer_right { float: right; } @@ -61,3 +52,24 @@ bottom: 3px; right: 10px; } +.openerp .oe_department { + display: inline-block; +} +.openerp .oe_new_emp { + margin-top: 6px; + color: #4c4c4c; +} +.openerp .oe_start_recruitment { + padding-top: 10px; +} +.openerp .oe_start_recruitment p { + font-size: 14px; + color: gray; +} +.openerp .oe_start_recruitment img { + margin-top: -24px; + width: 25px; + height: 25px; + float: right; + padding-right: 88px; +} \ No newline at end of file diff --git a/addons/hr_recruitment/static/src/js/job_position.js b/addons/hr_recruitment/static/src/js/job_position.js index bad91e78088..eecd7e451a7 100644 --- a/addons/hr_recruitment/static/src/js/job_position.js +++ b/addons/hr_recruitment/static/src/js/job_position.js @@ -5,7 +5,6 @@ openerp.hr_recruitment = function (openerp) { var self = this; var parent = self.getParent(); - console.log("thisss >>>>>>>>>>>>",parent.record[this.options.label_field]) var unique_id = _.uniqueId("JustGage"); var label = this.options.label_field ? parent.record[this.options.label_field].string : ""; var value = parent.values.no_of_hired_employee.value; From 3ca63cc9b1d75febe28fcf74162643910cd1bec6 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 24 May 2013 15:46:11 +0530 Subject: [PATCH 054/344] [IMP] Improve and remove unnecessary code bzr revid: tpa@tinyerp.com-20130524101611-r6lr1ifjcs92xyes --- addons/hr/hr_view.xml | 1 - addons/hr_recruitment/hr_recruitment.py | 29 +++++-------------- addons/hr_recruitment/hr_recruitment_view.xml | 6 ++-- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 0a33ac9dd55..0b9e2174de6 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -384,7 +384,6 @@ - diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index e92fdb92c0b..cdc96be5ea0 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -492,28 +492,13 @@ class hr_job(osv.osv): _name = "hr.job" _inherits = {'mail.alias': 'alias_id'} - def _count_priority(self, cr, uid, ids, name, args, context=None): - """Applicant, priority count like number of star 3,2,1(star rating) - """ + def _application_count(self, cr, uid, ids, field_name, arg, context=None): + """Calculate total Applications per job""" + res = dict.fromkeys(ids, 0) applicant_obj = self.pool.get('hr.applicant') - res = {} - for position in self.browse(cr, uid, ids, context=context): - res[position.id] = {} - priority1 = 0 - priority2 = 0 - priority3 = 0 - rate_ids = applicant_obj.search(cr, uid, [('job_id', '=', position.id)], context=context) - for applicant in applicant_obj.browse(cr, uid, rate_ids, context=context): - if applicant.job_id.id == position.id: - if applicant.priority == '3': - priority3 += 1 - elif applicant.priority == '2': - priority2 += 1 - elif applicant.priority == '1': - priority1 += 1 - else: - pass - res[position.id] = {'priority1': priority1, 'priority2': priority2, 'priority3': priority3, 'total_application':len(rate_ids)} + applicant_ids = applicant_obj.search(cr, uid, [('job_id', 'in', ids)]) + for applicant in applicant_obj.browse(cr, uid, applicant_ids, context): + res[applicant.job_id.id] += 1 return res _columns = { @@ -521,7 +506,7 @@ class hr_job(osv.osv): 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, help="Email alias for this job position. New emails will automatically " "create new applicants for this job position."), - 'priority_count': fields.function(_count_priority, string='Total Priority Employees', type="char"), + 'application_count': fields.function(_application_count, type='integer', string="Total Applications"), 'manager_id': fields.related('department_id', 'manager_id', type='many2one', string='Department Manager', relation='hr.employee', readonly=True, store=True), 'alias_prefix': fields.char("Alias Name Prefix For Jobs",help="Default Prefix for Alias name of jobs"), } diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 4a5d9b9faf0..4cde91ba5fd 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -345,7 +345,7 @@ - + @@ -383,8 +383,8 @@
Expected New Employees
From da476860dd4d1ccc5eecb0a0030d3ccb0970db67 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 24 May 2013 18:27:39 +0530 Subject: [PATCH 055/344] [IMP] Iproved view and css bzr revid: tpa@tinyerp.com-20130524125739-2h9etthwlb80qeub --- addons/hr_recruitment/hr_recruitment_view.xml | 23 ++++----- .../static/src/css/job_position.css | 48 ++++++------------- .../static/src/js/job_position.js | 8 +--- 3 files changed, 28 insertions(+), 51 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 4cde91ba5fd..23d7ecbe719 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -381,28 +381,29 @@
-
+ -
Expected New Employees
+
+
Expected New Employees
+
Expected New Employee
+
Forecast -

To start a recruitment phase for this job position,click here

-
diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index ace9af4115f..ef744b3a3db 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -1,28 +1,30 @@ +.openerp .oe_kanban_job{ + width: 275px; + min-height: 147px !important; +} .openerp .oe_job { font-size:112%; margin:3px 3px; margin-left: 45px; color: #4c4c4c; } -.openerp .oe_job_message { - float: right; - margin-right: 80px; - margin-top: -4px !important; -} .openerp img.oe_kanban_avatar { margin-top: -23px; width:38px; height:38px; } -.openerp div.oe_kanban_ellipsis { - width:180px; +.openerp .oe_launch_recruitment{ + float: right; + position: absolute; + bottom: 3px; + right: 10px; } -.openerp .oe_job_launch > a:hover { - text-decoration: underline -} -.openerp div.oe_application { +.openerp div.oe_applications { margin-top: 24px; } +.openerp .oe_applications > a > div:hover { + text-decoration: underline +} .openerp .oe_name { margin-left: 44px; margin-top: -18px; @@ -30,32 +32,10 @@ font-size: 11px; color: gray; } -.openerp .oe_kanban_job{ - width: 275px; - min-height: 147px !important; -} -.openerp .oe_kanban_footer_right { - float: right; -} -.openerp .oe_kanban_draghandle { - height: 114px; -} -.openerp .oe_kanban_footer_right{ - width: 220px; -} -.openerp .link{ - float:right; -} -.openerp .oe_job_launch{ - float: right; - position: absolute; - bottom: 3px; - right: 10px; -} .openerp .oe_department { display: inline-block; } -.openerp .oe_new_emp { +.openerp .oe_new_recruitment { margin-top: 6px; color: #4c4c4c; } diff --git a/addons/hr_recruitment/static/src/js/job_position.js b/addons/hr_recruitment/static/src/js/job_position.js index eecd7e451a7..d6668dd1b97 100644 --- a/addons/hr_recruitment/static/src/js/job_position.js +++ b/addons/hr_recruitment/static/src/js/job_position.js @@ -3,12 +3,11 @@ openerp.hr_recruitment = function (openerp) { openerp.hr_recruitment.GaugeWidget = openerp.web_kanban.AbstractField.extend({ start: function() { var self = this; - var parent = self.getParent(); var unique_id = _.uniqueId("JustGage"); var label = this.options.label_field ? parent.record[this.options.label_field].string : ""; var value = parent.values.no_of_hired_employee.value; - //var min_value = parent.no_of_employee.value; + var flag_open = false; this.$el.empty() .attr('style', this.$node.attr('style') + ';float: right;margin-top: -84px;margin-right: -31px;') .attr('id', unique_id); @@ -31,7 +30,6 @@ openerp.hr_recruitment = function (openerp) { "#a9d70b" ], }); - var flag_open = false; if (self.options.action_change) { self.$el.click(function (event) { event.stopPropagation(); @@ -53,9 +51,7 @@ openerp.hr_recruitment = function (openerp) { parent.view.dataset.call(self.options.action_change, [parent.id, $input.val()]).then(function () { parent.do_reload(); }); - } else { - $div.remove(); - } + } else { $div.remove();} } }) .click(function (event) { From 036528324382ee58fc204d01ee9f872d61ef2817 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 27 May 2013 19:02:37 +0530 Subject: [PATCH 056/344] [IMP] Add one alias for all jobs in the hr config view and related changes bzr revid: tpa@tinyerp.com-20130527133237-s1s1ifi8cg3l1a07 --- addons/hr/hr.py | 2 +- addons/hr_recruitment/hr_recruitment.py | 49 +++++-------------- addons/hr_recruitment/hr_recruitment_view.xml | 18 +------ addons/hr_recruitment/res_config.py | 32 +++++++++++- addons/hr_recruitment/res_config_view.xml | 8 +-- 5 files changed, 50 insertions(+), 59 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index f0144f1ee18..ef0b746777b 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -112,7 +112,7 @@ class hr_job(osv.osv): }, multi='no_of_employee'), 'no_of_recruitment': fields.float('Expected New Employee', help='Number of new employees you expect to recruit.'), - 'no_of_hired_employee':fields.float('Hired Employee', help='Number of hired employees.'), + 'no_of_hired_employee':fields.float('Hired Employee', help='Number of hired employees during this recruitment phase.'), 'employee_ids': fields.one2many('hr.employee', 'job_id', 'Employees', groups='base.group_user'), 'description': fields.text('Job Description'), 'requirements': fields.text('Requirements'), diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index cdc96be5ea0..8e9729f3497 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -482,7 +482,6 @@ class hr_applicant(base_stage, osv.Model): def get_empty_list_help(self, cr, uid, help, context=None): context['empty_list_help_model'] = 'hr.job' - context['empty_list_help_id'] = context.get('default_job_id', None) context['empty_list_help_document_name'] = _("job applicants") return super(hr_applicant, self).get_empty_list_help(cr, uid, help, context=context) @@ -490,7 +489,6 @@ class hr_applicant(base_stage, osv.Model): class hr_job(osv.osv): _inherit = "hr.job" _name = "hr.job" - _inherits = {'mail.alias': 'alias_id'} def _application_count(self, cr, uid, ids, field_name, arg, context=None): """Calculate total Applications per job""" @@ -501,47 +499,22 @@ class hr_job(osv.osv): res[applicant.job_id.id] += 1 return res + def _job_alias(self, cr, uid, ids, field_name, arg, context=None): + res = dict.fromkeys(ids, False) + mail_alias = self.pool.get('mail.alias') + model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'hr.applicant')], context=context) + alias_ids = mail_alias.search(cr, uid, [('alias_model_id', '=', model_ids[0])], context=context) + if alias_ids: + for id in ids: + res[id] = alias_ids[0] + return res + _columns = { 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), - 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, - help="Email alias for this job position. New emails will automatically " - "create new applicants for this job position."), 'application_count': fields.function(_application_count, type='integer', string="Total Applications"), 'manager_id': fields.related('department_id', 'manager_id', type='many2one', string='Department Manager', relation='hr.employee', readonly=True, store=True), - 'alias_prefix': fields.char("Alias Name Prefix For Jobs",help="Default Prefix for Alias name of jobs"), + 'job_alias': fields.function(_job_alias, type='many2one', relation='mail.alias', string='Mail Alias'), } - _defaults = { - 'alias_domain': False, # always hide alias during creation - } - - def _auto_init(self, cr, context=None): - """Installation hook to create aliases for all jobs and avoid constraint errors.""" - res = self.pool.get('mail.alias').migrate_to_alias(cr, self._name, self._table, super(hr_job,self)._auto_init, - self._columns['alias_id'], 'name', alias_prefix='job+', alias_defaults={'job_id': 'id'}, context=context) - return res - - def create(self, cr, uid, vals, context=None): - mail_alias = self.pool.get('mail.alias') - if not vals.get('alias_id'): - vals.pop('alias_name', None) # prevent errors during copy() - alias_id = mail_alias.create_unique_alias(cr, uid, - # Using '+' allows using subaddressing for those who don't - # have a catchall domain setup. - {'alias_name': vals['alias_prefix']+'+'+vals['name']}, - model_name="hr.applicant", - context=context) - vals['alias_id'] = alias_id - res = super(hr_job, self).create(cr, uid, vals, context) - mail_alias.write(cr, uid, [vals['alias_id']], {"alias_defaults": {'job_id': res}}, context) - return res - - def unlink(self, cr, uid, ids, context=None): - # Cascade-delete mail aliases as well, as they should not exist without the job position. - mail_alias = self.pool.get('mail.alias') - alias_ids = [job.alias_id.id for job in self.browse(cr, uid, ids, context=context) if job.alias_id] - res = super(hr_job, self).unlink(cr, uid, ids, context=context) - mail_alias.unlink(cr, uid, alias_ids, context=context) - return res def action_print_survey(self, cr, uid, ids, context=None): if context is None: diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 23d7ecbe719..48962079566 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -312,20 +312,6 @@ attrs="{'invisible':[('survey_id','=',False)]}"/>
- -
-
-
@@ -368,8 +354,8 @@

-
- %% +
+ %%
diff --git a/addons/hr_recruitment/res_config.py b/addons/hr_recruitment/res_config.py index 0f620b596c0..7078500bba7 100644 --- a/addons/hr_recruitment/res_config.py +++ b/addons/hr_recruitment/res_config.py @@ -33,6 +33,36 @@ class hr_applicant_settings(osv.osv_memory): fetchmail_model='hr.applicant', fetchmail_name='Incoming HR Applications', help ="""Allow applicants to send their job application to an email address (jobs@mycompany.com), and create automatically application documents in the system."""), - 'default_alias_prefix': fields.char('Default Alias Prefix for Jobs', default_model='hr.job'), + 'alias_prefix': fields.char('Default Alias Name for Jobs'), + 'alias_domain' : fields.char('Alias Domain'), } + def get_default_alias_prefix(self, cr, uid, ids, context=None): + alias_name = '' + mail_alias = self.pool.get('mail.alias') + model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'hr.applicant')], context=context) + alias_ids = mail_alias.search(cr, uid, [('alias_model_id', '=', model_ids[0])], context=context) + if alias_ids: + alias_name = mail_alias.browse(cr, uid, alias_ids[0], context=context).alias_name + return {'alias_prefix': alias_name} + + def set_default_alias_prefix(self, cr, uid, ids, context=None): + mail_alias = self.pool.get('mail.alias') + record = self.browse(cr, uid, ids[0], context=context) + if record.alias_prefix: + model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'hr.applicant')], context=context) + alias_ids = mail_alias.search(cr, uid, [('alias_model_id', '=', model_ids[0])], context=context) + if alias_ids: + mail_alias.write(cr, uid, alias_ids[0],{'alias_name': record.alias_prefix}, context=context) + else: + mail_alias.create_unique_alias(cr, uid, {'alias_name': record.alias_prefix}, model_name="hr.applicant", context=context) + + def get_default_alias_domain(self, cr, uid, ids, context=None): + alias_domain = self.pool.get("ir.config_parameter").get_param(cr, uid, "mail.catchall.domain", context=context) + if not alias_domain: + domain = self.pool.get("ir.config_parameter").get_param(cr, uid, "web.base.url", context=context) + try: + alias_domain = urlparse.urlsplit(domain).netloc.split(':')[0] + except Exception: + pass + return {'alias_domain': alias_domain} \ No newline at end of file diff --git a/addons/hr_recruitment/res_config_view.xml b/addons/hr_recruitment/res_config_view.xml index 1155c270f5f..8032761e4fd 100644 --- a/addons/hr_recruitment/res_config_view.xml +++ b/addons/hr_recruitment/res_config_view.xml @@ -26,9 +26,11 @@
-
-

-
+
%%
@@ -377,7 +377,7 @@
Expected New Employees
Expected New Employee
- Forecast + Forecast
diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index ef744b3a3db..050a6c9a9ad 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -1,17 +1,17 @@ .openerp .oe_kanban_job{ - width: 275px; - min-height: 147px !important; + width: 355px; + min-height: 152px !important; } .openerp .oe_job { - font-size:112%; - margin:3px 3px; - margin-left: 45px; + font-size: 112%; + margin: 3px 3px; + margin-left: 55px; color: #4c4c4c; } .openerp img.oe_kanban_avatar { margin-top: -23px; - width:38px; - height:38px; + width: 45px; + height: 45px; } .openerp .oe_launch_recruitment{ float: right; @@ -20,14 +20,14 @@ right: 10px; } .openerp div.oe_applications { - margin-top: 24px; + margin-top: 28px; } .openerp .oe_applications > a > div:hover { text-decoration: underline } .openerp .oe_name { - margin-left: 44px; - margin-top: -18px; + margin-left: 55px; + margin-top: -22px; margin-bottom: -15px; font-size: 11px; color: gray; @@ -36,7 +36,7 @@ display: inline-block; } .openerp .oe_new_recruitment { - margin-top: 6px; + margin-top: 4px; color: #4c4c4c; } .openerp .oe_start_recruitment { diff --git a/addons/hr_recruitment/static/src/js/job_position.js b/addons/hr_recruitment/static/src/js/job_position.js index d6668dd1b97..2e7f19bcee1 100644 --- a/addons/hr_recruitment/static/src/js/job_position.js +++ b/addons/hr_recruitment/static/src/js/job_position.js @@ -9,7 +9,7 @@ openerp.hr_recruitment = function (openerp) { var value = parent.values.no_of_hired_employee.value; var flag_open = false; this.$el.empty() - .attr('style', this.$node.attr('style') + ';float: right;margin-top: -84px;margin-right: -31px;') + .attr('style', this.$node.attr('style') + ';float: right; margin-top: -110px; margin-right: -30px;') .attr('id', unique_id); this.gage = new JustGage({ id: unique_id, From fc295aad7791ec3ed6dc6f904c186da2e4b253eb Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Tue, 28 May 2013 14:36:38 +0530 Subject: [PATCH 058/344] [RMV] revert the changes of making uniqe alias for all jobs bzr revid: tpa@tinyerp.com-20130528090638-jh8u0l8od0zdixe8 --- addons/hr_recruitment/hr_recruitment.py | 49 ++++++++++++++----- addons/hr_recruitment/hr_recruitment_view.xml | 13 +++++ 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 8e9729f3497..0be4b8158a3 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -482,6 +482,7 @@ class hr_applicant(base_stage, osv.Model): def get_empty_list_help(self, cr, uid, help, context=None): context['empty_list_help_model'] = 'hr.job' + context['empty_list_help_id'] = context.get('default_job_id', None) context['empty_list_help_document_name'] = _("job applicants") return super(hr_applicant, self).get_empty_list_help(cr, uid, help, context=context) @@ -489,6 +490,7 @@ class hr_applicant(base_stage, osv.Model): class hr_job(osv.osv): _inherit = "hr.job" _name = "hr.job" + _inherits = {'mail.alias': 'alias_id'} def _application_count(self, cr, uid, ids, field_name, arg, context=None): """Calculate total Applications per job""" @@ -499,22 +501,47 @@ class hr_job(osv.osv): res[applicant.job_id.id] += 1 return res - def _job_alias(self, cr, uid, ids, field_name, arg, context=None): - res = dict.fromkeys(ids, False) - mail_alias = self.pool.get('mail.alias') - model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'hr.applicant')], context=context) - alias_ids = mail_alias.search(cr, uid, [('alias_model_id', '=', model_ids[0])], context=context) - if alias_ids: - for id in ids: - res[id] = alias_ids[0] - return res - _columns = { 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), + 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True, + help="Email alias for this job position. New emails will automatically " + "create new applicants for this job position."), 'application_count': fields.function(_application_count, type='integer', string="Total Applications"), 'manager_id': fields.related('department_id', 'manager_id', type='many2one', string='Department Manager', relation='hr.employee', readonly=True, store=True), - 'job_alias': fields.function(_job_alias, type='many2one', relation='mail.alias', string='Mail Alias'), } + } + _defaults = { + 'alias_domain': False, # always hide alias during creation + } + + def _auto_init(self, cr, context=None): + """Installation hook to create aliases for all jobs and avoid constraint errors.""" + res = self.pool.get('mail.alias').migrate_to_alias(cr, self._name, self._table, super(hr_job,self)._auto_init, + self._columns['alias_id'], 'name', alias_prefix='job+', alias_defaults={'job_id': 'id'}, context=context) + return res + + def create(self, cr, uid, vals, context=None): + mail_alias = self.pool.get('mail.alias') + if not vals.get('alias_id'): + vals.pop('alias_name', None) # prevent errors during copy() + alias_id = mail_alias.create_unique_alias(cr, uid, + # Using '+' allows using subaddressing for those who don't + # have a catchall domain setup. + {'alias_name': 'jobs+'+vals['name']}, + model_name="hr.applicant", + context=context) + vals['alias_id'] = alias_id + res = super(hr_job, self).create(cr, uid, vals, context) + mail_alias.write(cr, uid, [vals['alias_id']], {"alias_defaults": {'job_id': res}}, context) + return res + + def unlink(self, cr, uid, ids, context=None): + # Cascade-delete mail aliases as well, as they should not exist without the job position. + mail_alias = self.pool.get('mail.alias') + alias_ids = [job.alias_id.id for job in self.browse(cr, uid, ids, context=context) if job.alias_id] + res = super(hr_job, self).unlink(cr, uid, ids, context=context) + mail_alias.unlink(cr, uid, alias_ids, context=context) + return res def action_print_survey(self, cr, uid, ids, context=None): if context is None: diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index ac4e4e2a624..dded03374a0 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -312,6 +312,19 @@ attrs="{'invisible':[('survey_id','=',False)]}"/>
+ +
+
+
From 4d74d76ff2ce69d783fc775d60112cd465d62f36 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Tue, 28 May 2013 19:01:43 +0530 Subject: [PATCH 059/344] [IMP] add default job alias for .jobs bzr revid: tpa@tinyerp.com-20130528133143-q21h2ld6ehhgo975 --- addons/hr_recruitment/hr_recruitment_view.xml | 25 ++++++++----------- addons/hr_recruitment/res_config.py | 14 +++++------ .../static/src/css/job_position.css | 22 +++++++++------- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index dded03374a0..6839d54c855 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -366,19 +366,16 @@
-

-
- %% +
+
-
-
- -
- -
- -
+
+
+
+ +
+
-
Expected New Employees
-
Expected New Employee
+
Expected New Employees
+
Expected New Employee
Forecast
-

To start a recruitment phase for this job position,click here

+

To start the recruitment,click here

diff --git a/addons/hr_recruitment/res_config.py b/addons/hr_recruitment/res_config.py index 7078500bba7..25bb15646f1 100644 --- a/addons/hr_recruitment/res_config.py +++ b/addons/hr_recruitment/res_config.py @@ -40,20 +40,18 @@ class hr_applicant_settings(osv.osv_memory): def get_default_alias_prefix(self, cr, uid, ids, context=None): alias_name = '' mail_alias = self.pool.get('mail.alias') - model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'hr.applicant')], context=context) - alias_ids = mail_alias.search(cr, uid, [('alias_model_id', '=', model_ids[0])], context=context) - if alias_ids: - alias_name = mail_alias.browse(cr, uid, alias_ids[0], context=context).alias_name + alias = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'mail_alias_jobs') + if alias: + alias_name = alias.alias_name return {'alias_prefix': alias_name} def set_default_alias_prefix(self, cr, uid, ids, context=None): mail_alias = self.pool.get('mail.alias') record = self.browse(cr, uid, ids[0], context=context) if record.alias_prefix: - model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'hr.applicant')], context=context) - alias_ids = mail_alias.search(cr, uid, [('alias_model_id', '=', model_ids[0])], context=context) - if alias_ids: - mail_alias.write(cr, uid, alias_ids[0],{'alias_name': record.alias_prefix}, context=context) + alias = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'mail_alias_jobs') + if alias: + alias.write({'alias_name': record.alias_prefix}) else: mail_alias.create_unique_alias(cr, uid, {'alias_name': record.alias_prefix}, model_name="hr.applicant", context=context) diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index 050a6c9a9ad..700192abccd 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -1,17 +1,19 @@ .openerp .oe_kanban_job{ width: 355px; - min-height: 152px !important; + min-height: 125px !important; } .openerp .oe_job { font-size: 112%; + position: inline; margin: 3px 3px; - margin-left: 55px; + margin-left: 70px; color: #4c4c4c; } .openerp img.oe_kanban_avatar { - margin-top: -23px; - width: 45px; - height: 45px; + margin-top: -40px; + position: absolute; + width: 60px; + height: 60px; } .openerp .oe_launch_recruitment{ float: right; @@ -26,9 +28,11 @@ text-decoration: underline } .openerp .oe_name { - margin-left: 55px; - margin-top: -22px; - margin-bottom: -15px; + font-size: 14px; +} +.openerp .oe_manager_name { + margin-left: 70px; + position: absolute; font-size: 11px; color: gray; } @@ -40,7 +44,7 @@ color: #4c4c4c; } .openerp .oe_start_recruitment { - padding-top: 10px; + padding-top: 20px; } .openerp .oe_start_recruitment p { font-size: 14px; From c2e75a7a65d718fe0eaba0c298a3360ab0b16a1f Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Wed, 29 May 2013 11:48:58 +0530 Subject: [PATCH 060/344] [IMP] remove expected new employee from kanban and improved view bzr revid: tpa@tinyerp.com-20130529061858-3ncrwczio8uwmzvq --- addons/hr/hr_view.xml | 2 +- addons/hr_recruitment/hr_recruitment_view.xml | 13 ++++--------- addons/hr_recruitment/res_config_view.xml | 2 +- .../hr_recruitment/static/src/css/job_position.css | 5 +++-- addons/hr_recruitment/static/src/js/job_position.js | 2 +- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 0b9e2174de6..b0b927f9450 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -385,7 +385,7 @@ - + diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 6839d54c855..bbdc96f9c1b 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -378,20 +378,14 @@ -
-
Expected New Employees
-
Expected New Employee
+ Applications + Application
Forecast
-

To start the recruitment,click here

+

To start the recruitment, click here

@@ -415,6 +409,7 @@ hr.job form kanban,tree,form + {'search_default_in_recruitment': 1} diff --git a/addons/hr_recruitment/res_config_view.xml b/addons/hr_recruitment/res_config_view.xml index 8032761e4fd..a42091ff8dd 100644 --- a/addons/hr_recruitment/res_config_view.xml +++ b/addons/hr_recruitment/res_config_view.xml @@ -27,7 +27,7 @@
-
- +