Tryton - Issues

 

Issue8532

Title Error value before reference when add negative number
Priority bug Status resolved
Superseder UnboundLocalError: local variable 'value' referenced before assignment
View: 8533
Nosy List pokoli, resteve, reviewbot, risto3, roundup-bot, semarie
Type crash Components tryton
Assigned To pokoli Keywords review
Reviews 285861002
View: 285861002

Created on 2019-07-25.16:11:18 by resteve, last changed by roundup-bot.

Messages
New changeset 95afb03bd50c by Sergi Almacellas Abellana in branch '5.2':
Do not test NumericEntry digits for non numeric values
https://hg.tryton.org/tryton/rev/95afb03bd50c
New changeset 418d4b3556ee by Sergi Almacellas Abellana in branch 'default':
Do not test NumericEntry digits for non numeric values
https://hg.tryton.org/tryton-env/rev/418d4b3556ee
New changeset 57355dea2a7b by Sergi Almacellas Abellana in branch 'default':
Do not test NumericEntry digits for non numeric values
https://hg.tryton.org/tryton/rev/57355dea2a7b
msg51411 (view) Author: [hidden] (semarie) Date: 2019-08-22.14:59:08
I tested it with both tip and 5.2 desktop client, and it fixes the problem.
review285861002 updated at https://codereview.tryton.org/285861002/#ps255891003
msg51403 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-08-22.14:23:47
Since changeset 9316fda6ac0a

Here is review285861002 that should fix it. Could you confirm?
msg50885 (view) Author: [hidden] (resteve) Date: 2019-07-25.16:11:17
GTK client:

When try to add negative quantity in Numeric field, I get:

  File "/home/resteve/projectes/nandev/tryton/tryton/common/number_entry.py", line 59, in do_insert_text
    if self.__digits is not None and round(value, self.__digits) != value:

UnboundLocalError: local variable 'value' referenced before assignment

Example:

1- Add new invoice line.
2- In qty field, add "-10" (negative)
History
Date User Action Args
2019-09-04 20:52:00roundup-botsetmessages: + msg51658
keyword: - backport
2019-08-30 09:00:57roundup-botsetmessages: + msg51570
2019-08-30 09:00:56roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg51569
2019-08-30 08:58:25pokolisetkeyword: + backport
2019-08-22 14:59:08semariesetmessages: + msg51411
2019-08-22 14:35:02reviewbotsetnosy: + reviewbot
messages: + msg51407
2019-08-22 14:23:47pokolisetstatus: unread -> testing
keyword: + review
nosy: + pokoli
messages: + msg51403
reviews: 285861002
assignedto: pokoli
type: crash
2019-08-17 18:29:29risto3setnosy: + risto3
2019-07-25 17:27:59semariesetnosy: + semarie
2019-07-25 17:05:07pokolisetsuperseder: + UnboundLocalError: local variable 'value' referenced before assignment

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