From ad98c1c2fcbd8cbaa634f2076614cc0d1bfcc105 Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Tue, 26 May 2009 19:39:13 +0200 Subject: [PATCH] Removed useless code --- work.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/work.py b/work.py index fb94d87193..d523f4a881 100644 --- a/work.py +++ b/work.py @@ -232,19 +232,6 @@ class Work(ModelSQL, ModelView): res = super(Work, self).delete(cursor, user, ids, context=context) - # check if timesheet works are linked to project works - project_work_ids = self.search(cursor, user, [ - ('work', 'in', timesheet_work_ids) - ], - context=context) - if project_work_ids: - project_works = self.browse( - cursor, user, project_work_ids, context=context) - - keep_ids = set(pw.work.id for pw in project_works) - timesheet_work_ids = [ - i for i in timesheet_work_ids if i not in keep_ids] - timesheet_work_obj.delete( cursor, user, timesheet_work_ids, context=context) return res