Bharat Devnani (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-844022-bde into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #844022 in OpenERP Addons: "[6.0.2]HR-Recruitment: History tab does not
show stages"
https://bugs.launchpad.net/openobject-addons/+bug/844022
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-844022-bde/+merge/75677
Hello Sir,
I have added the functionality for the stage in History & Communication tab of
hr.applicant object and removed _get_stage function as it was not used
anywhere.
Thanks & Regards,
Devnani Bharat R.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-844022-bde/+merge/75677
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-844022-bde.
=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py 2011-09-07 18:33:28 +0000
+++ hr_recruitment/hr_recruitment.py 2011-09-16 07:14:29 +0000
@@ -179,10 +179,6 @@
multi='day_close', type="float", store=True),
}
- def _get_stage(self, cr, uid, context=None):
- ids = self.pool.get('hr.recruitment.stage').search(cr, uid, [], context=context)
- return ids and ids[0] or False
-
_defaults = {
'active': lambda *a: 1,
'user_id': lambda self, cr, uid, context: uid,
@@ -441,6 +437,12 @@
self.write(cr, uid, ids, {'date_open': False, 'date_closed': False})
return res
+ def write(self, cr, uid, ids, vals, context=None):
+ if 'stage_id' in vals and vals['stage_id']:
+ stage_obj = self.pool.get('hr.recruitment.stage').browse(cr, uid, vals['stage_id'], context=context)
+ text = _("Changed Stage to: %s") % stage_obj.name
+ self.message_append(cr, uid, ids, text, body_text=text, context=context)
+ return super(hr_applicant,self).write(cr, uid, ids, vals, context=context)
hr_applicant()
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp