Issue 11611

Title
Tryton client crashing on empty domain operand in M2OField
Priority
bug
Status
resolved
Nosy list
ced, reviewbot, roundup-bot, srgdts
Assigned to
ced
Keywords
review

Created on 2022-07-28.18:29:15 by srgdts, last changed 1 month ago by roundup-bot.

Messages

New changeset 713e10748642 by Cédric Krier in branch '6.4':
Ensure company domain has the right type
https://hg.tryton.org/modules/account/rev/713e10748642

New changeset b9695b133d0d by Cédric Krier in branch '6.2':
Ensure company domain has the right type
https://hg.tryton.org/modules/account/rev/b9695b133d0d

New changeset 6ab2a1c0e5b2 by Cédric Krier in branch '6.0':
Ensure company domain has the right type
https://hg.tryton.org/modules/account/rev/6ab2a1c0e5b2

New changeset d46a5a58a28b by Cédric Krier in branch '5.0':
Ensure company domain has the right type
https://hg.tryton.org/modules/account/rev/d46a5a58a28b

New changeset 045dc2a3e1c0 by Cédric Krier in branch '6.4':
Add company to tree view
https://hg.tryton.org/modules/account/rev/045dc2a3e1c0
New changeset 764b834538aa by Cédric Krier in branch 'default':
Ensure company domain has the right type
https://hg.tryton.org/tryton-env/rev/764b834538aa

New changeset 6cbb6d4c028e by Cédric Krier in branch 'default':
Add company to tree view
https://hg.tryton.org/tryton-env/rev/6cbb6d4c028e
New changeset b93e0a86f433 by Cédric Krier in branch 'default':
Ensure company domain has the right type
https://hg.tryton.org/modules/account/rev/b93e0a86f433

New changeset 1bf313a302b5 by Cédric Krier in branch 'default':
Add company to tree view
https://hg.tryton.org/modules/account/rev/1bf313a302b5
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-07-28.19:47:42

It should be fixed with review417591003.

Author: [hidden] (srgdts)
Date: 2022-07-28.18:47:13

I'm using Tryton 6.4.1 client connecting to demo6.4.tryton.org:8000

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 (Ctrl+L)
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-07-28.18:42:45

For me there is something wrong in your data model because a Many2One can not have a string as value.

Author: [hidden] (srgdts)
Date: 2022-07-28.18:30:29

Tryton version: 6.4.1

Author: [hidden] (srgdts)
Date: 2022-07-28.18:29:15

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-08-13 19:15:41roundup-botsetkeyword: - backport
messages: + msg77700
2022-08-06 10:45:34roundup-botsetmessages: + msg77612
2022-08-06 10:45:18roundup-botsetmessages: + msg77611
nosy: + roundup-bot
status: testing -> resolved
2022-07-29 09:18:15pokolisetkeyword: + backport
2022-07-28 19:49:47reviewbotsetmessages: + msg77495
nosy: + reviewbot
2022-07-28 19:47:42cedsetmessages: + msg77494
2022-07-28 19:47:30cedsetkeyword: + review
reviews: 417591003
status: in-progress -> testing
2022-07-28 19:42:04cedsetassignedto: ced
component: + account, - tryton
status: need-eg -> in-progress
2022-07-28 18:47:13srgdtssetmessages: + msg77493
2022-07-28 18:42:45cedsetmessages: + msg77492
nosy: + ced
status: unread -> need-eg
2022-07-28 18:30:29srgdtssetmessages: + msg77491
2022-07-28 18:29:15srgdtscreate