[IMP] project: variable scoping, no need to get the project.task pool if there's no task id to use it with
bzr revid: xmo@openerp.com-20111014115217-ym5o4tz3cmbb3c1l
This commit is contained in:
@@ -73,9 +73,9 @@ class project_task_reevaluate(osv.osv_memory):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
task_pool = self.pool.get('project.task')
|
||||
task_id = context.get('active_id')
|
||||
if task_id:
|
||||
task_pool = self.pool.get('project.task')
|
||||
task_pool.write(cr, uid, task_id, {'remaining_hours': data.remaining_hours})
|
||||
if context.get('button_reactivate'):
|
||||
task_pool.do_reopen(cr, uid, [task_id], context=context)
|
||||
|
||||
Reference in New Issue
Block a user