diff options
| author | Harry (OpenERP) <hmo@tinyerp.com> | 2011-12-14 17:59:24 +0530 |
|---|---|---|
| committer | Harry (OpenERP) <hmo@tinyerp.com> | 2011-12-14 17:59:24 +0530 |
| commit | 092f97b32b35af6a40b9d2ae70c3159da2fb235f (patch) | |
| tree | 2974d3719af9338cd0b1814da900d7e9ca8d4779 /addons/project_gtd | |
| parent | 593f5f571bbc49673975afc405e9345ef3457b92 (diff) | |
| parent | e36dc8c5e3ca3da1474747bae5ec87fea19b23b8 (diff) | |
[MERGE] merged with trunk-development-branch
bzr revid: hmo@tinyerp.com-20111214122924-izzibrz1yz67rt7g
Diffstat (limited to 'addons/project_gtd')
| -rw-r--r-- | addons/project_gtd/__openerp__.py | 5 | ||||
| -rw-r--r-- | addons/project_gtd/security/ir.model.access.csv | 10 | ||||
| -rw-r--r-- | addons/project_gtd/test/gtd_test.yml | 78 | ||||
| -rw-r--r-- | addons/project_gtd/test/task_timebox.yml | 45 |
4 files changed, 53 insertions, 85 deletions
diff --git a/addons/project_gtd/__openerp__.py b/addons/project_gtd/__openerp__.py index 761b2b44708..7dae4706b70 100644 --- a/addons/project_gtd/__openerp__.py +++ b/addons/project_gtd/__openerp__.py @@ -21,7 +21,7 @@ { - 'name': 'Todo List based on the GTD methodology', + 'name': 'Todo Lists', 'version': '1.0', 'category': 'Project Management', 'complexity': "easy", @@ -57,9 +57,10 @@ performing those tasks. ], 'demo_xml': ['project_gtd_demo.xml'], 'test':[ - 'test/gtd_test.yml' + 'test/task_timebox.yml' ], 'installable': True, + 'application': True, 'active': False, 'certificate': '0043525236301', } diff --git a/addons/project_gtd/security/ir.model.access.csv b/addons/project_gtd/security/ir.model.access.csv index 8e85047c51c..d85ac8a5d0c 100644 --- a/addons/project_gtd/security/ir.model.access.csv +++ b/addons/project_gtd/security/ir.model.access.csv @@ -1,5 +1,5 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_project_gtd_context_user","project.gtd.context project user","model_project_gtd_context","project.group_project_user",1,0,0,0 -"access_project_gtd_timebox_user","project.gtd.timebox project user","model_project_gtd_timebox","project.group_project_user",1,0,0,0 -"access_project_gtd_context_manager","project.gtd.context project manager","model_project_gtd_context","project.group_project_manager",1,1,1,1 -"access_project_gtd_timebox_manager","project.gtd.timebox project manager","model_project_gtd_timebox","project.group_project_manager",1,1,1,1 +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_project_gtd_context_user,project.gtd.context project user,model_project_gtd_context,project.group_project_user,1,0,0,0
+access_project_gtd_timebox_user,project.gtd.timebox project user,model_project_gtd_timebox,project.group_project_user,1,0,0,0
+access_project_gtd_context_manager,project.gtd.context project manager,model_project_gtd_context,project.group_project_manager,1,1,1,1
+access_project_gtd_timebox_manager,project.gtd.timebox project manager,model_project_gtd_timebox,project.group_project_manager,1,1,1,1
diff --git a/addons/project_gtd/test/gtd_test.yml b/addons/project_gtd/test/gtd_test.yml deleted file mode 100644 index 0583bc7e8e0..00000000000 --- a/addons/project_gtd/test/gtd_test.yml +++ /dev/null @@ -1,78 +0,0 @@ -- - Create a task 'Develop time management module' with weekly timebox -- - !record {model: project.task, id: project_task_developtimemanagementmodule0}: - name: Develop time management module - planned_hours: 15.0 - project_id: project.project_project_22 - remaining_hours: 15.0 - state: draft - timebox_id: project_gtd.timebox_weekly - - -- - Open the task -- - !python {model: project.task}: | - self.do_open(cr, uid, [ref("project_task_developtimemanagementmodule0")], {"lang": - "en_US", "project_id": False, "tz": False, "active_model": "ir.ui.menu", - "department_id": False, "section_id": False, "search_default_project_id": - False, "search_default_user_id": 1, "search_default_current": 1, "active_ids": - [ref("project.menu_action_view_task")], "active_id": ref("project.menu_action_view_task"), - }) - -- - Create time box for next week -- - !record {model: project.gtd.timebox, id: project_gtd_timebox_nextweek0}: - name: Next Week - sequence: 0.0 - -- - Create time box for tomorrow -- - !record {model: project.gtd.timebox, id: project_gtd_timebox_tomorrow1}: - name: Tomorrow - sequence: 0.0 - -- - Planify the task from weekly timebox to tomorrow timebox -- - !record {model: project.timebox.fill.plan, id: project_timebox_fill_plan_0}: - task_ids: - - project_task_developtimemanagementmodule0 - timebox_id: project_gtd.timebox_weekly - timebox_to_id: project_gtd_timebox_tomorrow1 - - -- - Set the task to tomorrow timebox -- - !python {model: project.timebox.fill.plan}: | - self.process(cr, uid, [ref("project_timebox_fill_plan_0")], {"lang": "en_US", - "project_id": False, "tz": False, "active_model": "project.gtd.timebox", - "department_id": False, "section_id": False, "record_id": 1, "active_ids": - [ref("project_gtd.timebox_daily")], "active_id": ref("project_gtd.timebox_daily"), - }) - -- - Check if task set to tomorrow timebox -- - !assert {model: project.task, id: project_task_developtimemanagementmodule0, string: Task set to tomorrow timebox}: - - timebox_id.id == ref("project_gtd_timebox_tomorrow1") - -- - Empty Timebox for tomorrow -- - !python {model: project.timebox.empty}: | - self._empty(cr, uid, {"lang": "en_US", - "project_id": False, "tz": False, "active_model": "project.gtd.timebox", - "department_id": False, "section_id": False, "record_id": 1, "active_ids": - [ref("project_gtd_timebox_tomorrow1")], "active_id": ref("project_gtd_timebox_tomorrow1"), - }) - -- - Check task 'Develop time management module' is no more in tomorrow timebox -- - !assert {model: project.task, id: project_task_developtimemanagementmodule0, string: Task is not in tomorrow timebox}: - - timebox_id.id != ref("project_gtd_timebox_tomorrow1") diff --git a/addons/project_gtd/test/task_timebox.yml b/addons/project_gtd/test/task_timebox.yml new file mode 100644 index 00000000000..8efa7219b21 --- /dev/null +++ b/addons/project_gtd/test/task_timebox.yml @@ -0,0 +1,45 @@ +- + In order to test the process of Timebox in Project Management module, + I set my task from Daily to Weekly Timebox through Plannify Timebox +- + !record {model: project.timebox.fill.plan, id: plan_id}: + task_ids: [project.project_task_10] + timebox_id: timebox_daily + timebox_to_id: timebox_weekly +- + I set the task from Daily Timebox to Weekly Timebox +- + !python {model: project.timebox.fill.plan}: | + self.process(cr, uid, [ref("plan_id")]) +- + I check task is set to Weekly Timebox +- + !assert {model: project.task, id: project.project_task_10, string: Task should be set to weekly timebox}: + - timebox_id.id == ref("timebox_weekly") +- + I Empty the Weekly Timebox +- + !python {model: project.timebox.empty}: | + self._empty(cr, uid, {"active_model": "project.gtd.timebox", + "active_ids":[ref("timebox_weekly")], + "active_id": ref("timebox_weekly"), + }) +- + I check task 'Develop Module in Sale Management' is no more in Weekly Timebox +- + !assert {model: project.task, id: project.project_task_10 , string: Task is not in Weekly Timebox }: + - timebox_id.id != ref("timebox_weekly") +- + I set Previous Timebox on task +- + !python {model: project.task}: | + previous_timebox = self.prev_timebox(cr, uid, [ref("project.project_task_10")], + {'active_ids': [ref("project_gtd.menu_open_gtd_timebox_tree")],}) + assert previous_timebox == True, "I set Previous Timebox on task" +- + I set Next Timebox on task +- + !python {model: project.task}: | + next_timebox = self.next_timebox(cr, uid, [ref("project.project_task_10")], + {'active_ids': [ref("project_gtd.menu_open_gtd_timebox_tree")],}) + assert next_timebox == True, "I set Next Timebox on task"
\ No newline at end of file |
