Disable active_test when looking up task from work since, there could

be timesheet lines about work which is not active anymore.
This commit is contained in:
Sharoon Thomas 2013-02-18 14:35:36 +00:00
parent 5c4bc9fd1c
commit 4216ee86ef
1 changed files with 3 additions and 2 deletions

View File

@ -1076,8 +1076,9 @@ class Project(ModelSQL, ModelView):
})
def get_task_from_work(work):
task_id, = self.search([('work', '=', work.id)])
return self.browse(task_id)
with Transaction().set_context(active_test=False):
task_id, = self.search([('work', '=', work.id)])
return self.browse(task_id)
reverse_lines = line_ids[::-1]
lines = [