CalDAV wizards: Set the uid in the context, just like the nodes would do.

bzr revid: p_christ@hol.gr-20101014114216-lswnmers6kyywyom
This commit is contained in:
P. Christeas 2010-10-14 14:42:16 +03:00
parent 6e7fab049d
commit 1e0daa7844
3 changed files with 15 additions and 1 deletions

View File

@ -37,8 +37,11 @@ class calendar_event_export(osv.osv_memory):
"""
Get Default value for Name field.
"""
if not context:
if context is None:
context = {}
else:
context= context.copy()
context['uid'] = uid
model = context.get('model', 'basic.calendar')
model_obj = self.pool.get(model)
res = super(calendar_event_export, self).default_get( cr, uid, fields, context=context)

View File

@ -42,6 +42,11 @@ class calendar_event_import(osv.osv_memory):
@param ids: List of calendar event imports IDs
@return: dictionary of calendar evet import window with Import successful msg.
"""
if context is None:
context = {}
else:
context = context.copy()
context['uid'] = uid
for data in self.read(cr, uid, ids):
model = data.get('model', 'basic.calendar')

View File

@ -44,6 +44,12 @@ class calendar_event_subscribe(osv.osv_memory):
@return: dictionary of calendar evet subscribe window with Import successful msg.
"""
global cnt
if context is None:
context = {}
else:
context = context.copy()
context['uid'] = uid
for data in self.read(cr, uid, ids):
try:
f = urllib.urlopen(data['url_path'])