From 60ac3e49e1db82291e17f7bb83694c8f850ca75a Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 31 Jan 2011 12:18:45 +0530 Subject: [PATCH] [FIX] hr_holidays: can not refuse an approved holidays => due to case_id was char lp bug: https://launchpad.net/bugs/709130 fixed bzr revid: mra@mra-laptop-20110131064845-2joefqn4oqh1gob1 --- addons/hr_holidays/hr_holidays.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 3e7a4a1b3a2..a7d9a1129bd 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -111,7 +111,7 @@ class hr_holidays(osv.osv): _columns = { 'name': fields.char('Description', required=True, size=64), - 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'), + 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'), ('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')], 'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Approval\'.\ If the admin accepts it, the state is \'Approved\'. If it is refused, the state is \'Refused\'.'), @@ -290,7 +290,7 @@ class hr_holidays(osv.osv): for record in self.browse(cr, uid, ids): # Delete the meeting if record.case_id: - obj_crm_meeting.unlink(cr, uid, [record.case_id]) + obj_crm_meeting.unlink(cr, uid, [int(record.case_id)]) # If a category that created several holidays, cancel all related wf_service = netsvc.LocalService("workflow")