Tryton - Issues

 

Issue8707

Title Unable to enter unit_price bigger that 596
Priority bug Status resolved
Superseder Nosy List ced, pokoli, reviewbot, roundup-bot
Type behavior Components sao
Assigned To ced Keywords review
Reviews 258301002
View: 258301002

Created on 2019-10-04.17:17:40 by pokoli, last changed by roundup-bot.

Messages
New changeset 3b3226ff13b6 by Cédric Krier in branch '5.2':
Round step value
https://hg.tryton.org/sao/rev/3b3226ff13b6
New changeset 231af670cc7c by Cédric Krier in branch 'default':
Round step value
https://hg.tryton.org/tryton-env/rev/231af670cc7c
New changeset deafb0b64c11 by Cédric Krier in branch 'default':
Round step value
https://hg.tryton.org/sao/rev/deafb0b64c11
review258301002 updated at https://codereview.tryton.org/258301002/#ps266191003
msg52453 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-12.22:58:32
Here is review258301002 which seems to fix it.
msg52284 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-04.18:05:15
I think the best solution is to use:

Math.pow(10, -digits[1]).toFixed(digits[1])
msg52283 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-04.18:02:53
Some information about that: https://stackoverflow.com/a/55959216/687601
msg52282 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-04.17:59:43
The problem comes from the computation of the step which is: Math.pow(10, -4) and chrome compute it as 0.00009999999999999999 instead of 0.0001.
msg52280 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-10-04.17:17:40
When using the chrome browser it is not possible to enter a quantity bigger thatn 596, the field gets blank.

It works as wexpected with 596 but not with 597. 

It's easy to reproduce it on demo5.2.tryton.org.

Everything works as expected on Firefox.
History
Date User Action Args
2019-10-31 00:00:50roundup-botsetmessages: + msg52820
keyword: - backport
2019-10-24 19:17:52cedsetkeyword: + backport
2019-10-24 19:17:45roundup-botsetmessages: + msg52690
2019-10-24 19:17:42roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg52689
2019-10-12 23:13:31reviewbotsetnosy: + reviewbot
messages: + msg52457
2019-10-12 22:58:32cedsetstatus: chatting -> testing
reviews: 258301002
messages: + msg52453
keyword: + review
assignedto: ced
2019-10-07 09:15:14pokolisettitle: Unable to enter unti_price bigger that 596 -> Unable to enter unit_price bigger that 596
2019-10-04 18:05:16cedsetmessages: + msg52284
2019-10-04 18:02:53cedsetmessages: + msg52283
2019-10-04 17:59:43cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg52282

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