diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index 63fd3710cac..d4fff410cf1 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -95,11 +95,6 @@ class hr_job(osv.osv):
_name = "hr.job"
_description = "Job Position"
_inherit = ['mail.thread','ir.needaction_mixin']
- _track = {
- 'state': {
- 'hr.mt_job_recruit': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'recruit',
- },
- }
_columns = {
'name': fields.char('Job Name', size=128, required=True, select=True),
# TO CLEAN: when doing a cleaning, we should change like this:
@@ -159,6 +154,10 @@ class hr_job(osv.osv):
self.write(cr, uid, ids, {'state': 'open', 'no_of_recruitment': 0,'no_of_hired_employee': 0})
return True
+ def write(self, cr, uid, ids, vals, context=None):
+ if vals.get('state') == 'recruit':
+ self.message_post(cr, uid, ids, body=_('job in Recruitment Stage'), subtype="hr.mt_job_recruit", context=context)
+ return super(hr_job, self).write(cr, uid, ids, vals, context=context)
class hr_employee(osv.osv):
_name = "hr.employee"
diff --git a/addons/hr/hr_data.xml b/addons/hr/hr_data.xml
index 05397760fcf..edb593bfc76 100644
--- a/addons/hr/hr_data.xml
+++ b/addons/hr/hr_data.xml
@@ -24,7 +24,6 @@ Leave Management (keep track of employee leaves), Expense Management (manage emp
Recruitment in Progress
hr.job
- job in Recruitment Stage
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 747b306a947..6f950f69c12 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -402,6 +402,13 @@ 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 created'), 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
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index 128654fac64..384876accdd 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -409,6 +409,9 @@
Launch Recruitment
Recruitment Done
+
diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css
index 95d479671c7..88e2eada04a 100644
--- a/addons/hr_recruitment/static/src/css/job_position.css
+++ b/addons/hr_recruitment/static/src/css/job_position.css
@@ -56,7 +56,7 @@
}
.openerp .oe_justgage {
float: right;
- margin-top: -60px;
+ margin-top: -55px;
margin-right: -30px;
width:200px;
height:130px;
@@ -81,4 +81,7 @@
height: 32px;
float: right;
padding-right: 88px;
+}
+.openerp .oe_job_messages{
+ margin-top: 40px !important;
}
\ No newline at end of file