Tryton - Issues

 

Issue8258

Title AttributeError: 'ComboBox' object has no attribute 'get_active_text'
Priority bug Status resolved
Superseder Nosy List albertca, ced, reviewbot, roundup-bot
Type crash Components tryton
Assigned To ced Keywords review
Reviews 273301002
View: 273301002

Created on 2019-04-04.15:54:42 by albertca, last changed by roundup-bot.

Messages
New changeset f7ae8ca07135 by Cédric Krier in branch 'default':
Properly retrieve text value from ComboBox
https://hg.tryton.org/tryton-env/rev/f7ae8ca07135
New changeset 57e5d30f2b43 by Cédric Krier in branch 'default':
Properly retrieve text value from ComboBox
https://hg.tryton.org/tryton/rev/57e5d30f2b43
review273301002 updated at https://codereview.tryton.org/273301002/#ps283261002
msg49066 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-15.22:35:46
I tested and as I said in review281341002, entry-text-column return an integer. It may not fail because the value is not used by the Selection widget later but it may trigger a unnecessary validation.
Here is review273301002 with a proper retrieval of text value.
review281341002 updated at https://codereview.tryton.org/281341002/#ps275221002
msg48389 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-04.16:13:50
I do not think it is right to make assumption on the child of a ComboBox. The text should be retrieved from the model and using the index entry-text-column.
msg48388 (view) Author: [hidden] (albertca) (Tryton committer) Date: 2019-04-04.15:54:41
A crash is produced obtained when trying to change the value of a selection field in an editable tree view.

The problem comes from the usage of:

entry.get_active_text

instead of:

entry.get_child().get_active_text()
History
Date User Action Args
2019-04-23 12:05:07roundup-botsetmessages: + msg49169
2019-04-23 12:05:05roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg49168
2019-04-15 23:04:47reviewbotsetmessages: + msg49067
2019-04-15 22:35:46cedsetreviews: 281341002 -> 273301002
assignedto: albertca -> ced
messages: + msg49066
2019-04-05 00:17:14reviewbotsetnosy: + reviewbot
messages: + msg48417
2019-04-04 23:50:08albertcasetstatus: unread -> testing
2019-04-04 23:50:02albertcasetstatus: chatting -> unread
reviews: 281341002
keyword: + review
2019-04-04 16:13:50cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg48389
2019-04-04 15:54:42albertcacreate