[MERGE] Merge parents

bzr revid: rim@openerp.com-20131112074857-5wm8a1xupyokeka0
This commit is contained in:
Richard Mathot (OpenERP) 2013-11-12 08:48:57 +01:00
commit 29903b2dac
11 changed files with 263 additions and 147 deletions

View File

@ -97,22 +97,18 @@ class hr_job(osv.osv):
_inherit = ['mail.thread']
_columns = {
'name': fields.char('Job Name', size=128, required=True, select=True),
# TO CLEAN: when doing a cleaning, we should change like this:
# no_of_recruitment: a function field
# expected_employees: float
# This would allow a clean update when creating new employees.
'expected_employees': fields.function(_no_of_employee, string='Total Forecasted Employees',
help='Expected number of employees for this job position after new recruitment.',
store = {
'hr.job': (lambda self,cr,uid,ids,c=None: ids, ['no_of_recruitment'], 10),
'hr.employee': (_get_job_position, ['job_id'], 10),
},
}, type='integer',
multi='no_of_employee'),
'no_of_employee': fields.function(_no_of_employee, string="Current Number of Employees",
help='Number of employees currently occupying this job position.',
store = {
'hr.employee': (_get_job_position, ['job_id'], 10),
},
}, type='integer',
multi='no_of_employee'),
'no_of_recruitment': fields.float('Expected in Recruitment', help='Number of new employees you expect to recruit.'),
'employee_ids': fields.one2many('hr.employee', 'job_id', 'Employees', groups='base.group_user'),

View File

@ -31,7 +31,7 @@
<record id="job_ceo" model="hr.job">
<field name="name">Chief Executive Officer</field>
<field name="department_id" ref="dep_management"/>
<field name="description"><![CDATA[<div class="oe_structure">Demonstration of different openerp services for each client and convincing the client about functionality of the application.
<field name="description">Demonstration of different openerp services for each client and convincing the client about functionality of the application.
The candidate should have excellent communication skills.
Relationship building and influencing skills
Expertise in New Client Acquisition (NCAs) and Relationship Management.
@ -39,15 +39,15 @@ Gathering market and customer information.
Coordinating with the sales and support team for adopting different strategies
Reviewing progress and identifying opportunities and new areas for development.
Building strong relationships with clients / customers for business growth profitability.
Keep regular interaction with key clients for better extraction and expansion. </div>]]></field>
<field name="requirements"><![CDATA[<div class="oe_structure">MBA in Marketing is must.
Keep regular interaction with key clients for better extraction and expansion.</field>
<field name="requirements">MBA in Marketing is must.
Good Communication skills.
Only Fresher's can apply.
Candidate should be ready to work in young and dynamic environment..
Candidate should be able to work in “start- up” fast paced environment,hands on attitude.
Honest,approachable and fun team player.
Result driven.
Excellent analytical skills, ability to think logically and "out of the box" </div>]]></field>
Excellent analytical skills, ability to think logically and "out of the box"</field>
</record>
<record id="job_cto" model="hr.job">

View File

@ -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):

View File

@ -306,7 +306,14 @@
<field name="model">hr.job</field>
<field name="inherit_id" ref="hr.view_hr_job_form"/>
<field name="arch" type="xml">
<field name="expected_employees" version="7.0" position="after">
<group name="job_data" position="inside">
<label for="address_id"/>
<div>
<field name="address_id"/>
<span class="oe_grey">(empty = remote work)</span>
</div>
</group>
<field name="expected_employees" position="after">
<label for="survey_id" groups="base.group_user"/>
<div groups="base.group_user">
<field name="survey_id" class="oe_inline" domain="[('type','=','Human Resources')]"/>

View File

