[IMP] hr_recruitment:Add defaults for stage and responsible (uid) and called right view on schedule a phone call button's action
bzr revid: psi@tinyerp.co.in-20100518133516-2s1r5dzl83ajpjj2
This commit is contained in:
@@ -90,9 +90,9 @@ class hr_applicant(osv.osv, crm.crm_case):
|
||||
'date': fields.datetime('Date'),
|
||||
'priority': fields.selection(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)'),
|
||||
'salary_proposed': fields.float('Proposed Salary', help="Salary Proposed by the Organisation"),
|
||||
'salary_expected': fields.float('Expected Salary', help="Salary Expected by Applicant"),
|
||||
'availability': fields.integer('Availability (Days)', help=""),
|
||||
'partner_name': fields.char("Applicant's Name", size=64),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
@@ -105,6 +105,17 @@ class hr_applicant(osv.osv, crm.crm_case):
|
||||
'response' : fields.integer("Response"),
|
||||
}
|
||||
|
||||
def _get_stage(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
ids = self.pool.get('hr.recruitment.stage').search(cr, uid, [], context=context)
|
||||
return ids and ids[0] or False
|
||||
|
||||
_defaults = {
|
||||
'stage_id': _get_stage,
|
||||
'user_id': lambda self, cr, uid, context: uid,
|
||||
}
|
||||
|
||||
def onchange_job(self,cr, uid, ids, job, context={}):
|
||||
result = {}
|
||||
if job:
|
||||
|
||||
@@ -70,9 +70,9 @@
|
||||
<form string="Jobs - Recruitment Form">
|
||||
<group colspan="4" col="8">
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="partner_name" required = "True"/>
|
||||
<field name="job_id" on_change="onchange_job(job_id)"/>
|
||||
<button string="Schedule a Phone Call" name="223" icon="gtk-redo" type="action"/>
|
||||
<button string="Schedule a Phone Call" name="%(action_hr_recruitment_phonecall)d" icon="gtk-redo" type="action"/>
|
||||
<button name="action_makeMeeting" type="object" string="Schedule Meeting" icon="terp-hr"/>
|
||||
<newline/>
|
||||
<group colspan="2" col="4">
|
||||
|
||||
Reference in New Issue
Block a user