Merge lp:~openerp-dev/openobject-addons/trunk-opw-575774-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Merged
Merged at revision: 8332
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-575774-port-mma
Merge into: lp:openobject-addons
Diff against target: 27 lines (+3/-3)
1 file modified
project_timesheet/report/task_report.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-opw-575774-port-mma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+136911@code.launchpad.net

Description of the change

Hello,

To reproduce the issue:-

=>Create a task at Project/Project/Tasks and start it.
=>Enter a task work line of the current date and save the task.
=>Open Human Resources/Reporting/Timesheet/Task Hours Per Month view, there's no error.
=>In the same task create a new task work line of the same month, but different year.
=>Open "Task Hours Per Month" view, error occurs.

=>Code is forward port from 6.1

Thanks,
Mayur

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'project_timesheet/report/task_report.py'
--- project_timesheet/report/task_report.py 2012-10-02 10:29:15 +0000
+++ project_timesheet/report/task_report.py 2012-11-29 11:29:21 +0000
@@ -56,7 +56,7 @@
56 tools.drop_view_if_exists(cr, 'report_timesheet_task_user')56 tools.drop_view_if_exists(cr, 'report_timesheet_task_user')
57 cr.execute(""" create or replace view report_timesheet_task_user as (57 cr.execute(""" create or replace view report_timesheet_task_user as (
58 select58 select
59 ((r.id*12)+to_number(months.m_id,'99'))::integer as id,59 ((r.id*12)+to_number(months.m_id,'999999'))::integer as id,
60 months.name as name,60 months.name as name,
61 r.id as user_id,61 r.id as user_id,
62 to_char(to_date(months.name, 'YYYY/MM/DD'),'YYYY') as year,62 to_char(to_date(months.name, 'YYYY/MM/DD'),'YYYY') as year,
@@ -65,12 +65,12 @@
65 interval '1 day') ) as task_hrs65 interval '1 day') ) as task_hrs
66 from res_users r,66 from res_users r,
67 (select to_char(p.date,'YYYY-MM-01') as name,67 (select to_char(p.date,'YYYY-MM-01') as name,
68 to_char(p.date,'MM') as m_id68 to_char(p.date,'YYYYMM') as m_id
69 from project_task_work p69 from project_task_work p
7070
71 union71 union
72 select to_char(h.name,'YYYY-MM-01') as name,72 select to_char(h.name,'YYYY-MM-01') as name,
73 to_char(h.name,'MM') as m_id73 to_char(h.name,'YYYYMM') as m_id
74 from hr_timesheet_sheet_sheet_day h) as months74 from hr_timesheet_sheet_sheet_day h) as months
7575
76 group by76 group by

Subscribers

People subscribed via source and target branches

to all changes: