Merge lp:~openerp-dev/openobject-addons/6.0-event_invitations_fix-ach into lp:openobject-addons/6.0

Proposed by Anup(SerpentCS)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-event_invitations_fix-ach
Merge into: lp:openobject-addons/6.0
Diff against target: 22 lines (+3/-1)
1 file modified
base_calendar/base_calendar.py (+3/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-event_invitations_fix-ach
Reviewer Review Type Date Requested Status
Stephane Wirtel (OpenERP) Pending
Olivier Dony (Odoo) Pending
Jay Vora (Serpent Consulting Services) Pending
Review via email: mp+57273@code.launchpad.net

Description of the change

Hello,

     When you delete an Event or a Meeting its respective Invitations should also be deleted. When you delete an Event/Meeting and you try to search the Invitations it crashes the system as the invitations are referring to the event that has already been deleted.

    I have fixed the issue.

     Your views please.

Thanks.

To post a comment you must log in.

Unmerged revisions

4520. By Anup(SerpentCS)

[FIX] base_calendar : Deleting a Event/Meeting Invitations should delete respective Event/Meeting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_calendar/base_calendar.py'
2--- base_calendar/base_calendar.py 2011-02-02 14:35:57 +0000
3+++ base_calendar/base_calendar.py 2011-04-12 05:37:54 +0000
4@@ -1588,8 +1588,9 @@
5 @return: True
6 """
7 res = False
8- for event_datas in self.read(cr, uid, ids, ['date', 'rrule', 'exdate'], context=context):
9+ for event_datas in self.read(cr, uid, ids, ['date', 'rrule', 'exdate','attendee_ids'], context=context):
10 event_id = event_datas['id']
11+ attendee_ids = event_datas['attendee_ids']
12
13 if self.get_edit_all(cr, uid, event_id, vals=None):
14 event_id = base_calendar_id2real_id(event_id)
15@@ -1611,6 +1612,7 @@
16 res = super(calendar_event, self).unlink(cr, uid, [event_id], context=context)
17 self.pool.get('res.alarm').do_alarm_unlink(cr, uid, [event_id], self._name)
18 self.unlink_events(cr, uid, [event_id], context=context)
19+ self.pool.get('calendar.attendee').unlink(cr,uid,attendee_ids,context=context)
20 return res
21
22 def create(self, cr, uid, vals, context=None):