[FIX]: * caldav: Export calendar with recurrent event
* base_calendar: Fix wrong code in Exrule wizard bzr revid: rpa@tinyerp.com-20100630094307-n6lucf47o1ixsai4
This commit is contained in:
parent
216e257c51
commit
2d6a0e2329
|
@ -82,12 +82,11 @@ class base_calendar_set_exrule(osv.osv_memory):
|
|||
@param uid: the current user’s ID for security checks,
|
||||
@param fields: List of fields for default value
|
||||
@param context: A standard dictionary for contextual values
|
||||
|
||||
"""
|
||||
crm_obj = self.pool.get('crm.meeting')
|
||||
for meeting in crm_obj.browse(cr, uid, context.get('active_ids', [])):
|
||||
if not meeting.rrule:
|
||||
raise osv.except_osv(_("Warning !"), _("Please Apply Recurrency after Apply Exception Rule"))
|
||||
event_obj = self.pool.get(context.get('active_model'))
|
||||
for event in event_obj.browse(cr, uid, context.get('active_ids', [])):
|
||||
if not event.rrule:
|
||||
raise osv.except_osv(_("Warning !"), _("Please Apply Recurrency before applying Exception Rule."))
|
||||
return False
|
||||
|
||||
def compute_exrule_string(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -277,11 +277,7 @@ class CalDAV(object):
|
|||
% (model_obj._table, data[map_field]))
|
||||
r_ids = map(lambda x: x[0], cr.fetchall())
|
||||
if r_ids:
|
||||
rdata = self.pool.get(model).read(cr, uid, r_ids)
|
||||
event_obj = self.pool.get('basic.calendar.event')
|
||||
rcal = event_obj.export_cal(cr, uid, rdata, context=context)
|
||||
for revents in rcal.contents['vevent']:
|
||||
ical.contents['vevent'].append(revents)
|
||||
rcal = self.export_cal(cr, uid, r_ids, 'vevent', context=context)
|
||||
if data.get('recurrent_uid', None):
|
||||
uidval = openobjectid2uid(cr, data['recurrent_uid'], model)
|
||||
vevent.add('uid').value = uidval
|
||||
|
|
Loading…
Reference in New Issue