context = {}
data = self.browse(cr, uid, ids, context=context)[0]
task_pool = self.pool.get('project.task')
- task_id = context.get('active_id', False)
+ task_id = context.get('active_id')
if task_id:
task_pool.write(cr, uid, task_id, {'remaining_hours': data.remaining_hours})
- if context.get('button_reactivate', False):
+ if context.get('button_reactivate'):
task_pool.do_reopen(cr, uid, [task_id], context=context)
return {'type': 'ir.actions.act_window_close'}
project_task_reevaluate()