Tardo / OdooTerminal

Webextension tool for Odoo
GNU Affero General Public License v3.0
119 stars 27 forks source link

[BUG] Cannot use search #40

Closed yajo closed 2 years ago

yajo commented 2 years ago

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

Describe the bug

Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/custom/src/odoo/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/auto/addons/web/controllers/main.py", line 1339, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/auto/addons/web/controllers/main.py", line 1331, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 383, in call_kw
    result = _call_kw_model(method, model, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 356, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4959, in search_read
    result = records.read(fields)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 2951, in read
    raise ValueError("Invalid field %r on model %r" % (name, self._name))
ValueError: Invalid field '[["categ_ids"' on model 'project.task'

Expected behavior Searching.

Tardo commented 2 years ago

When executing a command with unnamed arguments you must respect the order of the arguments. You can know this either by the order of appearance when using "help" or in the wizard that appears as you type, after typing the command name and pressing space.

You can always mix named arguments with unnamed arguments: search project.task -d "[['categ_ids', 'not in', [20,42]]]"

yajo commented 2 years ago

🤦‍♂️ Of course. Thanks!