From e22e84125a3ce0e5646acd34a7b42676f3a716ec Mon Sep 17 00:00:00 2001 From: "Mod2 Team (OpenERP)" <> Date: Thu, 24 Jun 2010 12:53:28 +0530 Subject: [PATCH] [IMP] CalDAV * useability improvement in export ics file wizard bzr revid: hmo@tinyerp.com-20100624072328-6citdyy2bl9yy2i6 --- addons/caldav/wizard/calendar_event_export.py | 13 +++---------- addons/caldav/wizard/calendar_event_export_view.xml | 4 ++-- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/addons/caldav/wizard/calendar_event_export.py b/addons/caldav/wizard/calendar_event_export.py index 856d9e9bc91..0be54df9f56 100644 --- a/addons/caldav/wizard/calendar_event_export.py +++ b/addons/caldav/wizard/calendar_event_export.py @@ -32,16 +32,6 @@ class calendar_event_export(osv.osv_memory): """ Export Calendar Event. """ - def process_export_ics(self, cr, uid, ids, context): - """ - Get Default value for file_path field. - """ - model = context.get('model', 'basic.calendar') - model_obj = self.pool.get(model) - - calendar = model_obj.export_cal(cr, uid, context['active_ids'], context) - self.write(cr, uid, ids, {'file_path': base64.encodestring(calendar)}) - return False def default_get(self, cr, uid, fields, context): """ @@ -54,6 +44,9 @@ class calendar_event_export(osv.osv_memory): name = 'OpenERP %s.ics' % (model_obj._description) if 'name' in fields: res.update({'name': name}) + if 'file_path' in fields: + calendar = model_obj.export_cal(cr, uid, context['active_ids'], context) + res.update({'file_path': base64.encodestring(calendar)}) return res _name = "calendar.event.export" diff --git a/addons/caldav/wizard/calendar_event_export_view.xml b/addons/caldav/wizard/calendar_event_export_view.xml index 227822966d0..cfadf945bf4 100644 --- a/addons/caldav/wizard/calendar_event_export_view.xml +++ b/addons/caldav/wizard/calendar_event_export_view.xml @@ -13,8 +13,8 @@ -