diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 759170224bd..e0358efe0d9 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -364,32 +364,32 @@ class hr_holidays(osv.osv): def create_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_post(cr, uid, ids, - _("The request has been created and is waiting confirmation."), context=context) + _("The request has been created and is waiting confirmation."),subtype="new", context=context) return True def holidays_confirm_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): self.message_post(cr, uid, [obj.id], - _("The request has been submitted and is waiting for validation by the manager."), context=context) + _("The request has been submitted and is waiting for validation by the manager."), subtype="submitted", context=context) def holidays_first_validate_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_post(cr, uid, [obj.id], - _("The request has been approved. A second validation is necessary and is now pending."), context=context) + _("The request has been approved. A second validation is necessary and is now pending."), subtype="pending", context=context) def holidays_validate_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): if obj.double_validation: self.message_post(cr, uid, [obj.id], - _("The request has been double validated. The validation process is now over."), context=context) + _("The request has been double validated. The validation process is now over."), subtype="double validated", context=context) else: self.message_post(cr, uid, [obj.id], - _("The request has been approved. The validation process is now over."), context=context) + _("The request has been approved. The validation process is now over."), subtype="closed", context=context) def holidays_refuse_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): self.message_post(cr, uid, [obj.id], - _("The request has been refused. The validation process is now over."), context=context) + _("The request has been refused. The validation process is now over."), subtype="cancelled", context=context) class resource_calendar_leaves(osv.osv): diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml index 1e534093eb3..3b927b60419 100644 --- a/addons/hr_holidays/hr_holidays_data.xml +++ b/addons/hr_holidays/hr_holidays_data.xml @@ -49,5 +49,43 @@ Once validated, they are visible in the employee's calendar. HR officers can def True brown + + + new + + + + + submitted + + + + + pending + + + + + double validated + + + + closed + + + + cancelled + + + + + + + + + + + + diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 82f2c9c3a21..578ebde9162 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -457,14 +457,14 @@ class hr_applicant(base_stage, osv.Model): """ Override of the (void) default notification method. """ if not stage_id: return True stage_name = self.pool.get('hr.recruitment.stage').name_get(cr, uid, [stage_id], context=context)[0][1] - return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), context=context) + return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype="stage change", context=context) def case_get_note_msg_prefix(self, cr, uid, id, context=None): return 'Applicant' def case_open_send_note(self, cr, uid, ids, context=None): message = _("Applicant has been set in progress.") - return self.message_post(cr, uid, ids, body=message, context=context) + return self.message_post(cr, uid, ids, body=message, subtype="in progress", context=context) def case_close_send_note(self, cr, uid, ids, context=None): if context is None: @@ -472,23 +472,23 @@ class hr_applicant(base_stage, osv.Model): for applicant in self.browse(cr, uid, ids, context=context): if applicant.emp_id: message = _("Applicant has been hired and created as an employee.") - self.message_post(cr, uid, [applicant.id], body=message, context=context) + self.message_post(cr, uid, [applicant.id], body=message, subtype="closed", context=context) else: message = _("Applicant has been hired.") - self.message_post(cr, uid, [applicant.id], body=message, context=context) + self.message_post(cr, uid, [applicant.id], body=message, subtype="closed", context=context) return True def case_cancel_send_note(self, cr, uid, ids, context=None): msg = 'Applicant refused.' - return self.message_post(cr, uid, ids, body=msg, context=context) + return self.message_post(cr, uid, ids, body=msg, subtype="cancelled", context=context) def case_reset_send_note(self, cr, uid, ids, context=None): message =_("Applicant has been set as new.") - return self.message_post(cr, uid, ids, body=message, context=context) + return self.message_post(cr, uid, ids, body=message, subtype="new", context=context) def create_send_note(self, cr, uid, ids, context=None): message = _("Applicant has been created.") - return self.message_post(cr, uid, ids, body=message, context=context) + return self.message_post(cr, uid, ids, body=message, subtype="new", context=context) class hr_job(osv.osv): diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index 84289da7bae..a567489751a 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -460,6 +460,40 @@ You can automatically receive job application though an email gateway, see the H - + + + + new + + + + + closed + + + + cancelled + + + + + stage change + + + + + in progress + + + + + + + + + + + + diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index a1562d53a61..4ed61119a5f 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -95,25 +95,25 @@ class account_analytic_account(osv.osv): def set_close(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'close'}, context=context) message = _("Contract has been closed.") - self.message_post(cr, uid, ids, body=message, context=context) + self.message_post(cr, uid, ids, body=message, subtype="closed", context=context) return True def set_cancel(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'cancelled'}, context=context) message = _("Contract has been cancelled.") - self.message_post(cr, uid, ids, body=message, context=context) + self.message_post(cr, uid, ids, body=message, subtype="cancelled", context=context) return True def set_open(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'open'}, context=context) message = _("Contract has been opened.") - self.message_post(cr, uid, ids, body=message, context=context) + self.message_post(cr, uid, ids, body=message, subtype="open", context=context) return True def set_pending(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'pending'}, context=context) message = _("Contract has been set as pending.") - self.message_post(cr, uid, ids, body=message, context=context) + self.message_post(cr, uid, ids, body=message, subtype="pending", context=context) return True account_analytic_account() diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml index 462888e0b39..5cc5024d591 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml @@ -16,5 +16,33 @@ 50% 50.0 + + + closed + + + + pending + + + + + open + + + + cancelled + + + + + + + + + + + +