From 86b72a1f802da633b732cc045a1e2fed0692deff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 12 Mar 2012 12:50:05 +0100 Subject: [PATCH] [IMP] hr_holidays: improved messages (removed record name, as it appears in the message header) bzr revid: tde@openerp.com-20120312115005-k9p5hhxubpi3vtfh --- addons/hr_holidays/hr_holidays.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index d5331624350..ea2deed51cc 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -377,38 +377,38 @@ 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_append_note(cr, uid, ids, _('System notification'), - _("The %s request '%s' has been created and is waiting confirmation") - % ('leave' if obj.type == 'remove' else 'allocation', obj.name), type='notification', context=context) + _("The %s request has been created and is waiting confirmation") + % ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context) return True def holidays_confirm_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): self.message_append_note(cr, uid, [obj.id], _('System notification'), - _("The %s request '%s' has been confirmed and is waiting for validation by the manager.") - % ('leave' if obj.type == 'remove' else 'allocation', obj.name,), type='notification') + _("The %s request has been confirmed and is waiting for validation by the manager.") + % ('leave' if obj.type == 'remove' else 'allocation',,), type='notification') def holidays_validate_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): if obj.holiday_status_id.double_validation: self.message_append_note(cr, uid, [obj.id], _('System notification'), - _("The %s request '%s' has been validated. A second validation is necessary and is now pending.") - % ('leave' if obj.type == 'remove' else 'allocation', obj.name), type='notification', context=context) + _("The %s request has been validated. A second validation is necessary and is now pending.") + % ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context) else: self.message_append_note(cr, uid, [obj.id], _('System notification'), - _("The %s request '%s' has been validated. The validation process is now over.") - % ('leave' if obj.type == 'remove' else 'allocation', obj.name), type='notification', context=context) + _("The %s request has been validated. The validation process is now over.") + % ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context) def holidays_valid2_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): self.message_append_note(cr, uid, [obj.id], _('System notification'), - _("The %s request '%s' has been double validated. The validation process is now over.") - % ('leave' if obj.type == 'remove' else 'allocation', obj.name,), type='notification', context=context) + _("The %s request has been double validated. The validation process is now over.") + % ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context) def holidays_refuse_notificate(self, cr, uid, ids, approval, context=None): for obj in self.browse(cr, uid, ids): self.message_append_note(cr, uid, [obj.id], _('System notification'), - _("The %s request '%s' has been refused. The validation process is now over.") - % ('leave' if obj.type == 'remove' else 'allocation', obj.name,), type='notification', context=context) + _("The %s request has been refused. The validation process is now over.") + % ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context) hr_holidays()