[FIX] Hr_Holidays : Refusal of a leave was broken, corrected by changing the datatype of case_id into hr.holidays model ( Ref : Revision 4935 mra@mra-laptop-20110201124038-fwehl3uq7qo3tp6v from branch trunk-dev-addons3 )

lp bug: https://launchpad.net/bugs/709130 fixed

bzr revid: jvo@tinyerp.com-20110302102750-au1j2gyasyhlqj3k
This commit is contained in:
Jay Vora (OpenERP)
2011-03-02 15:57:50 +05:30
parent 1cf4261d0f
commit c5ca4b925f
+2 -2
View File
@@ -126,7 +126,7 @@ class hr_holidays(osv.osv):
'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)]}),
'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
'number_of_days': fields.function(_compute_number_of_days, method=True, string='Number of Days', store=True),
'case_id': fields.char('Meeting', size=64),
'case_id': fields.many2one('crm.meeting', 'Meeting'),
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone"),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
@@ -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, [record.case_id.id])
# If a category that created several holidays, cancel all related
wf_service = netsvc.LocalService("workflow")