openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #03715
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-727900-ara into lp:openobject-addons
Ashvin Rathod (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-727900-ara into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
#727900 can not change stage in hr recruitment
https://bugs.launchpad.net/bugs/727900
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-727900-ara/+merge/52170
Hello,
Fix the bug: can not change stage in hr recruitment
https://bugs.launchpad.net/openobject-addons/+bug/727900
Thanks,
ara
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-727900-ara/+merge/52170
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-727900-ara.
=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py 2011-02-17 05:18:59 +0000
+++ hr_recruitment/hr_recruitment.py 2011-03-04 06:51:20 +0000
@@ -185,6 +185,14 @@
return {'value': result}
return {'value': {'department_id': False}}
+ def onchange_department_id(self,cr, uid, ids, department_id=False, context=None):
+ obj_recu_stage = self.pool.get('hr.recruitment.stage')
+ if department_id:
+ stage_ids = obj_recu_stage.search(cr, uid, ['|',('department_id','=',department_id),('department_id','=',False)], context=context)
+ if stage_ids:
+ return {'value': {'stage_id': stage_ids[0]}}
+ return {'value': {'stage_id': False}}
+
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
=== modified file 'hr_recruitment/hr_recruitment_view.xml'
--- hr_recruitment/hr_recruitment_view.xml 2011-01-14 00:11:01 +0000
+++ hr_recruitment/hr_recruitment_view.xml 2011-03-04 06:51:20 +0000
@@ -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"/>
Follow ups