Merge lp:~openerp-dev/openobject-addons/6.1-opw-575774-pso into lp:openobject-addons/6.1

Proposed by Priyesh (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-575774-pso
Merge into: lp:openobject-addons/6.1
Diff against target: 26 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/6.1-opw-575774-pso
Reviewer Review Type Date Requested Status
Olivier Dony (Odoo) Pending
Review via email: mp+109989@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.

I fixed this issue in this branch.

Kindly review it and provide your opinion on this.

Regards,
Priyesh

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-575774-port-mma/+merge/136911 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6841. By Priyesh (OpenERP)

[FIX] project_timesheet: KeyError: 'user_id' coming due to not creation unique id from postgres view(case:575774)

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 2011-07-01 23:41:24 +0000
+++ project_timesheet/report/task_report.py 2012-06-13 06:48:27 +0000
@@ -70,19 +70,19 @@
70 tools.drop_view_if_exists(cr, 'report_timesheet_task_user')70 tools.drop_view_if_exists(cr, 'report_timesheet_task_user')
71 cr.execute(""" create or replace view report_timesheet_task_user as (71 cr.execute(""" create or replace view report_timesheet_task_user as (
72 select72 select
73 ((r.id*12)+to_number(months.m_id,'99'))::integer as id,73 ((r.id*12)+to_number(months.m_id,'999999'))::integer as id,
74 months.name as name,74 months.name as name,
75 r.id as user_id,75 r.id as user_id,
76 to_char(to_date(months.name, 'YYYY/MM/DD'),'YYYY') as year,76 to_char(to_date(months.name, 'YYYY/MM/DD'),'YYYY') as year,
77 to_char(to_date(months.name, 'YYYY/MM/DD'),'MM') as month77 to_char(to_date(months.name, 'YYYY/MM/DD'),'MM') as month
78 from res_users r,78 from res_users r,
79 (select to_char(p.date,'YYYY-MM-01') as name,79 (select to_char(p.date,'YYYY-MM-01') as name,
80 to_char(p.date,'MM') as m_id80 to_char(p.date,'YYYYMM') as m_id
81 from project_task_work p81 from project_task_work p
8282
83 union83 union
84 select to_char(h.name,'YYYY-MM-01') as name,84 select to_char(h.name,'YYYY-MM-01') as name,
85 to_char(h.name,'MM') as m_id85 to_char(h.name,'YYYYMM') as m_id
86 from hr_timesheet_sheet_sheet_day h) as months86 from hr_timesheet_sheet_sheet_day h) as months
8787
88 group by88 group by