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:
parent
6e7fab049d
commit
1e0daa7844
|
@ -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)
|
||||
|
|
|
@ -42,6 +42,11 @@ class calendar_event_import(osv.osv_memory):
|
|||
@param ids: List of calendar event import’s 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')
|
||||
|
|
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue