+
@@ -173,7 +170,7 @@
Jobs - Recruitment Searchhr.applicant
-
+
diff --git a/addons/hr_recruitment/report/hr_recruitment_report.py b/addons/hr_recruitment/report/hr_recruitment_report.py
index b733655e51e..93384c95ed4 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report.py
+++ b/addons/hr_recruitment/report/hr_recruitment_report.py
@@ -25,11 +25,12 @@ from .. import hr_recruitment
from openerp.addons.decimal_precision import decimal_precision as dp
-class hr_recruitment_report(osv.osv):
+class hr_recruitment_report(osv.Model):
_name = "hr.recruitment.report"
_description = "Recruitments Statistics"
_auto = False
- _rec_name = 'date'
+ _rec_name = 'date_create'
+ _order = 'date_create desc'
_columns = {
'user_id': fields.many2one('res.users', 'User', readonly=True),
@@ -44,7 +45,8 @@ class hr_recruitment_report(osv.osv):
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year', size=4, readonly=True),
- 'date': fields.date('Date', readonly=True),
+ 'date_create': fields.date('Create Date', readonly=True),
+ 'date_last_stage_update': fields.datetime('Last Stage Update', readonly=True),
'date_closed': fields.date('Closed', readonly=True),
'job_id': fields.many2one('hr.job', 'Applied Job',readonly=True),
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage'),
@@ -60,15 +62,16 @@ class hr_recruitment_report(osv.osv):
'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Days to close the project issue"),
}
- _order = 'date desc'
+
def init(self, cr):
tools.drop_view_if_exists(cr, 'hr_recruitment_report')
cr.execute("""
create or replace view hr_recruitment_report as (
select
min(s.id) as id,
- date_trunc('day',s.create_date) as date,
+ date_trunc('day',s.create_date) as date_create,
date_trunc('day',s.date_closed) as date_closed,
+ date_trunc('day',s.date_last_stage_update) as date_last_stage_update,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day,
@@ -85,7 +88,7 @@ class hr_recruitment_report(osv.osv):
(sum(salary_proposed)/count(*)) as salary_prop_avg,
sum(salary_expected) as salary_exp,
(sum(salary_expected)/count(*)) as salary_exp_avg,
- extract('epoch' from (s.date_closed-s.create_date))/(3600*24) as delay_close,
+ extract('epoch' from (s.date_closed-s.create_date))/(3600*24) as delay_close,
count(*) as nbr
from hr_applicant s
group by
@@ -97,6 +100,7 @@ class hr_recruitment_report(osv.osv):
s.date_open,
s.create_date,
s.date_closed,
+ s.date_last_stage_update,
s.partner_id,
s.company_id,
s.user_id,
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index 1845a97014e..d75c29c17a2 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -6,7 +6,7 @@
hr.recruitment.report
-
+
@@ -17,6 +17,7 @@
+
@@ -57,20 +58,21 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr_recruitment/test/recruitment_process.yml b/addons/hr_recruitment/test/recruitment_process.yml
index 0a6d5426e0d..a48b70a5683 100644
--- a/addons/hr_recruitment/test/recruitment_process.yml
+++ b/addons/hr_recruitment/test/recruitment_process.yml
@@ -43,20 +43,8 @@
I print Applicant fill up the interview quetion
-
!python {model: hr.applicant}: |
- self.action_print_survey(cr, uid, [ref('hr_case_programmer')])
--
- I do not give employment to the hired the applicant.
--
- !python {model: hired.employee}: |
context.update({'active_model': 'hr.applicant', 'active_ids': [ref("hr_recruitment.hr_case_programmer")], 'active_id': ref("hr_recruitment.hr_case_programmer")})
- emp_id = self.create(cr, uid, {}, context=context)
--
- Now I give employment to hired applicant .
--
- !python {model: hr.applicant}: |
- hired_emp_obj = self.pool.get('hired.employee')
- context.update({'active_model': 'hr.applicant', 'active_ids': [ref("hr_recruitment.hr_case_programmer")], 'active_id': ref("hr_recruitment.hr_case_programmer")})
- emp_hr_id = hired_emp_obj.create(cr, uid, {}, context=context)
+ self.action_print_survey(cr, uid, [ref('hr_case_programmer')])
-
Now hired employee want to be a partner of company.
-
diff --git a/addons/hr_recruitment/wizard/__init__.py b/addons/hr_recruitment/wizard/__init__.py
index fde7df63456..d52c7a9113a 100644
--- a/addons/hr_recruitment/wizard/__init__.py
+++ b/addons/hr_recruitment/wizard/__init__.py
@@ -2,7 +2,7 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL ().
+# Copyright (C) 2004-Today OpenERP ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -19,9 +19,7 @@
#
##############################################################################
-
import hr_recruitment_create_partner_job
-import hr_recruitment_employee_hired
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py b/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py
deleted file mode 100644
index 60d31e74eee..00000000000
--- a/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved
-# $Id$
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-from openerp.osv import fields, osv
-from openerp.tools.translate import _
-
-class hired_employee(osv.osv_memory):
- _name = 'hired.employee'
- _description = 'Create Employee'
-
- def case_close(self, cr, uid, ids, context=None):
- """
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of case's Ids
- @param *args: Give Tuple Value
- """
- if context is None:
- context = {}
- self.pool.get('hr.applicant').case_close(cr, uid,context.get('active_ids',[]))
- return {}
-
- def case_close_with_emp(self, cr, uid, ids, context=None):
- """
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of case's Ids
- """
- if context is None:
- context = {}
- return self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', []))
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.xml b/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.xml
deleted file mode 100644
index d014bd54aa8..00000000000
--- a/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
- hr.recruitment.hired2employee.form
- hired.employee
-
-
-
-
-
- Create Employee
- ir.actions.act_window
- hired.employee
- form
- form
- new
-
-
-
-