From 8661b1e5d37fc8963e8ed93300efd50b0cddfdc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Sep 2013 11:03:48 +0200 Subject: [PATCH] Don't copy timesheet and project children as link between both will be lost review1042002 --- work.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/work.py b/work.py index c6aaf1af72..fb4f5dcf6e 100644 --- a/work.py +++ b/work.py @@ -315,11 +315,13 @@ class Work(ModelSQL, ModelView): for key in timesheet_default.keys(): if key in cls._fields: del timesheet_default[key] + timesheet_default['children'] = None new_project_works = [] for project_work in project_works: timesheet_work, = TimesheetWork.copy([project_work.work], default=timesheet_default) pwdefault = default.copy() + pwdefault['children'] = None pwdefault['work'] = timesheet_work.id new_project_works.extend(super(Work, cls).copy([project_work], default=pwdefault))