Merge lp:~openerp-commiter/openobject-client/6.0-opw-57686-nch into lp:openobject-client/6.0

Proposed by Naresh(OpenERP)
Status: Merged
Merged at revision: 1923
Proposed branch: lp:~openerp-commiter/openobject-client/6.0-opw-57686-nch
Merge into: lp:openobject-client/6.0
Diff against target: 20 lines (+2/-9)
1 file modified
bin/tools/datetime_util.py (+2/-9)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-client/6.0-opw-57686-nch
Reviewer Review Type Date Requested Status
Lorenzo Battistini Pending
Olivier Laurent (Open ERP) Pending
Review via email: mp+87904@code.launchpad.net

This proposal supersedes a proposal from 2012-01-06.

Description of the change

Hello,

The branch contains the fix for the case:57686 or bug lp:887612

Regards

To post a comment you must log in.
Revision history for this message
Lorenzo Battistini (elbati) wrote : Posted in a previous version of this proposal
review: Disapprove
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote : Posted in a previous version of this proposal

Hello Lorenzo,

Thanks for your feedback, yes you are right the final round was missing. can you please have a test now.

Regards,

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/tools/datetime_util.py'
2--- bin/tools/datetime_util.py 2010-12-23 06:12:37 +0000
3+++ bin/tools/datetime_util.py 2012-01-09 06:56:32 +0000
4@@ -157,15 +157,8 @@
5 tz_offset=tz_offset, ignore_unparsable_time=ignore_unparsable_time)
6
7 def float_time_convert(float_val):
8- hours = math.floor(abs(float_val))
9- mins = round(abs(float_val)%1+0.01,2)
10- if mins >= 1.0:
11- hours = hours + 1
12- mins = 0.0
13- else:
14- mins = mins * 60
15- float_time = '%02d:%02d' % (hours,mins)
16- return float_time
17+ float_time = '%02d:%02d' % (math.floor(abs(float_val)),round(round(abs(float_val)%1,2) * 60))
18+ return float_time
19
20 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
21