From 15733cff516b2cc85d25ebcc5bb771cbe681ec90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 7 Sep 2015 14:00:31 +0200 Subject: [PATCH] Uses own parent, name for work This is to simplify the tree structure of the works. issue4938 review17431002 --- CHANGELOG | 2 + tests/test_project.py | 19 +++- view/work_form.xml | 16 ++-- view/work_list.xml | 3 +- view/work_list2.xml | 3 +- view/work_tree.xml | 1 - work.py | 216 ++++++++++++++++++------------------------ 7 files changed, 120 insertions(+), 140 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 549e5ad914..1b259bb4a5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Uses own parent, name for work + Version 3.6.0 - 2015-04-20 * Bug fixes (see mercurial logs for details) * Add support for PyPy diff --git a/tests/test_project.py b/tests/test_project.py index 4e6b07fb47..4644fe11ae 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -33,6 +33,8 @@ class ProjectTestCase(ModuleTestCase): 'company': company.id, }]) p_work_1, = self.project_work.create([{ + 'name': 'Work 1', + 'company': company.id, 'work': t_work_1.id, 'effort_duration': datetime.timedelta(hours=1), }]) @@ -43,6 +45,9 @@ class ProjectTestCase(ModuleTestCase): 'parent': t_work_1.id, }]) p_work_1_1, = self.project_work.create([{ + 'name': 'Work 1 1', + 'company': company.id, + 'parent': p_work_1.id, 'work': t_work_1_1.id, 'effort_duration': datetime.timedelta(hours=1), }]) @@ -53,6 +58,9 @@ class ProjectTestCase(ModuleTestCase): 'parent': t_work_1.id, }]) p_work_1_2, = self.project_work.create([{ + 'name': 'Work 1 2', + 'company': company.id, + 'parent': p_work_1.id, 'work': t_work_1_2.id, 'effort_duration': datetime.timedelta(hours=1), }]) @@ -63,6 +71,9 @@ class ProjectTestCase(ModuleTestCase): 'parent': t_work_1_1.id, }]) p_work_1_1_1, = self.project_work.create([{ + 'name': 'Work 1 1 1', + 'company': company.id, + 'parent': p_work_1_1.id, 'work': t_work_1_1_1.id, 'effort_duration': datetime.timedelta(hours=1), }]) @@ -73,16 +84,22 @@ class ProjectTestCase(ModuleTestCase): 'parent': t_work_1_1.id, }]) p_work_1_1_2, = self.project_work.create([{ + 'name': 'Work 1 1 2', + 'company': company.id, + 'parent': p_work_1_1.id, 'work': t_work_1_1_2.id, 'effort_duration': datetime.timedelta(hours=1), }]) t_work_1_1_3, = self.timesheet_work.create([{ - 'name': 'Work 1 1 2', + 'name': 'Work 1 1 3', 'company': company.id, 'parent': t_work_1_1.id, }]) p_work_1_1_3, = self.project_work.create([{ + 'name': 'Work 1 1 3', + 'company': company.id, + 'parent': p_work_1_1.id, 'work': t_work_1_1_3.id, 'effort_duration': datetime.timedelta(hours=1), }]) diff --git a/view/work_form.xml b/view/work_form.xml index 5694073561..27e9b6ca11 100644 --- a/view/work_form.xml +++ b/view/work_form.xml @@ -2,24 +2,24 @@
-