[IMP] hr_holidays: removed 'document created' automatic log, as the request is automatically confirmed, leading to a status update message that is now the first message logged.
bzr revid: tde@openerp.com-20130104145030-6t6jtu4chizgs3jk
This commit is contained in:
parent
d4716db1cc
commit
2156c83687
|
@ -283,7 +283,14 @@ class hr_holidays(osv.osv):
|
|||
result['value']['number_of_days_temp'] = 0
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
""" Override to avoid automatic logging of creation """
|
||||
if context is None:
|
||||
context = {}
|
||||
context = dict(context, mail_create_nolog=True)
|
||||
return super(hr_holidays, self).create(cr, uid, values, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
check_fnct = self.pool.get('hr.holidays.status').check_access_rights
|
||||
for holiday in self.browse(cr, uid, ids, context=context):
|
||||
|
@ -430,7 +437,7 @@ class hr_holidays(osv.osv):
|
|||
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],
|
||||
_("Request <b>approved</b>, waiting second validation."), context=context)
|
||||
_("Request approved, waiting second validation."), context=context)
|
||||
|
||||
class resource_calendar_leaves(osv.osv):
|
||||
_inherit = "resource.calendar.leaves"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<record id="mt_holidays_confirmed" model="mail.message.subtype">
|
||||
<field name="name">To Approve</field>
|
||||
<field name="res_model">hr.holidays</field>
|
||||
<field name="description">Request confirmed, waiting confirmation</field>
|
||||
<field name="description">Request created and waiting confirmation</field>
|
||||
</record>
|
||||
<record id="mt_holidays_approved" model="mail.message.subtype">
|
||||
<field name="name">Approved</field>
|
||||
|
|
Loading…
Reference in New Issue