[IMP]Added publish/unpublish.
bzr revid: bth@tinyerp.com-20130816131956-ym53s9iiock78k05
This commit is contained in:
parent
07d4f97085
commit
ea530d4822
|
@ -13,8 +13,12 @@ class website_hr_recruitment(http.Controller):
|
|||
hr_job_obj = request.registry['hr.job']
|
||||
group_obj = request.registry['mail.group']
|
||||
user_obj = request.registry['res.users']
|
||||
|
||||
domain = [(1, '=', 1)] or [('website_published', '=', True)]
|
||||
search = [("state", 'in', ['recruit', 'open'])]
|
||||
domain += search
|
||||
|
||||
jobpost_ids = hr_job_obj.search(request.cr, request.uid, [("state", 'in', ['recruit', 'open'])])
|
||||
jobpost_ids = hr_job_obj.search(request.cr, request.uid, domain)
|
||||
request.cr.execute("select distinct(com.id) from hr_job job, res_company com where com.id=job.company_id")
|
||||
ids = []
|
||||
for i in request.cr.fetchall():
|
||||
|
|
|
@ -7,4 +7,5 @@ class hr_job(osv.osv):
|
|||
_inherit = "hr.job"
|
||||
_columns = {
|
||||
'write_date': fields.datetime('Update Date', readonly=True),
|
||||
'website_published': fields.boolean('Available in the website'),
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<!-- <t t-call="website.publish"><t t-set="object" t-value="job_id"/></t> -->
|
||||
<t t-call="website.publish"><t t-set="object" t-value="job_id"/></t>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
|
|
Loading…
Reference in New Issue