[FIX] website_hr_recruitment: unpublish jobs when stopping recruitment

bzr revid: chs@openerp.com-20140123140348-e8j58tcnlsr24x9l
This commit is contained in:
Christophe Simonis 2014-01-23 15:03:48 +01:00
parent af3428a86f
commit e965277a2c
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ class hr_job(osv.osv):
res[job.id] = "%s/job/detail/%s/" % (base_url, job.id)
return res
def job_open(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'website_published': False}, context=context)
return super(hr_job, self).job_open(cr, uid, ids, context)
_columns = {
'website_published': fields.boolean('Available in the website'),
'website_description': fields.html('Description for the website'),