diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 0f0f2785fc1..4bc358f4cda 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -466,6 +466,13 @@ class hr_job(osv.osv): 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True, help="Email alias for this job position. New emails will automatically " "create new applicants for this job position."), + 'address_id': fields.many2one('res.partner', 'Job Location', help="Address where employees are working"), + } + def _address_get(self, cr, uid, context=None): + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + return user.company_id.partner_id.id + _defaults = { + 'address_id': _address_get } def _auto_init(self, cr, context=None): diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 3bf09d21a17..7a9bb35fec3 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -306,7 +306,14 @@ hr.job - + + +