Skip to content

Commit

Permalink
[FIX] resource: prevent error when deleting resource.calendar records
Browse files Browse the repository at this point in the history
Attendance entries should be cascade-deleted along with the parent
record.

Closes #10310
Closes #13044
  • Loading branch information
bealdav authored and odony committed Oct 21, 2016
1 parent 85b34f4 commit e773c1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/resource/resource.py
Expand Up @@ -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'
Expand Down

0 comments on commit e773c1d

Please sign in to comment.