[MERGE] lp:727900
bzr revid: qdp-launchpad@openerp.com-20110310132215-vvrm02jam6d3x850
This commit is contained in:
@@ -185,6 +185,14 @@ class hr_applicant(crm.crm_case, osv.osv):
|
||||
return {'value': result}
|
||||
return {'value': {'department_id': False}}
|
||||
|
||||
def onchange_department_id(self, cr, uid, ids, department_id=False, context=None):
|
||||
if not department_id:
|
||||
return {'value': {'stage_id': False}}
|
||||
obj_recru_stage = self.pool.get('hr.recruitment.stage')
|
||||
stage_ids = obj_recru_stage.search(cr, uid, ['|',('department_id','=',department_id),('department_id','=',False)], context=context)
|
||||
stage_id = stage_ids and stage_ids[0] or False
|
||||
return {'value': {'stage_id': stage_id}}
|
||||
|
||||
def stage_previous(self, cr, uid, ids, context=None):
|
||||
"""This function computes previous stage for case from its current stage
|
||||
using available stage for that case type
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<button string="Phone Call" name="%(action_hr_recruitment_phonecall)d" icon="terp-call-start" type="action" groups="base.group_extended"/>
|
||||
<button name="action_makeMeeting" type="object" string="Meeting" icon="gtk-index"/>
|
||||
<newline/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="department_id" widget="selection" on_change="onchange_department_id(department_id)"/>
|
||||
<group colspan="2" col="4">
|
||||
<field name="stage_id" domain="[('department_id','=',department_id)]"/>
|
||||
<button name="stage_previous" string="" type="object" icon="gtk-go-back"/>
|
||||
|
||||
Reference in New Issue
Block a user