Issue 9955

Title
Filter search with Attributes changes small values to 0
Priority
bug
Status
resolved
Nosy list
ced, hdt551, reviewbot, roundup-bot
Assigned to
ced
Keywords
backport, review

Created on 2020-12-21.16:06:00 by hdt551, last changed 2 days ago by roundup-bot.

Messages

New changeset 6a8f3f797b64 by Cédric Krier in branch 'default':
Support float represented by exponential
https://hg.tryton.org/tryton-env/rev/6a8f3f797b64
New changeset a8eec0bd53ed by Cédric Krier in branch 'default':
Support float represented by exponential
https://hg.tryton.org/tryton/rev/a8eec0bd53ed
New changeset 0214b6f02291 by Cédric Krier in branch 'default':
Support float represented by exponential
https://hg.tryton.org/sao/rev/0214b6f02291
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-01-06.23:58:52

Here is review347261002 which support any value represented by exponential.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-12-21.16:11:11

It seems related to format_float of the domain_parser which use the string format of the value to compute the number of digits. I think we should use the .format and .toFixed with the maximum value to avoid exponential representation.

Author: [hidden] (hdt551)
Date: 2020-12-21.16:06:00

Reproduce by:
define a Attribute farad as float with 12 digits
enter Filter search like
Attributes.farad:>10e-12

when enter is pressed, the 10e-12 will change to 0 but the search will work correctly the first time, use the search again and the search will use the 0 instead of the entered 10e-12

This behavior is seen in V5.8

History
Date User Action Args
2021-01-18 23:30:25roundup-botsetmessages: + msg63971
2021-01-18 23:30:21roundup-botsetmessages: + msg63970
2021-01-18 23:30:19roundup-botsetmessages: + msg63969
nosy: + roundup-bot
status: testing -> resolved
2021-01-18 23:28:47cedsetkeyword: + backport
2021-01-07 00:20:59reviewbotsetmessages: + msg63794
nosy: + reviewbot
2021-01-06 23:58:52cedsetassignedto: ced
keyword: + review
messages: + msg63793
reviews: 347261002
status: chatting -> testing
2020-12-21 16:11:11cedsetcomponent: + tryton, sao
messages: + msg63553
nosy: + ced
status: unread -> chatting
2020-12-21 16:06:00hdt551create

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