[IMP] remove message posted on job when create applicant,add link for applicants on job form,improved view and typo.

bzr revid: tpa@tinyerp.com-20130606105411-28rc8wdi1uz9q335
This commit is contained in:
Turkesh Patel (Open ERP) 2013-06-06 16:24:11 +05:30
parent 254cf3cdfc
commit 1ef52b7fd4
6 changed files with 26 additions and 25 deletions

View File

@ -91,7 +91,7 @@ class hr_job(osv.osv):
return res
_name = "hr.job"
_description = "Job Description"
_description = "Job Position"
_inherit = ['mail.thread','ir.needaction_mixin']
_columns = {
'name': fields.char('Job Name', size=128, required=True, select=True),
@ -112,8 +112,8 @@ class hr_job(osv.osv):
'hr.employee': (_get_job_position, ['job_id'], 10),
},
multi='no_of_employee'),
'no_of_recruitment': fields.float('Expected New Employee', help='Number of new employees you expect to recruit.'),
'no_of_hired_employee':fields.float('Hired Employee', help='Number of hired employees during this recruitment phase.'),
'no_of_recruitment': fields.float('Expected New Employees', help='Number of new employees you expect to recruit.'),
'no_of_hired_employee':fields.float('Hired Employees', help='Number of hired employees for this job position during recruitment phase.'),
'employee_ids': fields.one2many('hr.employee', 'job_id', 'Employees', groups='base.group_user'),
'description': fields.text('Job Description'),
'requirements': fields.text('Requirements'),

View File

@ -332,6 +332,8 @@
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" class="oe_inline"/></h1>
<label for="department_id" class="oe_edit_only"/>
<h2><field name="department_id" class="oe_inline"/></h2>
</div>
<group>
<group>
@ -342,7 +344,6 @@
</group>
<group>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="department_id"/>
</group>
</group>
<div>

View File

@ -402,13 +402,6 @@ class hr_applicant(base_stage, osv.Model):
return super(hr_applicant, self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
def create(self, cr, uid, vals, context=None):
obj_id = super(hr_applicant, self).create(cr, uid, vals, context=context)
applicant = self.browse(cr, uid, obj_id, context=context)
if applicant.job_id:
self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('Applicant <b>created</b>'), subtype="hr_recruitment.mt_job_new_applicant", context=context)
return obj_id
def case_open(self, cr, uid, ids, context=None):
"""
open Request of the applicant for the hr_recruitment

View File

@ -301,6 +301,14 @@
</record>
<!-- HR Job -->
<record model="ir.actions.act_window" id="action_hr_job_applications">
<field name="name">Applications</field>
<field name="res_model">hr.applicant</field>
<field name="view_mode">kanban,tree,form,graph,calendar</field>
<field name="context">{'search_default_job_id': [active_id], 'default_job_id': active_id}</field>
</record>
<record id="hr_job_survey" model="ir.ui.view">
<field name="name">hr.job.form1</field>
<field name="model">hr.job</field>
@ -310,13 +318,14 @@
<label for="survey_id" groups="base.group_user"/>
<div groups="base.group_user">
<field name="survey_id" class="oe_inline" domain="[('type','=','Human Resources')]"/>
<button class="oe_inline"
<button class="oe_inline oe_link"
string="Interview"
icon="gtk-go-forward"
name="action_print_survey" type="object"
attrs="{'invisible':[('survey_id','=',False)]}"/>
</div>
</field>
<xpath expr="//div[@class='oe_title']//h1" position="after">
<xpath expr="//div[@class='oe_title']//h2" position="after">
<div name="group_alias"
attrs="{'invisible': [('alias_domain', '=', False)]}">
<label for="alias_id" string="Email Alias"/>
@ -329,15 +338,13 @@
</span>
</div>
</xpath>
<xpath expr="//div[@class='oe_title']" position="after">
<div class="oe_right oe_button_box" name="buttons">
<button string="Applications" name="%(action_hr_job_applications)d" type="action"/>
</div>
</xpath>
</field>
</record>
<record model="ir.actions.act_window" id="hr_job_applications">
<field name="name">Applications</field>
<field name="res_model">hr.applicant</field>
<field name="view_mode">kanban,tree,form,graph,calendar</field>
<field name="context">{'search_default_job_id': [active_id], 'default_job_id': active_id}</field>
</record>
<record id="view_hr_job_kanban" model="ir.ui.view">
<field name="name">hr.job.kanban</field>
@ -379,11 +386,11 @@
<div class="oe_job oe_manager_name">
<t t-esc="record.manager_id.value"/>
</div>
<img t-att-src="kanban_image('hr.employee', 'image', record.manager_id.raw_value, {'preview_image': 'image_small'})" t-att-title="record.manager_id.value.name" class="oe_kanban_avatar"/>
<img t-att-src="kanban_image('hr.employee', 'image', record.manager_id.raw_value, {'preview_image': 'image_small'})" t-att-title="record.manager_id.value.name" class="oe_kanban_avatar oe_job_avatar"/>
<t t-if="record.state.raw_value == 'recruit'">
<div class="oe_applications">
<a name="%(hr_job_applications)d" type="action" t-if="record.application_count.value gt 1" class="oe_link"><t t-esc="record.application_count.value"/> Applications</a>
<a name="%(hr_job_applications)d" type="action" t-if="record.application_count.value lt 2" class="oe_link"><t t-esc="record.application_count.value"/> Application</a>
<a name="%(action_hr_job_applications)d" type="action" t-if="record.application_count.value gt 1" class="oe_link"><t t-esc="record.application_count.value"/> Applications</a>
<a name="%(action_hr_job_applications)d" type="action" t-if="record.application_count.value lt 2" class="oe_link"><t t-esc="record.application_count.value"/> Application</a>
</div>
<field state="recruit" name="no_of_recruitment" widget="gage" options="{'min_field': 'no_of_hired_employee','max_field': 'no_of_recruitment', 'label_field': 'no_of_hired_employee', 'action_change': 'action_hired_employee'}">Forecast</field>
</t>

View File

@ -27,7 +27,7 @@
</div>
<xpath expr="//div[@name='hr_recruitment']" position="after">
<div attrs="{'invisible': ['|',('module_hr_recruitment','=',False),('alias_domain', '=', False)]}">
<label string="Your job email addess"/>
<label string="Your job email address"/>
<field name="alias_prefix" class="oe_inline" attrs="{'required': [('alias_domain', '!=', False)]}"/>
@
<field name="alias_domain" class="oe_inline" readonly="1"/>

View File

@ -13,7 +13,7 @@
color: #4c4c4c;
height: 16px;
}
.openerp img.oe_kanban_avatar {
.openerp img.oe_job_avatar {
margin-top: -40px;
position: absolute;
width: 60px;