From 7a22b5bf8bc138f73af5c3cc763c3b173cc63b51 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sun, 28 Feb 2010 20:44:19 +0100 Subject: [PATCH] [IMP] hr_recruitement view bzr revid: fp@tinyerp.com-20100228194419-sqkugdku2skoz088 --- addons/crm_hr/__terp__.py | 5 +- addons/crm_hr/crm_hr.py | 46 +++-- addons/crm_hr/crm_hr_view.xml | 252 +++++++++++++------------- addons/crm_hr/crm_hr_wizard.xml | 6 +- addons/crm_hr/report/report_crm_hr.py | 12 +- addons/crm_hr/report_crm_hr_view.xml | 76 ++++---- addons/hr/hr.py | 30 +-- addons/hr/hr_view.xml | 149 ++++++++------- 8 files changed, 293 insertions(+), 283 deletions(-) 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 - - - - - - - - + + + + + + - +