openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #05364
lp:~openerp-dev/openobject-addons/6.0-event_invitations_fix-ach into lp:openobject-addons/6.0
Anup(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/6.0-event_invitations_fix-ach into lp:openobject-addons/6.0.
Requested reviews:
Olivier Dony (OpenERP) (odo)
Jay Vora (OpenERP) (jvo-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-event_invitations_fix-ach/+merge/57273
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.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-event_invitations_fix-ach/+merge/57273
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/6.0-event_invitations_fix-ach.
=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py 2011-02-02 14:35:57 +0000
+++ base_calendar/base_calendar.py 2011-04-12 05:37:54 +0000
@@ -1588,8 +1588,9 @@
@return: True
"""
res = False
- for event_datas in self.read(cr, uid, ids, ['date', 'rrule', 'exdate'], context=context):
+ for event_datas in self.read(cr, uid, ids, ['date', 'rrule', 'exdate','attendee_ids'], context=context):
event_id = event_datas['id']
+ attendee_ids = event_datas['attendee_ids']
if self.get_edit_all(cr, uid, event_id, vals=None):
event_id = base_calendar_id2real_id(event_id)
@@ -1611,6 +1612,7 @@
res = super(calendar_event, self).unlink(cr, uid, [event_id], context=context)
self.pool.get('res.alarm').do_alarm_unlink(cr, uid, [event_id], self._name)
self.unlink_events(cr, uid, [event_id], context=context)
+ self.pool.get('calendar.attendee').unlink(cr,uid,attendee_ids,context=context)
return res
def create(self, cr, uid, vals, context=None):