[IMP]hr_recruitment: improve job position form view
bzr revid: pna@tinyerp.com-20120517095816-w1zphtkph49hnshg
This commit is contained in:
parent
742124c840
commit
a81d8c34af
|
@ -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'),
|
||||
|
|
|
@ -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 ""
|
||||
|
|
|
@ -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:
|
|
@ -346,6 +346,9 @@
|
|||
<field name="department_id" position="after">
|
||||
<field name="survey_id"/>
|
||||
</field>
|
||||
<field name="expected_employees" position="after">
|
||||
<button name="action_print_survey" string="Interview" type="object" icon="gtk-print" attrs="{'invisible':[('survey_id','=',False)]}" colspan="2"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -239,6 +239,16 @@ msgstr ""
|
|||
msgid "Interview Form"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_recruitment
|
||||
#: view:hr.job:0
|
||||
msgid "Interview"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_recruitment
|
||||
#: constraint:hr.job:0
|
||||
msgid "Warning! You must select Interview Form"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_recruitment
|
||||
#: help:hr.job,survey_id:0
|
||||
msgid ""
|
||||
|
|
Loading…
Reference in New Issue