Rohan Nayani(openerp) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-722673-ron into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
#722673 [6.0.1] HR-Recruitment: bug applicant becoming employee: wrong data
https://bugs.launchpad.net/bugs/722673
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-722673-ron/+merge/50884
https://bugs.launchpad.net/openobject-addons/+bug/722673
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-722673-ron/+merge/50884
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-722673-ron.
=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py 2011-01-17 11:20:56 +0000
+++ hr_recruitment/hr_recruitment.py 2011-02-23 08:54:15 +0000
@@ -412,9 +412,15 @@
message = _("Applicant '%s' is being hired.") % name
self.log(cr, uid, id, message)
+ address = False
applicant = self.browse(cr, uid, ids)[0]
if applicant.job_id:
- emp_id = employee_obj.create(cr,uid,{'name': applicant.name,'job_id': applicant.job_id.id})
+ if applicant.partner_id:
+ address = applicant.partner_id.address[0].id
+ emp_id = employee_obj.create(cr,uid,{'name': applicant.partner_id.name or applicant.name,
+ 'job_id': applicant.job_id.id,
+ 'address_home_id':address
+ })
return res
def case_reset(self, cr, uid, ids, *args):
_______________________________________________
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