Domain inversion with an 'in' on multivalued fields result in a crash
When the domain inversion on a multi valued field (in this case a MultiSelection
field but I guess it could happen with O2MField
s too) that is using an 'in'
in its domain returns a unique value, this value is set on the on field but it results in a crash such as this one:
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/gui/window/win_search.py", line 148, in response
WinForm(screen, callback, new=True, save_current=True)
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/gui/window/win_form.py", line 55, in __init__
self.screen.new(rec_name=rec_name)
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/gui/window/view_form/screen/screen.py", line 719, in new
self.display()
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/gui/window/view_form/screen/screen.py", line 1048, in display
view.display(force=force)
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/gui/window/view_form/view/form.py", line 549, in display
widget.display()
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/gui/window/view_form/view/form_gtk/multiselection.py", line 97, in display
selection.select_path(value2path[value])
~~~~~~~~~~^^^^^^^
KeyError: 'a'
(python looped over the chars of the string returned by unique_value
, in case of a O2M I guess the error will be slightly different.