[IMP]Added pager with 5 records, in apply form set alignment,editable description and requirements, lorem ipsum added in job position records for description and requirements field.

bzr revid: bth@tinyerp.com-20130919121003-su51cmrlwwjtrd9l
This commit is contained in:
bth-openerp 2013-09-19 17:40:03 +05:30
parent bea9ea9d24
commit beaf87c631
3 changed files with 31 additions and 7 deletions

View File

@ -31,35 +31,49 @@
<record id="job_ceo" model="hr.job">
<field name="name">Chief Executive Officer</field>
<field name="department_id" ref="dep_management"/>
<field name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
<field name="requirements">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
</record>
<record id="job_cto" model="hr.job">
<field name="name">Chief Technical Officer</field>
<field name="department_id" ref="dep_rd"/>
<field name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
<field name="requirements">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
</record>
<record id="job_consultant" model="hr.job">
<field name="name">Consultant</field>
<field name="department_id" ref="dep_ps"/>
<field name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
<field name="requirements">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
</record>
<record id="job_developer" model="hr.job">
<field name="name">Developer</field>
<field name="department_id" ref="dep_rd"/>
<field name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
<field name="requirements">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
</record>
<record id="job_hrm" model="hr.job">
<field name="name">Human Resources Manager</field>
<field name="department_id" ref="dep_administration"/>
<field name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
<field name="requirements">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
</record>
<record id="job_marketing" model="hr.job">
<field name="name">Marketing and Community Manager</field>
<field name="department_id" ref="dep_sales"/>
<field name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
<field name="requirements">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
</record>
<record id="job_trainee" model="hr.job">
<field name="name">Trainee</field>
<field name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
<field name="requirements">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</field>
</record>
<!-- Employee categories -->

View File

@ -10,8 +10,8 @@ from urllib import quote_plus
class website_hr_recruitment(http.Controller):
@website.route(['/jobs'], type='http', auth="public")
def jobs(self, **post):
@website.route(['/jobs', '/jobs/page/<int:page>/'], type='http', auth="public")
def jobs(self, page=1, **post):
website = request.registry['website']
hr_job_obj = request.registry['hr.job']
@ -28,11 +28,15 @@ class website_hr_recruitment(http.Controller):
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]}
step = 5
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 = {
'companies': companies,
'res_job': hr_job_obj.browse(request.cr, request.uid, jobpost_ids),
'vals': vals,
'no_of_jobs': len(hr_job_obj.browse(request.cr, request.uid, jobpost_ids)),
'pager': pager
}
return request.website.render("website_hr_recruitment.index", values)

View File

@ -11,7 +11,7 @@
<li><a href="/jobs">Jobs</a></li>
</xpath>
</template>
<template id="index" name="Jobs">
<t t-call="website.layout">
<t t-set="head">
@ -22,6 +22,9 @@
<div class="container">
<h1>Job Position</h1>
<t t-if="no_of_jobs &gt; 0">
<t t-call="website.pager">
<t t-set="classname">pull-left</t>
</t>
<t t-foreach="companies" t-as="company">
<h2 class="text-center"><t t-field="company.name"/></h2>
<table class="table">
@ -101,12 +104,15 @@
</ul>
</div>
<div class="container">
<h1><t t-field="job.name"/></h1>
<h1 t-field="job.name"></h1>
<div class="row">
<div class="span12">
<div class="col-md-12">
<t t-if="job.description">
<h3>Description</h3>
<p t-if="job.description"><t t-field="job.description"/></p>
<p t-field="job.description"></p>
</t>
<t t-if="job.requirements">
<h1>Requirements</h1>
<p t-field="job.requirements"></p>
</t>
</div>
</div>