Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qc.test.object_id selection only offers invalid choices #1286

Open
cparadis777 opened this issue Jun 14, 2024 · 1 comment
Open

qc.test.object_id selection only offers invalid choices #1286

cparadis777 opened this issue Jun 14, 2024 · 1 comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@cparadis777
Copy link

Module

quality_control_oca

Describe the bug

The first selection menu of the qc.test.object_id field has 5 "empty" (no selection text) choices: "S", "e", "t", "(", ")".
No matter which value is selected, trying to select a model from the second selection menu causes an Odoo server error to appear.

To Reproduce

Affected versions: 14, 15, 16, 17
The same bug was reported previously, but marked stale:
V14: #823
V12: #562
I have reproduced the bug in runboat for V14, V15, V16 and V17 myself.

Steps to reproduce the behavior:

  1. Create a new related test
  2. Set the first selection of the object_id field
  3. Try to selected a related model

Expected behavior
The user should be able to select a model from the second selection menu, and the options in the first selection menu should be visible.

Additional context

I don't have much experience with the module, but I checked the code and it seems the error would be located in QcTest.objectSelectionValue() method:

Odoo server error trace:
Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 1748, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/opt/odoo/odoo/http.py", line 1775, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo/odoo/http.py", line 1979, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo/odoo/http.py", line 725, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/api.py", line 534, in getitem
return self.registry[model_name](self, (), ())
File "/opt/odoo/odoo/modules/registry.py", line 213, in getitem
return self.models[model_name]
KeyError: 't'

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPCError@http://oca-manufacture-17-0-4d44182ab4e5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:27806:9 (/web/static/src/core/network/rpc_service.js:11)
makeErrorFromResponse@http://oca-manufacture-17-0-4d44182ab4e5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:27832:19 (/web/static/src/core/network/rpc_service.js:37)
jsonrpc/promise</<@http://oca-manufacture-17-0-4d44182ab4e5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:27880:48 (/web/static/src/core/network/rpc_service.js:85)

Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant