Message 77490

Author
srgdts
Date
2022-07-28.18:29:15
Message id
77490

Content

Tryton client crashing on empty domain operand in M2OField.

Steps to reproduce: * Connect with tryton to demo6.4.tryton.org:8000 * Go to Financial -> Configuration -> General Account -> Account Types * Open Minimal Account Type Chart * Select Asset * Switch View

Stack Trace:

  File "/usr/lib/python3.10/site-packages/tryton/gui/window/form.py", line 291, in sig_switch
    self.screen.switch_view()
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/screen/screen.py", line 582, in switch_view
    self.display()
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/screen/screen.py", line 974, in display
    view.display()
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/view/form.py", line 531, in display
    record[field].get(record)
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/model/record.py", line 144, in __getitem__
    record.set(value, modified=False)
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/model/record.py", line 481, in set
    self.validate(fieldnames, softvalidation=True)
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/model/record.py", line 407, in validate
    if not field.validate(self, softvalidation, pre_validate):
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/model/field.py", line 134, in validate
    self.set_client(record, value)
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/model/field.py", line 513, in set_client
    super(M2OField, self).set_client(record, value,
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/model/field.py", line 156, in set_client
    self.set(record, value)
  File "/usr/lib/python3.10/site-packages/tryton/gui/window/view_form/model/field.py", line 518, in set
    if not rec_name and value is not None and value >= 0:

TypeError: '>=' not supported between instances of 'str' and 'int'
History
Date User Action Args
2022-07-28 18:29:15srgdtssetmessageid: <1659025755.471891.JGJLUMRGS5E3BIWK.issue11611@tryton.org>
2022-07-28 18:29:15srgdtslinkissue11611 messages
2022-07-28 18:29:15srgdtscreate

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