Tryton - Issues



Title Sao View.Form.Float fails on values with rounding errors
Priority bug Status testing
Superseder Nosy List ced, reviewbot, rvong
Type behavior Components sao
Assigned To ced Keywords Firefox, review
Reviews 282251003
View: 282251003

Created on 2019-09-19.17:29:12 by rvong, last changed by reviewbot.

review282251003 updated at
msg52448 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-12.19:06:50
It should be fixed with review282251003
msg51936 (view) Author: [hidden] (rvong) Date: 2019-09-19.17:29:12
In Sao branch 5.2, rev 90190d3ab0c3+ when you try to create a tax with a rate value that has potential round off error such as "12.87%", and save the record, then every time you load that tax record (by browsing through the records) the rate field is cleared blank and a the dialog message will popup asking if "you would like to save the record" as if the rate value was modified. This happens only in Sao, and no in Tryton client app. 

I am using Mozilla Firefox browser version 69.0 (64 bits) ubuntu linux. 

I looked into the Sao code and found that the problem comes from Sao.View.Form.Integer class at the function "get_value:" where there is a call to checkValidity() for the input. It appears that for the float value of 12.87 due to the round off error becomes 12.870000000000001 which fails the checkValidity() call, hence returns NaN.

If I bypass this check, the problem is fixed, but I believe this is not the ideal solution.
Date User Action Args
2019-10-12 19:08:08reviewbotsetnosy: + reviewbot
messages: + msg52449
2019-10-12 19:06:50cedsetstatus: unread -> testing
keyword: + review
nosy: + ced
messages: + msg52448
reviews: 282251003
assignedto: ced
2019-09-19 17:29:12rvongcreate

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