To make access to the notes on a record more easily I’ve added a new field to the model like:
messages = fields.One2Many('ir.note', 'resource', 'Notes')
In the view I added:
<page string="Notes" id="notes">
<field name="messages" colspan="4"/>
</page>
This worked in version 5.4 like you would expect. All the notes linked to that particular record are shown. However after upgrading to 6.0 I got an error from the client:
ERROR:tryton.common.common: File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/view/form_gtk/one2many.py", line 344, in _sig_new
self._new_single()
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/view/form_gtk/one2many.py", line 361, in _new_single
WinForm(self.screen, lambda a: update_sequence(), new=True,
File "/home/tryton/tryton-6.0.4/tryton/gui/window/win_form.py", line 54, in __init__
self.screen.new(rec_name=rec_name)
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/screen/screen.py", line 627, in new
group.add(record, self.new_position)
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/model/group.py", line 341, in add
self.signal('group-changed', record)
File "/home/tryton/tryton-6.0.4/tryton/signal_event.py", line 15, in signal
fnct(self, signal_data, *data)
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/model/field.py", line 551, in _group_changed
parent.signal('record-changed')
File "/home/tryton/tryton-6.0.4/tryton/signal_event.py", line 15, in signal
fnct(self, signal_data, *data)
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/model/group.py", line 448, in _record_changed
self.signal('group-changed', record)
File "/home/tryton/tryton-6.0.4/tryton/signal_event.py", line 15, in signal
fnct(self, signal_data, *data)
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/screen/screen.py", line 451, in _group_changed
self.display()
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/screen/screen.py", line 944, in display
view.display()
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/view/form.py", line 539, in display
widget.display()
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/view/form_gtk/one2many.py", line 534, in display
self.screen.display()
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/screen/screen.py", line 944, in display
view.display()
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/view/form.py", line 539, in display
widget.display()
File "/home/tryton/tryton-6.0.4/tryton/gui/window/view_form/view/form_gtk/multiselection.py", line 79, in display
self.update_selection(self.record, self.field)
File "/home/tryton/tryton-6.0.4/tryton/common/selection.py", line 58, in update_selection
self.init_selection(value)
File "/home/tryton/tryton-6.0.4/tryton/common/selection.py", line 31, in init_selection
and key not in self._values2selection):
TypeError: unhashable type: 'dict'
Is this a bug in the client and have I create a bug report or am I doing something wrong?