[IMP] hr_holidays: case_id on holidays object type changed from char to m2o (crm.meeting)
bzr revid: mra@mra-laptop-20110201124038-fwehl3uq7qo3tp6v
This commit is contained in:
parent
64061cbad6
commit
19cf9e1054
|
@ -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, [int(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")
|
||||
|
|
Loading…
Reference in New Issue