[FIX] resource: prevent error when deleting resource.calendar records

Attendance entries should be cascade-deleted along with the parent
record.

Closes #10310
Closes #13044
This commit is contained in:
David Beal
2016-10-21 19:57:23 +02:00
committed by Olivier Dony
parent 85b34f4be3
commit e773c1dce8
+1 -1
View File
@@ -645,7 +645,7 @@ class resource_calendar_attendance(osv.osv):
'date_from' : fields.date('Starting Date'),
'hour_from' : fields.float('Work from', required=True, help="Start and End time of working.", select=True),
'hour_to' : fields.float("Work to", required=True),
'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True),
'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True, ondelete='cascade'),
}
_order = 'dayofweek, hour_from'