Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Tryton Tryton
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 714
    • Issues 714
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 71
    • Merge requests 71
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • TrytonTryton
  • TrytonTryton
  • Issues
  • #11968
Closed
Open
Issue created Dec 28, 2022 by Jesús Moreno Ramírez@Birlibirloque

Error when filtering multiselection fields

When I open the filter menu in the client, I get the following error message:

ERROR:tryton.common.common:  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/gui/window/view_form/view/screen_container.py", line 547, in icon_press
    self.search_box(widget)
  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/gui/window/view_form/view/screen_container.py", line 617, in search_box
    selections = tuple(x[1] for x in field['selection'])
  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/gui/window/view_form/view/screen_container.py", line 617, in <genexpr>
    selections = tuple(x[1] for x in field['selection'])

IndexError: string index out of range

And if I write to filter by putting a colon, the client throws an error and goes into a loop without letting me do anything. I have to close it and open it again

ERROR:tryton.common.common:  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/gui/window/view_form/view/screen_container.py", line 541, in keypress
    self.update()
  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/gui/window/view_form/view/screen_container.py", line 397, in update
    res = self.screen.search_complete(self.get_text())
  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/gui/window/view_form/screen/screen.py", line 269, in search_complete
    return list(self.domain_parser.completion(search_string))
  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/common/domain_parser.py", line 685, in completion
    for complete in self.complete(ending):
  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/common/domain_parser.py", line 746, in complete
    for comp in complete_value(field, value):
  File "/home/pc/.virtualenvs/tryton60/lib/python3.8/site-packages/tryton/common/domain_parser.py", line 431, in complete_selection
    for svalue, test in field['selection']:

ValueError: not enough values to unpack (expected 2, got 1)

I have explored and tried things and it only happens with multiselection and if the options are obtained through a get_X. When printing field[selection] in that line screen_container.py I get 'get_types' instead of the tuple with the values

I checked that problem with server 6.0.25 and client 6.0.21 in Work status menu point and Address subdivision types menu points

Edited Dec 28, 2022 by Jesús Moreno Ramírez
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking