Tryton - Issues

 

Issue8707

Title Unable to enter unit_price bigger that 596
Priority bug Status testing
Superseder Nosy List ced, pokoli, reviewbot
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 reviewbot.

Messages
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-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
2019-10-04 17:17:40pokolicreate

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