diff options
| author | Thibault Delavallée <tde@openerp.com> | 2013-07-10 15:29:54 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2013-07-10 15:29:54 +0200 |
| commit | 98ec74dd62cde93c91d3a05194845d4e8ea17e9c (patch) | |
| tree | 5302e2adc5961e2118437cc62dd1f600e82a9c1a /addons/project | |
| parent | 4b0baa3615aee3e528ccef0b60142ba7acb7976f (diff) | |
[IMP] project_issue: added date_last_stage_update in reports; removed month_last_stgae_update in project_task, only date is sufficient because reports already handle this correctly. Updated coding style of tests.
bzr revid: tde@openerp.com-20130710132954-tnr75cf33nti8r1u
Diffstat (limited to 'addons/project')
| -rw-r--r-- | addons/project/report/project_report.py | 3 | ||||
| -rw-r--r-- | addons/project/report/project_report_view.xml | 3 | ||||
| -rw-r--r-- | addons/project/tests/test_project_flow.py | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py index def0e0edd97..15b26507ff3 100644 --- a/addons/project/report/project_report.py +++ b/addons/project/report/project_report.py @@ -37,7 +37,6 @@ class report_project_task_user(osv.osv): 'date_end': fields.date('Ending Date', readonly=True), 'date_deadline': fields.date('Deadline', readonly=True), 'date_last_stage_update': fields.date('Last Stage Update', readonly=True), - 'month_last_stage_update': fields.selection(fields.date.MONTHS, 'Month of Last Stage Update', readonly=True), 'project_id': fields.many2one('project.project', 'Project', readonly=True), 'hours_planned': fields.float('Planned Hours', readonly=True), 'hours_effective': fields.float('Effective Hours', readonly=True), @@ -74,7 +73,6 @@ class report_project_task_user(osv.osv): date_trunc('day',t.date_start) as date_start, date_trunc('day',t.date_end) as date_end, date_trunc('day',t.date_last_stage_update) as date_last_stage_update, - to_char(date_last_stage_update, 'MM') as month_last_stage_update, to_date(to_char(t.date_deadline, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_deadline, -- sum(cast(to_char(date_trunc('day',t.date_end) - date_trunc('day',t.date_start),'DD') as int)) as no_of_days, abs((extract('epoch' from (t.date_end-t.date_start)))/(3600*24)) as no_of_days, @@ -112,7 +110,6 @@ class report_project_task_user(osv.osv): date_end, date_deadline, date_last_stage_update, - month_last_stage_update, t.user_id, t.project_id, t.priority, diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml index 2e113dfd04f..d5638e332a4 100644 --- a/addons/project/report/project_report_view.xml +++ b/addons/project/report/project_report_view.xml @@ -19,7 +19,6 @@ <field name="date_start" invisible="1"/> <field name="date_end" invisible="1"/> <field name="date_last_stage_update" invisible="1"/> - <field name="month_last_stage_update" invisible="1"/> <field name="company_id" invisible="1" groups="base.group_multi_company"/> <field name="partner_id" invisible="1"/> <field name="day" invisible="1"/> @@ -82,7 +81,7 @@ <filter string="Day" context="{'group_by':'day'}" help="Creation Date"/> <filter string="Month" context="{'group_by':'month'}" help="Creation Date"/> <filter string="Year" context="{'group_by':'year'}" help="Creation Date"/> - <filter string="Last Stage Update" context="{'group_by':'month_last_stage_update'}" help="Month of Last Stage Update"/> + <filter string="Last Stage Update" context="{'group_by':'date_last_stage_update'}" help="Last Stage Update"/> </group> </search> </field> diff --git a/addons/project/tests/test_project_flow.py b/addons/project/tests/test_project_flow.py index a78bd6de156..a037c92d2ae 100644 --- a/addons/project/tests/test_project_flow.py +++ b/addons/project/tests/test_project_flow.py @@ -135,9 +135,11 @@ class TestProjectFlow(TestProjectBase): self.assertEqual(res[0].get('create_uid'), uid, 'project: message_process: task should have been created by uid as alias_user_id is False on the alias') # Test: messages - self.assertEqual(len(task.message_ids), 2, + self.assertEqual(len(task.message_ids), 3, 'project: message_process: newly created task should have 2 messages: creation and email') - self.assertEqual(task.message_ids[1].subtype_id.name, 'Task Created', + self.assertEqual(task.message_ids[2].subtype_id.name, 'Task Created', + 'project: message_process: first message of new task should have Task Created subtype') + self.assertEqual(task.message_ids[1].subtype_id.name, 'Task Assigned', 'project: message_process: first message of new task should have Task Created subtype') self.assertEqual(task.message_ids[0].author_id.id, self.email_partner_id, 'project: message_process: second message should be the one from Agrolait (partner failed)') |
