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/ (+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:

Description of the change


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.


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


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 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.

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
1=== modified file 'project_timesheet/report/'
2--- project_timesheet/report/ 2011-07-01 23:41:24 +0000
3+++ project_timesheet/report/ 2012-06-13 06:48:27 +0000
4@@ -70,19 +70,19 @@
5 tools.drop_view_if_exists(cr, 'report_timesheet_task_user')
6 cr.execute(""" create or replace view report_timesheet_task_user as (
7 select
8- ((*12)+to_number(months.m_id,'99'))::integer as id,
9+ ((*12)+to_number(months.m_id,'999999'))::integer as id,
10 as name,
11 as user_id,
12 to_char(to_date(, 'YYYY/MM/DD'),'YYYY') as year,
13 to_char(to_date(, 'YYYY/MM/DD'),'MM') as month
14 from res_users r,
15 (select to_char(,'YYYY-MM-01') as name,
16- to_char(,'MM') as m_id
17+ to_char(,'YYYYMM') as m_id
18 from project_task_work p
20 union
21 select to_char(,'YYYY-MM-01') as name,
22- to_char(,'MM') as m_id
23+ to_char(,'YYYYMM') as m_id
24 from hr_timesheet_sheet_sheet_day h) as months
26 group by