Issue 11466

Title
Opening inventories raises an error
Priority
bug
Status
resolved
Nosy list
edbo, roundup-bot
Assigned to
edbo
Keywords
review

Created on 2022-05-06.14:49:29 by edbo, last changed 4 months ago by roundup-bot.

Messages

New changeset eb3a13c92deb by EdbO in branch '6.4':
Rename inventory count button action
https://hg.tryton.org/modules/stock/rev/eb3a13c92deb

New changeset 910ec3282814 by EdbO in branch '6.2':
Rename inventory count button action
https://hg.tryton.org/modules/stock/rev/910ec3282814
New changeset c9db5001b999 by C├ędric Krier in branch 'default':
Rename inventory count button action
https://hg.tryton.org/tryton-env/rev/c9db5001b999
New changeset 765394e19ac2 by EdbO in branch 'default':
Rename inventory count button action
https://hg.tryton.org/modules/stock/rev/765394e19ac2
Author: [hidden] (edbo)
Date: 2022-05-06.16:34:17
Author: [hidden] (edbo)
Date: 2022-05-06.15:28:11

Tryton get confused by naming the counting function count in https://hg.tryton.org/modules/stock/file/tip/inventory.py#l314 This is because in the XML there is also a count https://hg.tryton.org/modules/stock/file/tip/inventory.xml#l40 It seems Tryton is mixing these two up and raises the error.

Changing the function count into do_count fixes it.

Author: [hidden] (edbo)
Date: 2022-05-06.14:49:29

When you open Inventories from the Inventory & Stock menu, an error is raised:

Traceback (most recent call last):
  File "/usr/local/lib/python39/dist-packages/trytond/wsgipy", line 119, in dispatch_request
    return endpoint(request, **requestview_args)
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/dispatcherpy", line 46, in rpc
    return methodsget(requestrpc_method, _dispatch)(
  File "/usr/local/lib/python39/dist-packages/trytond/wsgipy", line 86, in auth_required
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/wrapperspy", line 161, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/dispatcherpy", line 181, in _dispatch
    result = rpcresult(meth(*c_args, **c_kwargs))
  File "/usr/local/lib/python39/dist-packages/trytond/model/modelstoragepy", line 551, in search_count
    res = clssearch(
  File "/usr/local/lib/python39/dist-packages/trytond/model/modelsqlpy", line 1493, in search
    if (limit is not None and limit < clscount()) or offset:
  File "/usr/local/lib/python39/dist-packages/trytond/model/modelviewpy", line 721, in wrapper
    value = func(*args, **kwargs)
TypeError: wrapper() missing 1 required positional argument: 'records'

This is fully reproducible on the demo6.4.tryton.org

History
Date User Action Args
2022-06-05 21:01:05cedlinkissue11551 superseder
2022-05-23 14:20:54cedlinkissue11507 superseder
2022-05-14 17:28:24roundup-botsetkeyword: - backport
messages: + msg76649
2022-05-07 18:51:27roundup-botsetmessages: + msg76547
2022-05-07 18:51:19roundup-botsetmessages: + msg76544
nosy: + roundup-bot
status: testing -> resolved
2022-05-07 10:48:33cedsetkeyword: + backport
2022-05-07 10:45:19cedsetassignedto: edbo
status: unread -> testing
2022-05-07 10:37:26cedsetreviews: https://codereview.tryton.org/447071003/ -> 447071003
2022-05-06 16:34:17edbosetkeyword: + review
messages: + msg76509
reviews: https://codereview.tryton.org/447071003/
2022-05-06 15:28:11edbosetmessages: + msg76505
2022-05-06 14:49:29edbocreate