From a2b2354f282ea6e2e90a409b10f4347c3975060f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 24 Jun 2016 09:31:08 +0200 Subject: [PATCH] Replace work by timesheet_works issue5599 review25131003 --- work.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/work.py b/work.py index 0f10634eb9..6a41b7243f 100644 --- a/work.py +++ b/work.py @@ -72,7 +72,8 @@ class Work: for sub_ids in grouped_slice(work_ids): red_sql = reduce_ids(table.id, sub_ids) cursor.execute(*table.join(work, - condition=table.work == work.id + condition=( + Concat(cls.__name__ + ',', table.id) == work.origin) ).join(line, condition=line.work == work.id ).select(table.id, Sum(line.cost_price * line.duration), where=red_sql,