[IMP] res_config: better scope dont_skip_todo
[odoo/odoo.git] / bin / addons / base / res / res_config.py
index a2aa4b8..f4aee87 100644 (file)
@@ -67,10 +67,10 @@ class res_config_configurable(osv.osv_memory):
         self.__logger.info('getting next %s', todos)
         active_todos = todos.search(cr, uid, [('state','=','open')],
                                     limit=1)
-        dont_skip_todo = True
         if active_todos:
             todo_obj = todos.browse(cr, uid, active_todos[0], context=None)
             todo_groups = map(lambda x:x.id, todo_obj.groups_id)
+            dont_skip_todo = True
             if todo_groups:
                 cr.execute("select 1 from res_groups_users_rel where uid=%s and gid IN %s",(uid, tuple(todo_groups),))
                 dont_skip_todo = bool(cr.fetchone())
@@ -90,8 +90,6 @@ class res_config_configurable(osv.osv_memory):
         `ValueError`: if no state is provided
         anything ir_actions_todo.write can throw
         """
-        if context is None:
-            context = {}
         # this is ultra brittle, but apart from storing the todo id
         # into the res.config view, I'm not sure how to get the
         # "previous" todo