From a81d8c34af2da547d70d23fe24dc4bad9aaaa560 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Thu, 17 May 2012 15:28:16 +0530 Subject: [PATCH 1/3] [IMP]hr_recruitment: improve job position form view bzr revid: pna@tinyerp.com-20120517095816-w1zphtkph49hnshg --- addons/hr/hr.py | 6 +++--- addons/hr/i18n/hr.pot | 11 ++++++++--- addons/hr_recruitment/hr_recruitment.py | 12 +++++++++++- addons/hr_recruitment/hr_recruitment_view.xml | 3 +++ addons/hr_recruitment/i18n/hr_recruitment.pot | 10 ++++++++++ 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index bd0c730d92d..726cf036051 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -93,18 +93,18 @@ class hr_job(osv.osv): _description = "Job Description" _columns = { 'name': fields.char('Job Name', size=128, required=True, select=True), - 'expected_employees': fields.function(_no_of_employee, string='Expected Employees', help='Required number of employees in total for that job.', + 'expected_employees': fields.function(_no_of_employee, string='Total Employees', help='Expected number of employees in total for this job position after new recruitment.', store = { 'hr.job': (lambda self,cr,uid,ids,c=None: ids, ['no_of_recruitment'], 10), 'hr.employee': (_get_job_position, ['job_id'], 10), }, multi='no_of_employee'), - 'no_of_employee': fields.function(_no_of_employee, string="Number of Employees", help='Number of employees with that job.', + 'no_of_employee': fields.function(_no_of_employee, string="Number of Employees", help='Number of employees currently having this job position.', store = { 'hr.employee': (_get_job_position, ['job_id'], 10), }, multi='no_of_employee'), - 'no_of_recruitment': fields.float('Expected in Recruitment'), + 'no_of_recruitment': fields.float('Expected in Recruitment', help='Number of new employees you expect to recruit.'), 'employee_ids': fields.one2many('hr.employee', 'job_id', 'Employees'), 'description': fields.text('Job Description'), 'requirements': fields.text('Requirements'), diff --git a/addons/hr/i18n/hr.pot b/addons/hr/i18n/hr.pot index c0f57787a35..15bc696e705 100644 --- a/addons/hr/i18n/hr.pot +++ b/addons/hr/i18n/hr.pot @@ -197,7 +197,7 @@ msgstr "" #. module: hr #: help:hr.job,expected_employees:0 -msgid "Required number of employees in total for that job." +msgid "Expected number of employees in total for this job position after new recruitment." msgstr "" #. module: hr @@ -290,7 +290,7 @@ msgstr "" #. module: hr #: field:hr.job,expected_employees:0 -msgid "Expected Employees" +msgid "Total Employees" msgstr "" #. module: hr @@ -702,5 +702,10 @@ msgstr "" #. module: hr #: field:hr.job,no_of_employee:0 -msgid "Number of Employees" +msgid "Number of employees currently having this job position." +msgstr "" + +#. module: hr +#: field:hr.job,no_of_recruitment:0 +msgid "Number of new employees you expect to recruit." msgstr "" diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 17a2d11fd0e..33bd063addf 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -537,6 +537,16 @@ class hr_job(osv.osv): _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"), } + + def action_print_survey(self, cr, uid, ids, context=None): + if context is None: + context = {} + for rec in self.browse(cr, uid, ids, context=context): + if rec.survey_id: + context.update({'survey_id': rec.survey_id.id, 'response_id': [0], 'response_no': 0,}) + value = self.pool.get("survey").action_print_survey(cr, uid, ids, context=context) + return value + hr_job() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 5d175bd16f5..ed0364adbd7 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -346,6 +346,9 @@ + +