[IMP] improved code to add subtype of stage change of applicant on job

bzr revid: tpa@tinyerp.com-20130624090410-af4jc4myy88huyol
This commit is contained in:
Turkesh Patel (Open ERP) 2013-06-24 14:34:10 +05:30
parent 4a972b4089
commit e8ae12827e
4 changed files with 8 additions and 9 deletions

View File

@ -156,7 +156,7 @@ class hr_job(osv.osv):
def write(self, cr, uid, ids, vals, context=None):
if vals.get('state') == 'recruit':
self.message_post(cr, uid, ids, body=_('job in <b>Recruitment</b> Stage'), subtype="hr.mt_job_recruit", context=context)
self.message_post(cr, uid, ids, body=_('job in <b>Recruitment</b> Stage'), context=context)
return super(hr_job, self).write(cr, uid, ids, vals, context=context)
class hr_employee(osv.osv):

File diff suppressed because one or more lines are too long

View File

@ -485,6 +485,12 @@
<field name="default" eval="False"/>
<field name="description">Applicant refused</field>
</record>
<record id="mt_job_applicant_stage" model="mail.message.subtype">
<field name="name">Application Stage Changed</field>
<field name="res_model">hr.job</field>
<field name="parent_id" eval="ref('mt_stage_changed')"/>
<field name="relation_field">job_id</field>
</record>
<!-- Applicant Categories(Tag) -->
<record id="tag_applicant_reserve" model="hr.applicant_category">
<field name="name">Reserve</field>

View File

@ -40,7 +40,7 @@ openerp.hr_recruitment = function (openerp) {
if (!self.$el.find(".oe_justgage_edit").size()) {
var $svg = self.$el.find('svg');
$div = $('<div class="oe_justgage_edit" style="text-align: center; z-index: 1; position: absolute; width: ' + $svg.outerWidth() + 'px; top: ' + ($svg.outerHeight()/2+20) + 'px;"/>');
$input = $('<input style="text-align: center; width: ' + ($svg.outerWidth()/2) + 'px; margin: auto;"/>').val(value);
$input = $('<input style="text-align: center; width: ' + ($svg.outerWidth()/2) + 'px; margin: auto;"/>').val(parent.values.no_of_recruitment.value);
$div.append($input);
self.$el.prepend($div)
$input.focus()