Float widget: commas increase the amount

Bug #934196 reported by Guewen Baconnier @ Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP R&D Web Team

Bug Description

Hello,

This one is easy to reproduce :

 - Go to runbot
 - Create a new invoice
 - Open an invoice line
 - In the quantity field, type "1,0" with a comma instead of a dot (should be "1.0")
 - In the price field, type "45,0" instead of "45.0"
 - Save your line

Check the amounts, you will get 10.0 and 450.0 instead of 1.0 and 45.0

Happy release time ;-)

Guewen

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

In the default (US) configuration, the comma is taken as a separator of the integer part, it is thus removed before parsing. You can also configure your language to use "," as the decimal separator (that's the default for e.g. the french language).

Not sure we're going to change anything there (or how), but putting this as a wishlist for now.

Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : Re: [Bug 934196] Re: Float widget: commas increase the amount

I understand and don't know exactly how to handle that me neither.

Problem is that the user won't necessarily see what happened because it
happens when you save your resource.
Maybe the webclient should directly remove them so the user realizes what
happens. But it depends on the locale configuration, isn't it? So maybe
that's not possible?

This issue won't really happen when you're typing in the fields because you
know what you type.

The problem is mainly when you're copy-pasting data from another source
(website or whatever), which use a comma as decimal separator. You don't
notice it and don't notice that your field is not stored correctly.

It can happen frequently for users which fast-encode a lot of data with
copy-paste.

But I have to admit that I don't have any implementation solution, so keep
it running as is for now.

Anyway thanks for your attention
*Guewen*
 Le 17 févr. 2012 17:20, "Xavier (Open ERP)" <email address hidden> a
écrit :

> In the default (US) configuration, the comma is taken as a separator of
> the integer part, it is thus removed before parsing. You can also
> configure your language to use "," as the decimal separator (that's the
> default for e.g. the french language).
>
> Not sure we're going to change anything there (or how), but putting this
> as a wishlist for now.
>
> ** Changed in: openerp-web
> Importance: Undecided => Wishlist
>
> ** Changed in: openerp-web
> Status: New => Confirmed
>
> ** Changed in: openerp-web
> Assignee: (unassigned) => OpenERP R&D Web Team (openerp-dev-web)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/934196
>
> Title:
> Float widget: commas increase the amount
>
> Status in OpenERP Web:
> Confirmed
>
> Bug description:
> Hello,
>
> This one is easy to reproduce :
>
> - Go to runbot
> - Create a new invoice
> - Open an invoice line
> - In the quantity field, type "1,0" with a comma instead of a dot
> (should be "1.0")
> - In the price field, type "45,0" instead of "45.0"
> - Save your line
>
> Check the amounts, you will get 10.0 and 450.0 instead of 1.0 and 45.0
>
> Happy release time ;-)
>
> Guewen
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openerp-web/+bug/934196/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.