diff --git a/addons/crm_hr/__terp__.py b/addons/crm_hr/__terp__.py
index 71ef7da908e..52612aa12f6 100644
--- a/addons/crm_hr/__terp__.py
+++ b/addons/crm_hr/__terp__.py
@@ -20,13 +20,12 @@
#
##############################################################################
-
{
- 'name': 'CRM Stuff in Job ',
+ 'name': 'HR - Recruitement',
'version': '1.0',
'category': 'Generic Modules/CRM & SRM',
'description': """
- This module provide Store the Job
+Manages job position and recruitement process.
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
diff --git a/addons/crm_hr/crm_hr.py b/addons/crm_hr/crm_hr.py
index bf4ffe9d65c..234d118b26e 100644
--- a/addons/crm_hr/crm_hr.py
+++ b/addons/crm_hr/crm_hr.py
@@ -22,35 +22,33 @@
from osv import fields,osv,orm
from crm import crm
+AVAILABLE_STATES = [
+ ('draft','New'),
+ ('open','In Progress'),
+ ('cancel', 'Refused'),
+ ('done', 'Hired'),
+ ('pending','Pending')
+]
+
class crm_applicant(osv.osv):
_name = "crm.applicant"
_description = "Applicant Cases"
_order = "id desc"
_inherit ='crm.case'
_columns = {
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'date': fields.datetime('Date'),
- 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
- 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.applicant')]"),
- 'planned_revenue': fields.float('Planned Revenue'),
- 'planned_cost': fields.float('Planned Costs'),
- 'probability': fields.float('Probability (%)'),
- 'partner_name': fields.char("Employee's Name", size=64),
- 'partner_name2': fields.char('Employee Email', size=64),
- 'partner_phone': fields.char('Phone', size=32),
- 'partner_mobile': fields.char('Mobile', size=32),
- 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.applicant')]"),
- 'type_id': fields.many2one('crm.case.resource.type', 'Type Name', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.applicant')]"),
- 'duration': fields.float('Duration'),
- 'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
- 'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
- 'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
- " With each commercial opportunity, you can indicate the canall which is this opportunity source."),
- 'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
- "the partner mentality in relation to our services.The scale has" \
- "to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
- 'phonecall_id':fields.many2one ('crm.phonecall', 'Phonecall'),
- 'department_id':fields.many2one('hr.department','Department'),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'date': fields.datetime('Date'),
+ 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Appreciation'),
+ 'job_id': fields.many2one('hr.job', 'Applied Job'),
+ 'salary_proposed': fields.float('Proposed Salary'),
+ 'salary_expected': fields.float('Expected Salary'),
+ 'availability': fields.integer('Availability (Days)'),
+ 'partner_name': fields.char("Applicant's Name", size=64),
+ 'partner_phone': fields.char('Phone', size=32),
+ 'partner_mobile': fields.char('Mobile', size=32),
+ 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.applicant')]"),
+ 'type_id': fields.many2one('crm.case.resource.type', 'Degree', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.applicant')]"),
+ 'department_id':fields.many2one('hr.department','Department'),
+ 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
}
-
crm_applicant()
diff --git a/addons/crm_hr/crm_hr_view.xml b/addons/crm_hr/crm_hr_view.xml
index 95b13a09953..7e591b87741 100644
--- a/addons/crm_hr/crm_hr_view.xml
+++ b/addons/crm_hr/crm_hr_view.xml
@@ -6,50 +6,54 @@
# Job Categories
# ------------------------------------------------------
-
+
Applicant Categories
crm.case.categ
form
- [('object_id.model', '=', 'crm.applicant')]
- {'object_id':'crm.applicant'}
+ [('object_id.model', '=', 'crm.applicant')]
+ {'object_id':'crm.applicant'}
# ------------------------------------------------------
- # Stage
- # ------------------------------------------------------
-
- Applicant Stages
- crm.case.stage
- form
-
- [('object_id.model', '=', 'crm.applicant')]
- {'object_id':'crm.applicant'}
-
-
+ # Stage
+ # ------------------------------------------------------
+
+ Applicant Stages
+ crm.case.stage
+ form
+
+ [('object_id.model', '=', 'crm.applicant')]
+ {'object_id':'crm.applicant'}
+
+
+
# ------------------------------------------------------
# Jobs
# ------------------------------------------------------
- Jobs - Recruitment Tree
+ Applicants
crm.applicant
tree
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
-
+
-
+
@@ -63,76 +67,71 @@
- Jobs - Recruitment Search
- crm.applicant
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Jobs - Recruitment Search
+ crm.applicant
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm_hr/crm_hr_wizard.xml b/addons/crm_hr/crm_hr_wizard.xml
index 9ae91e62d70..14c861071b4 100644
--- a/addons/crm_hr/crm_hr_wizard.xml
+++ b/addons/crm_hr/crm_hr_wizard.xml
@@ -2,7 +2,7 @@
-
+
-
+
report.crm.applicant.user.tree
report.crm.applicant.user
tree
-
+
-
-
+
-
+
report.crm.applicant.user.form
report.crm.applicant.user
form
-
+
-
-
+
-
+
report.crm.applicant.user.graph
report.crm.applicant.user
graph
@@ -49,7 +47,7 @@
-
+
report.crm.applicant.user.select
report.crm.applicant.user
@@ -60,25 +58,25 @@
-
+
Applicant by User and Section
report.crm.applicant.user
form
graph,tree
-
-
+
+
-
-
+
+
-
+
report.crm.applicant.categ.tree
report.crm.applicant.categ
@@ -88,12 +86,11 @@
-
-
+
-
+
report.crm.applicant.categ.form
report.crm.applicant.categ
@@ -103,13 +100,12 @@
-
-
+
-
+
report.crm.applicant.categ.graph
report.crm.applicant.categ
graph
@@ -122,10 +118,10 @@
-
+
report.crm.applicant.categ.select
report.crm.applicant.categ
-
+
search
@@ -133,34 +129,34 @@
-
+
Applicant by Categories and Section
report.crm.applicant.categ
form
graph,tree
-
-
+
+
-
+
-
+
report.crm.applicant.section.tree
report.crm.applicant.section
tree
-
-
+
+
-
+
report.crm.applicant.section.graph
report.crm.applicant.section
graph
@@ -172,7 +168,7 @@
-
+
report.crm.applicant.section.select
report.crm.applicant.section
@@ -183,15 +179,15 @@
-
+
Applicant by Section
report.crm.applicant.section
form
graph,tree
-
-
+
+
-
+
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index 1d816acc2d8..c400665e4b8 100755
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -61,32 +61,32 @@ class hr_employee_marital_status(osv.osv):
}
hr_employee_marital_status()
-class crm_job(osv.osv):
-
+class hr_job(osv.osv):
def _no_of_employee(self, cr, uid, ids, name,args,context=None):
res = {}
for emp in self.browse(cr, uid, ids):
- res[emp.id] = str(len(emp.employee_ids))
+ res[emp.id] = len(emp.employee_ids or [])
return res
- _name = "crm.job"
- _description = "Job Information"
+ _name = "hr.job"
+ _description = "Job Description"
_columns = {
- 'name': fields.char('Name', size=128, required=True, select=True),
- 'ref': fields.char('Code', size=64),
+ 'name': fields.char('Job Name', size=128, required=True, select=True),
'expected_employees':fields.integer('Expected Employees'),
- 'no_of_employee': fields.function(_no_of_employee, method=True, string='No of Employee', type='char'),
+ 'no_of_employee': fields.function(_no_of_employee, method=True, string='No of Employee', type='integer'),
'employee_ids':fields.one2many('hr.employee', 'job_id','Employees'),
'description': fields.text('Job Description'),
'requirements':fields.text('Requirements'),
- 'department_id':fields.many2one('hr.department','Department')
-
- }
+ 'department_id':fields.many2one('hr.department','Department'),
+ 'company_id': fields.many2one('res.company', 'Company'),
+ 'state': fields.selection([('open','Open'),('old','Old'),('recruit','In Recruitement')], 'State', required=True),
+ }
_defaults = {
'expected_employees': lambda *a: 1,
- }
-
-crm_job()
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr.job', context=c),
+ 'state': lambda *args: 'open'
+ }
+hr_job()
class hr_employee(osv.osv):
_name = "hr.employee"
@@ -115,7 +115,7 @@ class hr_employee(osv.osv):
'child_ids': fields.one2many('hr.employee', 'parent_id','Subordinates'),
'resource_id': fields.many2one('resource.resource','Resource',ondelete='cascade'),
'coach_id':fields.many2one('res.users','Coach'),
- 'job_id':fields.many2one('crm.job', 'Job'),
+ 'job_id':fields.many2one('hr.job', 'Job'),
}
_defaults = {
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 185fe539af6..042bf0d9756 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -62,12 +62,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -94,19 +94,19 @@
- Employees
- hr.employee
- search
-
-
-
-
-
+ Employees
+ hr.employee
+ search
+
+
+
+
+
-
-
-
+
+
+
Employees Structure
@@ -150,7 +150,7 @@
id="menu_open_view_employee_list_my"
parent="menu_open_view_employee_list"/>-->
@@ -298,77 +298,92 @@
-
- crm.job.form
- crm.job
+
+ hr.job.form
+ hr.job
form
+
+
-
- crm.job.tree
- crm.job
+
+ hr.job.tree
+ hr.job
tree
-
-
+
+
- Job
- crm.job
- search
-
-
-
-
-
-
-
-
-
-
+ Job
+ hr.job
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Job
- crm.job
- form
- tree,form
-
-
-
+
+ Job Positions
+ hr.job
+ form
+ tree,form
+
-
-
+
+
-
+