[FIX] creation of todo

bzr revid: tfr@openerp.com-20110708153507-0old9j33jus9grmc
This commit is contained in:
tfr@openerp.com 2011-07-08 17:35:07 +02:00
parent a2dcc919ce
commit 7c75f19da5
3 changed files with 4 additions and 3 deletions

View File

@ -1208,7 +1208,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
def remove_virtual_id(self, ids):
if isinstance(ids, (str, int)):
if isinstance(ids, (str, int, long)):
return base_calendar_id2real_id(ids)
if isinstance(ids, (list, tuple)):
@ -1239,7 +1239,6 @@ rule or repeating pattern of time to exclude from the recurring rule."),
if until_date:
continue
until_date = arg[2]
res = super(calendar_event, self).search(cr, uid, args_without_date, \
0, 0, order, context, count=False)
res = self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit, context=context)

View File

@ -324,7 +324,6 @@ class node_calendar(nodes.node_class):
uid = self.context.uid
res = self.set_data(cr, data)
if res and len(res):
# We arbitrarily construct only the first node of the data
# that have been imported. ICS may have had more elements,
@ -332,6 +331,7 @@ class node_calendar(nodes.node_class):
assert isinstance(res[0], (int, long))
fnodes = fil_obj.get_calendar_objects(cr, uid, [self.calendar_id], self,
domain=[('id','=',res[0])], context=ctx)
if self.context.get('DAV-client','') in ('iPhone', 'iCalendar',):
# For those buggy clients, register the alias
bca_obj = fil_obj.pool.get('basic.calendar.alias')

View File

@ -109,6 +109,8 @@ class project_task(osv.osv):
self.write(cr, uid, [exists], val)
ids.append(exists)
else:
#set user_id with id, needed later
val.update({'user_id' : uid})
task_id = self.create(cr, uid, val)
ids.append(task_id)
return ids