Tryton - Issues

 

Issue5233

Title Coma or point thousands/decimal separator
Priority feature Status resolved
Superseder Nosy List ced, pokoli, resteve, reviewbot, roundup-bot
Type feature request Components sao
Assigned To ced Keywords review
Reviews 43621002
View: 43621002

Created on 2016-01-07.11:13:01 by resteve, last changed by roundup-bot.

Messages
New changeset a3954339dc7e by C├ędric Krier in branch 'default':
Use input number and toLocaleString for numeric fields
http://hg.tryton.org/sao/rev/a3954339dc7e
msg37012 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-11-22.23:44:55
Now the focus on editable tree works correctly.
I think the selection is very minor behavior issue.
For me, it is ready to be pushed.
review43621002 updated at https://codereview.tryton.org/43621002/#ps20001
msg36685 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-11-02.14:34:38
The behavior of number input depends of the browser, see https://www.ctrl.blog/entry/html5-input-number-localization
msg36683 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-11-02.13:39:51
If given a test with catalan language and looks good. 

Not sure if we can do something with it but on gtk client we can use the numerical point as decimal separator despite the decimal separator is a coma. On sao we are forced to use the coma for decimal separator.
msg36379 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-19.22:48:58
I have a prototype with review43621002 which is based on number input and .toLocaleString.
I see only two drawbacks:

- when focusin to the widget, the content selected is not consistent with the other input. This  is because we change the focus in javascript. It is maybe possible to retrieve the selection of the text input and apply the same on the number input.

- on editable tree view the focus is not correctly set. It will probably requires to show directly the number input and set the focus on it.
New review43621002 at https://codereview.tryton.org/43621002/#ps1
msg31554 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-01-30.10:13:43
The format of numeral.js is not usable.
The license of wnumb.js does not seem to be acceptable.
accounting.js is probably the closest acceptable but it is a little bit fat.
msg31552 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-01-30.09:56:20
Also https://refreshless.com/wnumb/
msg31551 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-01-30.09:55:27
Maybe we can try some of this libraries:

http://openexchangerates.github.io/accounting.js/
http://numeraljs.com/

To format/unformat numerical values.
msg23589 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-01-07.11:44:16
This is just a feature request for sao. But I doubt we will ever implement a formatting and float input type doesn't see to be good enough.
msg23585 (view) Author: [hidden] (resteve) Date: 2016-01-07.11:13:00
Working with Spanish language, thousands separator is "." and decimal separator is ",".

* GTK client: working with separator language. Example: 1.345,10
* SAO client: use "." to decimal separator and not use thousands separator. Example: 1345.10
History
Date User Action Args
2018-03-22 23:19:17cedlinkissue6546 superseder
2017-11-27 22:18:14roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg37078
2017-11-22 23:44:56cedsetmessages: + msg37012
2017-11-22 23:43:13reviewbotsetmessages: + msg37011
2017-11-02 14:34:39cedsetmessages: + msg36685
2017-11-02 13:39:51pokolisetmessages: + msg36683
2017-10-19 22:48:58cedsetstatus: chatting -> testing
assignedto: ced
messages: + msg36379
2017-10-19 22:45:42reviewbotsetnosy: + reviewbot
messages: + msg36378
2017-10-19 22:45:42reviewbotsetreviews: 43621002
keyword: + review
2017-01-30 10:13:44cedsetmessages: + msg31554

Showing 10 items. Show all history (warning: this could be VERY long)