Merge lp:~ocb/ocb-addons/ocb-addons-7.0_lp1096097_timesheet_inaccurate into lp:ocb-addons

Proposed by Ronald Portier (Therp)
Status: Work in progress
Proposed branch: lp:~ocb/ocb-addons/ocb-addons-7.0_lp1096097_timesheet_inaccurate
Merge into: lp:ocb-addons
Diff against target: 12 lines (+1/-1)
1 file modified
hr_timesheet/report/user_timesheet.py (+1/-1)
To merge this branch: bzr merge lp:~ocb/ocb-addons/ocb-addons-7.0_lp1096097_timesheet_inaccurate
Reviewer Review Type Date Requested Status
Ronald Portier (Therp) Needs Fixing
Stefan Rijnhart (Opener) Needs Information
Holger Brunn (Therp) Approve
Review via email: mp+175453@code.launchpad.net

Description of the change

Reproduces the change proposed for openobject-addons branch, but merge request by Dhruvit Darji for that project has stalled for some reason.

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

The original code is simply honouring the default UOM for time, which is 'day' by default. Although the outcome may be unexpected, the real solution is to add an option to the wizard that allows the user to set the desired UOM of the report. To get the report in hours instead of days, you can change the default time UOM in the system (although I am not sure what the consequences of this will be in the rest of the system).

I'd say the bug report is an opinion, and I think maybe the proposal should not be merged for this reason. What do you think?

review: Needs Information
Revision history for this message
Ronald Portier (Therp) (rportier1962) wrote :

I agree that the present merge proposal is to simplistic.

Report should be modified to show the UOM used for time.

Also user should get an easy option to change the default per report.

review: Needs Fixing
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

OK, thanks for your answer. I'll set this proposal as work-in-progress then.

Unmerged revisions

9335. By dhruvit.darji-openerp

[FIX] Inaccurate timesheet report
    Backport of fix by Dhruvit Darji that does the work but is already
    waiting since 2013-03-12 for being merged "soon".

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_timesheet/report/user_timesheet.py'
2--- hr_timesheet/report/user_timesheet.py 2012-12-06 15:13:16 +0000
3+++ hr_timesheet/report/user_timesheet.py 2013-07-18 05:38:29 +0000
4@@ -68,7 +68,7 @@
5 if user_id:
6 # Computing the attendence by analytical account
7 cr.execute(
8- "select line.date, (unit_amount / unit.factor) as amount, account_id, account.name "\
9+ "select line.date, unit_amount as amount, account_id, account.name "\
10 "from account_analytic_line as line, hr_analytic_timesheet as hr, "\
11 "account_analytic_account as account, product_uom as unit "\
12 "where hr.line_id=line.id and line.account_id=account.id "\