float_time widget incorrect rounding
Bug #887612 reported by
Lorenzo Battistini
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo GTK Client (MOVED TO GITHUB) |
Confirmed
|
Low
|
OpenERP Publisher's Warranty Team | ||
Odoo Web (MOVED TO GITHUB) |
Invalid
|
Undecided
|
Unassigned | ||
Odoo Web Client |
Fix Released
|
Low
|
OpenERP Publisher's Warranty Team |
Bug Description
openobject-
see float_time_convert at
http://
0.9853 is converted to 1 hour while it should be 59 minutes,
because
98.53 : 100 = x : 60
and
98.53 × 60 ÷ 100 = 59.118 ≃ 59 minutes
but GTK client does
>>> round(abs(
1.0
Why isn't the proportion implemented?
Related branches
lp:~openerp-commiter/openobject-client/6.0-opw-57686-nch
- Lorenzo Battistini: Pending requested
- Olivier Laurent (Open ERP): Pending requested
-
Diff: 20 lines (+2/-9)1 file modifiedbin/tools/datetime_util.py (+2/-9)
lp:~openerp-dev/openobject-client-web/6.0-opw-57686-msh
- Lorenzo Battistini: Pending requested
- OpenERP Core Team: Pending requested
-
Diff: 27 lines (+3/-3)2 files modifiedaddons/openerp/validators.py (+1/-1)
addons/openerp/widgets/listgrid.py (+2/-2)
Changed in openobject-client: | |
assignee: | nobody → OpenERP sa GTK client R&D (openerp-dev-gtk) |
importance: | Undecided → Low |
status: | New → Confirmed |
summary: |
- float_time widget wrongly rounds + float_time widget incorrect rounding |
tags: | added: maintenance |
Changed in openobject-client: | |
assignee: | OpenERP sa GTK client R&D (openerp-dev-gtk) → OpenERP Publisher's Warranty Team (openerp-opw) |
Changed in openobject-client: | |
status: | Confirmed → Fix Committed |
Changed in openobject-client: | |
milestone: | none → 6.0.4 |
Changed in openobject-client-web: | |
milestone: | none → 6.0.4 |
To post a comment you must log in.
The problem here is not the proportion: the multiplication for 60 is done on line 166.
Still, we should figure out why on line 161, we add 0.01 and then round() (as opposed to floor() or not adding 0.01 )