Tryton - Issues



Title Missing None check when searching for several values using ';'.
Priority bug Status in-progress
Superseder Nosy List albertca, reviewbot
Type crash Components tryton
Assigned To albertca Keywords review
Reviews 41511002
View: 41511002

Created on 2017-08-10.14:33:12 by albertca, last changed by reviewbot.

review41511002 updated at
review41511002 updated at
msg35116 (view) Author: [hidden] (albertca) (Tryton committer) (Tryton translator) Date: 2017-08-10.14:33:11
Searching on a selection field where its possible values have spaces in between requires the user to use double quotes. In this scenario, in the Catalan language, searching on account.payment on the "Payment Kind" field, it crashes when the user introduces the last double quotes symbol:

"Classe de pagament": "A pagar";"

with the following traceback:

Traceback (most recent call last):
  File "/home/albert/d/hg/guillen/tryton/tryton/gui/window/view_form/view/", line 420, in keypress
  File "/home/albert/d/hg/guillen/tryton/tryton/gui/window/view_form/view/", line 320, in update
    res = self.screen.search_complete(self.get_text())
  File "/home/albert/d/hg/guillen/tryton/tryton/gui/window/view_form/screen/", line 242, in search_complete
    return list(self.domain_parser.completion(search_string))
  File "/home/albert/d/hg/guillen/tryton/tryton/common/", line 993, in completion
    for complete in self.complete(ending):
  File "/home/albert/d/hg/guillen/tryton/tryton/common/", line 1054, in complete
    for comp in complete_value(field, value):
  File "/home/albert/d/hg/guillen/tryton/tryton/common/", line 690, in complete_selection
    test_value = test_value.strip('%')
AttributeError: 'NoneType' object has no attribute 'strip'
Date User Action Args
2017-08-18 00:42:30reviewbotsetmessages: + msg35244
2017-08-10 14:43:00reviewbotsetnosy: + reviewbot
messages: + msg35118
2017-08-10 14:33:12albertcacreate

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