Don't copy timesheet and project children as link between both will be lost
review1042002
This commit is contained in:
1 parent
8099f8b140
commit
8661b1e5d3
1 file changed
+2
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user