Do not compute twice the children timesheets

review355001
(transplanted from 973bf618edb04399e9c86ba07054b455c7adb79f)
This commit is contained in:
Nicolas Évrard committed 2012-05-15 10:31:09 +02:00
1 parent 63a55aad24
commit 023d02c7bf
1 file changed
+1 -1
+1 -1
View File
@@ -76,7 +76,7 @@ class Work(ModelSQL, ModelView):
('parent', 'child_of', ids)
], context=context)
# force inactive ids to be in all_ids
all_ids = all_ids + ids
all_ids = list(set(all_ids + ids))
clause = "SELECT work, sum(hours) FROM timesheet_line "\
"WHERE work IN (%s) "\
% ",".join(('%s',) * len(all_ids))