@ -36,8 +36,6 @@ import urllib
class website_event(http.Controller):
_order = 'website_published desc, date_begin desc'
@website.route(['/event/', '/event/page/<int:page>/'], type='http', auth="public", multilang=True)
def events(self, page=1, **searches):
cr, uid, context = request.cr, request.uid, request.context
@ -51,30 +49,35 @@ class website_event(http.Controller):
domain_search = {}
def sdn(date):
return date.strftime('%Y-%m-%d 23:59:59')
def sd(date):
return date.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)
today = datetime.today()
dates = [
['all', _('All Dates'), [(1, "=", 1)], 0],
['all', _('Next Events'), [("date_end", ">", sd(today))], 0],
['today', _('Today'), [
("date_begin", ">", sd(today)),
("date_begin", "<", sd(today + relativedelta(days=1)))],
0],
['tomorrow', _('Tomorrow'), [
("date_begin", ">", sd(today + relativedelta(days=1))),
("date_begin", "<", sd(today + relativedelta(days=2)))],
("date_end", ">", sd(today)),
("date_begin", "<", sdn(today))],
0],
['week', _('This Week'), [
("date_begin", ">=", sd(today + relativedelta(days=-today.weekday()))),
("date_begin", "<", sd(today + relativedelta(days=6-today.weekday())))],
("date_end", ">=", sd(today + relativedelta(days=-today.weekday()))),
("date_begin", "<", sdn(today + relativedelta(days=6-today.weekday())))],
0],
['nextweek', _('Next Week'), [
("date_begin", ">=", sd(today + relativedelta(days=7-today.weekday()))),
("date_begin", "<", sd(today + relativedelta(days=13-today.weekday())))],
("date_end", ">=", sd(today + relativedelta(days=7-today.weekday()))),
("date_begin", "<", sdn(today + relativedelta(days=13-today.weekday())))],
0],
['month', _('This month'), [
("date_begin", ">=", sd(today.replace(day=1) + relativedelta(months=1))),
("date_begin", "<", sd(today.replace(day=1) + relativedelta(months=1)))],
("date_end", ">=", sd(today.replace(day=1))),
("date_begin", "<", (today.replace(day=1) + relativedelta(months=1)).strftime('%Y-%m-%d 00:00:00'))],
0],
['nextmonth', _('Next month'), [
("date_end", ">=", sd(today.replace(day=1) + relativedelta(months=1))),
("date_begin", "<", (today.replace(day=1) + relativedelta(months=2)).strftime('%Y-%m-%d 00:00:00'))],
0],
['old', _('Old Events'), [
("date_end", "<", today.strftime('%Y-%m-%d 00:00:00'))],
0],
]
@ -95,7 +98,7 @@ class website_event(http.Controller):
domain_search["country"] = [("country_id", "=", int(searches["country"]))]
def dom_without(without):
domain = SUPERUSER_ID != request.uid and [('website_published', '=', True)] or [(1, "=", 1)]
domain = [('state', "in", ['draft','confirm','done'])]
for key, search in domain_search.items():
if key != without:
domain += search
@ -103,9 +106,10 @@ class website_event(http.Controller):
# count by domains without self search
for date in dates:
date[3] = event_obj.search(
request.cr, request.uid, dom_without('date') + date[2],
count=True, context=request.context)
if date[0] <> 'old':
date[3] = event_obj.search(
request.cr, request.uid, dom_without('date') + date[2],
count=True, context=request.context)
domain = dom_without('type')
types = event_obj.read_group(
@ -134,9 +138,13 @@ class website_event(http.Controller):
request.cr, request.uid, dom_without("none"), count=True,
context=request.context)
pager = request.website.pager(url="/event/", total=event_count, page=page, step=step, scope=5)
order = 'website_published desc, date_begin'
if searches.get('date','all') == 'old':
order = 'website_published desc, date_begin desc'
obj_ids = event_obj.search(
request.cr, request.uid, dom_without("none"), limit=step,
offset=pager['offset'], order=self._order, context=request.context)
offset=pager['offset'], order=order, context=request.context)
events_ids = event_obj.browse(request.cr, request.uid, obj_ids,
context=request.context)

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -24,11 +24,11 @@
<t t-esc="current_country.name"/>
</span>
</h3>
<div class="row mt16 mb32">
<div class="row mt32 mb32">
<div class="col-md-3 col-sm-4 css_noprint" id="left_column">
<ul class="nav nav-pills nav-stacked">
<t t-foreach="dates" t-as="date">
<li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3]">
<li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3] or (date[0] in ('old','all'))">
<a t-href="/event/#{ search_path }&amp;date=#{ date[0] }"><t t-esc="date[1]"/>
<span t-if="date[3]" class="badge pull-right"><t t-esc="date[3]"/></span>
</a>
@ -42,6 +42,14 @@
</t>
<div class="oe_structure">
</div>
<t t-if="not event_ids">
<p t-if="current_date or current_country or current_type">
No event found in this category, check <a href="/event">all events</a>.
</p>
<p t-if="(current_date is None) and (current_country is None) and (current_type is None)">
No events are planned for now on.
</p>
</t>
<ul class="media-list">
<li t-foreach="event_ids" t-as="event" class="media" data-publish="">
<div class="media-body">
@ -89,14 +97,14 @@
<div class="row">
<div class="col-md-12 mb16">
<div class="oe_demo">
<img src="http://ebmedia.eventbrite.com/s3-build/17022-rc2013-11-04-acfb89e/django/images/pages/home/featcats_bizpro.jpg"/>
<div class="text-center"><a href="/">Photos of Events</a></div>
<img src="/website_event/static/src/img/openerp_enterprise_of_the_year.png" class="img-rounded"/>
<div class="text-center"><a href="/event">Photos of Past Events</a></div>
</div>
</div>
<div class="col-md-12 mb16">
<div class="oe_demo">
<img src="http://ebmedia.eventbrite.com/s3-build/17022-rc2013-11-04-acfb89e/django/images/pages/home/featcats_bizpro.jpg"/>
<div class="text-center"><a href="/">Customer Quotes</a></div>
<img src="/website_event/static/src/img/training.jpg" class="img-rounded"/>
<div class="text-center"><a href="/event">Our Trainings</a></div>
</div>
</div>
</div>

View File

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from openerp.addons.web import http
from openerp.tools.translate import _
from openerp.addons.web.http import request
from openerp.addons.website.models import website
from openerp.addons.website.controllers.main import Website as controllers
@ -9,46 +10,38 @@ import base64
class website_hr_recruitment(http.Controller):
@website.route(['/jobs', '/jobs/page/<int:page>/', '/department/<id>/', '/department/<id>/page/<int:page>/'], type='http', auth="public", multilang=True)
def jobs(self, id=0, page=1):
id = id and int(id) or 0
@website.route(['/jobs', '/jobs/department/<model("hr.department"):department>/office/<model("res.partner"):office>', '/jobs/department/<model("hr.department"):department>', '/jobs/office/<model("res.partner"):office>'], type='http', auth="public", multilang=True)
def jobs(self, department=None, office=None, page=0):
hr_job_obj = request.registry['hr.job']
hr_department_obj = request.registry['hr.department']
domain = []
jobpost_ids = hr_job_obj.search(request.cr, request.uid, domain, order="website_published,no_of_recruitment", context=request.context)
jobs = hr_job_obj.browse(request.cr, request.uid, jobpost_ids, request.context)
domain = [("state", 'in', ['recruit', 'open'])]
if id != 0:
domain += [('department_id','=', id)]
jobpost_ids = hr_job_obj.search(request.cr, request.uid, domain)
request.cr.execute("SELECT DISTINCT(hr_job.company_id) FROM hr_job WHERE hr_job.company_id IS NOT NULL")
ids = []
for i in request.cr.fetchall():
ids.append(i[0])
companies = request.registry['res.company'].browse(request.cr, request.uid, ids)
departments = set()
for job in jobs:
if job.department_id:
departments.add(job.department_id)
vals = {}
for rec in hr_job_obj.browse(request.cr, request.uid, jobpost_ids):
vals[rec.id] = {'count': int(rec.no_of_recruitment), 'date_recruitment': rec.write_date.split(' ')[0]}
offices = set()
for job in jobs:
if job.address_id:
offices.add(job.address_id)
department_ids = []
request.cr.execute("SELECT * FROM hr_department")
for i in request.cr.fetchall():
department_ids.append(i[0])
active = id
if department or office:
if office:
domain += [('address_id','=', office.id)]
if department:
domain += [('department_id','=', department.id)]
jobpost_ids = hr_job_obj.search(request.cr, request.uid, domain, order="website_published,no_of_recruitment", context=request.context)
jobs = hr_job_obj.browse(request.cr, request.uid, jobpost_ids, request.context)
step = 10
pager = request.website.pager(url="/jobs/", total=len(jobpost_ids), page=page, step=step, scope=5)
jobpost_ids = hr_job_obj.search(request.cr, request.uid, domain, limit=step, offset=pager['offset'])
values = {
'active': active,
'companies': companies,
'res_job': hr_job_obj.browse(request.cr, request.uid, jobpost_ids),
'departments': hr_department_obj.browse(request.cr, request.uid, department_ids),
'vals': vals,
'pager': pager
}
return request.website.render("website_hr_recruitment.index", values)
return request.website.render("website_hr_recruitment.index", {
'jobs': jobs,
'departments': departments,
'offices': offices,
'active': department and department.id or None,
'office': office and office.id or None
})
@website.route(['/job/detail/<model("hr.job"):job>'], type='http', auth="public", multilang=True)
def detail(self, job):
@ -60,7 +53,25 @@ class website_hr_recruitment(http.Controller):
@website.route(['/job/success'], type='http', auth="admin", multilang=True)
def success(self, **post):
id = request.registry['hr.applicant'].create(request.cr, request.uid, post)
data = {
'name': _('Online Form'),
'phone': post.get('phone', False),
'email_from': post.get('email_from', False),
'partner_name': post.get('partner_name', False),
'description': post.get('description', False),
'department_id': post.get('department_id', False),
'job_id': post.get('job_id', False),
'user_id': False
}
imd = request.registry['ir.model.data']
try:
model, source_id = imd.get_object_reference(request.cr, request.uid, 'hr_recruitment', 'source_website_company')
data['source_id'] = source_id
except ValueError, e:
pass
jobid = request.registry['hr.applicant'].create(request.cr, request.uid, data, context=request.context)
if post['ufile']:
attachment_values = {
'name': post['ufile'].filename,
@ -68,16 +79,13 @@ class website_hr_recruitment(http.Controller):
'datas_fname': post['ufile'].filename,
'res_model': 'hr.applicant',
'res_name': post['name'],
'res_id': id
'res_id': jobid
}
request.registry['ir.attachment'].create(request.cr, request.uid, attachment_values)
values = {
'jobid': post['job_id']
}
return request.website.render("website_hr_recruitment.thankyou", values)
request.registry['ir.attachment'].create(request.cr, request.uid, attachment_values, context=request.context)
return request.website.render("website_hr_recruitment.thankyou", {})
@website.route(['/apply/<model("hr.job"):job>'], type='http', auth="public", multilang=True)
def applyjobpost(self, job):
@website.route(['/job/apply', '/job/apply/<model("hr.job"):job>'], type='http', auth="public", multilang=True)
def applyjobpost(self, job=None):
return request.website.render("website_hr_recruitment.applyjobpost", { 'job': job })
@website.route('/job/publish', type='json', auth="admin", multilang=True)
@ -97,4 +105,3 @@ class website_hr_recruitment(http.Controller):
hr_job.write(request.cr, request.uid, [rec.id], vals, context=request.context)
return res
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -6,7 +6,6 @@ from openerp.osv import osv, fields
class hr_job(osv.osv):
""" Override to add website-related columns: published, description. """
_inherit = "hr.job"
_columns = {
'website_published': fields.boolean('Available in the website'),
'website_description': fields.html('Description for the website'),

View File

@ -16,29 +16,60 @@
<template id="index" name="Jobs">
<t t-call="website.layout">
<div id="wrap">
<div class="oe_structure"/>
<div class="container oe_website_jobs">
<div class="row">
<div class="col-sm-4">
<t t-call="website.pager">
<t t-set="classname">pull-left</t>
</t>
<div class="oe_structure">
<section data-snippet-id="text-block" class="mb32">
<div class="container">
<div class="row">
<div class="col-md-12 text-center mb16" data-snippet-id="colmd">
<h2>Our Job Offers</h2>
<h3 class="text-muted">Join us and help disrupt the enterprise market!</h3>
</div>
<div class="col-md-12" data-snippet-id="colmd">
<p>
With a small team of smart people, we released the most
disruptive enterprise management software in the world.
OpenERP is fully open source, super easy, full featured
(3000+ apps) and its online offer is 3 times cheaper than
traditional competitors like SAP and Ms Dynamics.
</p>
<p>
Join us, we offer you an extraordinary chance to learn, to
develop and to be part of an exciting experience and
team.
</p>
</div>
</div>
</div>
<div class='row style_default mt16'>
<div class="col-md-12" id="jobs_grid">
</section>
</div>
<div class="container oe_website_jobs">
<div class="row">
<div class="col-md-1" id="jobs_grid_left">
</div>
<div class="col-md-9" id="jobs_grid">
<ul class="media-list">
<li t-foreach="res_job" t-as="job" class="media">
<li t-foreach="jobs" t-as="job" class="media">
<div class="media-body" t-att-data-publish="job.website_published and 'on' or 'off'">
<t t-if="job.no_of_recruitment">
<span class="label label-default pull-right label-info"><t t-esc="vals[job.id]['count']"/> Vacancies.</span>
</t>
<h4 class="media-heading"><a t-href="/job/detail/#{ job.id }/"><span t-field="job.name"> </span></a></h4>
<div t-if="companies[0].country_id">
<i class="icon-map-marker"/> <span t-field="companies[0].city"> </span> <span t-if="companies[0].state_id" t-field="companies[0].state_id.name"> </span>, <span t-field="companies[0].country_id.name"> </span>
<h3 class="media-heading">
<a t-href="/job/detail/#{ job.id }/">
<span t-field="job.name"/>
</a>
<small t-if="job.no_of_recruitment &gt; 1">
<t t-esc="job.no_of_recruitment"/> open positions
</small>
</h3>
<div t-if="job.address_id">
<i class="icon-map-marker"/>
<span t-field="job.address_id.city"/>
<span t-if="job.address_id.state_id" t-field="job.address_id.state_id"/>
, <span t-field="job.address_id.country_id.name"/>
</div>
<div class="text-muted">
<i class="icon-time"/> <span><t t-esc="vals[job.id]['date_recruitment']"/></span>
<i class="icon-time"/> <span t-field="job.write_date"/>
</div>
</div>
</li>
@ -46,7 +77,18 @@
</div>
</div>
</div>
<div class="oe_structure"/>
<div class="oe_structure">
<section data-snippet-id="cta" class="darken">
<div class="container">
<div class="row">
<div class="col-md-12 text-center mt16 mb16">
<a t-href="/job/apply" class="btn btn-primary btn-lg">Apply</a>
</div>
</div>
</div>
</section>
</div>
</div>
</t>
</template>
@ -55,25 +97,29 @@
<t t-call="website.layout">
<t t-set="additional_title">Job Detail</t>
<div id="wrap">
<div class="container oe_website_hr_recruitment">
<section class="container mt8">
<div class="row">
<div class="col-md-3">
<t t-call="website_mail.follow">
<t t-set="email" t-value="user_id.email"/>
<t t-set="object" t-value="job"/>
</t>
</div>
<t t-call="website.publish_management">
<t t-set="object" t-value="job"/>
<t t-set="publish_edit" t-value="True"/>
<t t-set="publish_controller">/job/publish</t>
</t>
<div class="col-sm-5">
<ol class="breadcrumb mb0">
<li><a t-href="/jobs">Our Jobs</a></li>
<li class="active"><span t-field="job.name"></span></li>
</ol>
</div><div class="col-sm-7">
<t t-call="website.publish_management">
<t t-set="object" t-value="job"/>
<t t-set="publish_edit" t-value="True"/>
<t t-set="publish_controller">/job/publish</t>
</t>
</div>
</div>
</div>
</section>
<div class="oe_structure" style="clear:both;">
<h1 class="text-center" t-field="job.name"/>
<h5 class="text-center">
<i class="icon-map-marker"/> <span t-field="job.company_id.city"> </span> <span t-if="job.company_id.state_id" t-field="job.company_id.state_id.name"> </span>, <span t-field="job.company_id.country_id.name"> </span></h5>
<i class="icon-map-marker"/> <span t-field="job.address_id.city"/> <span t-if="job.address_id.state_id" t-field="job.address_id.state_id.name"/>, <span t-field="job.address_id.country_id.name"/>
</h5>
<h5 class="text-center text-muted">
<i class="icon-time"/> <span><t t-esc="vals_date"/></span>
</h5>
@ -86,7 +132,7 @@
<div class="container">
<div class="row">
<div class="col-md-12 text-center mt16 mb16">
<a t-href="/apply/#{ job.id }/" class="btn btn-primary btn-lg">Apply</a>
<a t-href="/job/apply/#{ job.id }/" class="btn btn-primary btn-lg">Apply</a>
</div>
</div>
</div>
@ -103,28 +149,39 @@
<t t-set="additional_title">Apply Job</t>
<div id="wrap">
<div class="container">
<h1 class="text-center">Apply for <span t-field="job.name"/></h1>
<h1 class="text-center">
Job Application Form
</h1>
<h2 t-if="job" class="text-center text-muted">
<span t-field="job.name"/>
</h2>
<div class="row">
<section id="forms">
<!-- TODO Multilingual form action support ? -->
<form class="form-horizontal mt32" action="/job/success" method="post" enctype="multipart/form-data">
<input type="hidden" t-att-value="job.department_id.id" name="department_id"/>
<input type="hidden" t-att-value="job.id" name="job_id"/>
<input type="hidden" t-att-value="job.name" name="name"/>
<input type="hidden" t-att-value="job and job.department_id.id or False" name="department_id"/>
<input type="hidden" t-att-value="job and job.id or False" name="job_id"/>
<div class="form-group">
<label class="col-md-3 col-sm-4 control-label" for="partner_name">Name</label>
<label class="col-md-3 col-sm-4 control-label" for="partner_name">Your Name</label>
<div class="col-md-7 col-sm-8">
<input type="text" class="form-control" name="partner_name" required="True" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-sm-4 control-label" for="email_from">Email</label>
<label class="col-md-3 col-sm-4 control-label" for="email_from">Your Email</label>
<div class="col-md-7 col-sm-8">
<input type="email" class="form-control" name="email_from" required="True" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-sm-4 control-label" for="description">Cover Note</label>
<label class="col-md-3 col-sm-4 control-label" for="phone">Your Phone</label>
<div class="col-md-7 col-sm-8">
<input type="text" class="form-control" name="phone" required="True" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-sm-4 control-label" for="description">Short Introduction</label>
<div class="col-md-7 col-sm-8">
<textarea class="form-control" name="description" style="min-height: 120px"/>
</div>
@ -147,41 +204,68 @@
</div>
</t>
</template>
<template id="thankyou">
<t t-call="website.layout">
<div id="wrap">
<div class="container">
<h1>Thank you!</h1>
<p>
We have received your application for the position,
we will contact you soon for the next part of the
recruitment process.
</p>
<div class="oe_structure">
<div class="container">
<h1>Thank you!</h1>
<p>
Your job application has been successfully registered,
we will get back to you soon.
</p>
</div>
<section data-snippet-id="cta" class="darken">
<div class="container">
<div class="row">
<div class="col-md-12 text-center mt16 mb16">
<a t-href="/" class="btn btn-primary btn-lg">Continue To Our Website</a>
</div>
</div>
</div>
</section>
</div>
</div>
</t>
</template>
<template id="job_departments" inherit_option_id="website_hr_recruitment.index" name="Job Departments">
<xpath expr="//div[@id='jobs_grid']" position="before">
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked mt16">
<template id="job_departments" inherit_option_id="website_hr_recruitment.index" name="Filter on Departments">
<xpath expr="//div[@id='jobs_grid_left']" position="inside">
<ul class="nav nav-pills nav-stacked mb32">
<li t-att-class=" '' if active else 'active' "><a t-href="/jobs">All Departments</a></li>
<t t-foreach="departments" t-as="department">
<li t-att-class="department.id == active and 'active' or ''">
<a t-href="/department/#{ department.id }/" ><span t-field="department.name"/></a>
<a t-href="/jobs/department/#{ department.id }/" ><span t-field="department.name"/></a>
</li>
</t>
</ul>
</div>
</xpath>
<xpath expr="//div[@id='jobs_grid']" position="attributes">
<attribute name="class">col-md-9</attribute>
</xpath>
<xpath expr="//div[@class='row']/div" position="before">
<div class="col-md-4">
<h1>Departments</h1>
</div>
</xpath>
</template>
</data>
</xpath>
<xpath expr="//div[@id='jobs_grid_left']" position="attributes">
<attribute name="class">col-md-3</attribute>
</xpath>
</template>
<template id="job_offices" inherit_option_id="website_hr_recruitment.index" name="Filter on Offices">
<xpath expr="//div[@id='jobs_grid_left']" position="inside">
<ul class="nav nav-pills nav-stacked mb32">
<li t-att-class=" '' if office else 'active' "><a t-href="/jobs">All Offices</a></li>
<t t-foreach="offices" t-as="thisoffice">
<li t-att-class="thisoffice.id == office and 'active' or ''">
<a t-href="/jobs/office/#{ thisoffice.id }/" >
<span t-field="thisoffice.city"/><t t-if="thisoffice.country_id">,
<span t-field="thisoffice.country_id.name"/>
</t>
</a>
</li>
</t>
</ul>
</xpath>
<xpath expr="//div[@id='jobs_grid_left']" position="attributes">
<attribute name="class">col-md-3</attribute>
</xpath>
</template>
</data>
</openerp>