Skip to Content
Menu
This question has been flagged
1 Reply
3909 Views

Dears,

Any solution for the error below in odoo 10?

File "/opt/odoo/odoo/models.py", line 1509, in search

    res = self._search(args, offset=offset, limit=limit, order=order, count=count)

  File "/opt/odoo/odoo/models.py", line 4217, in _search

    order_by = self._generate_order_by(order, query)

  File "/opt/odoo/odoo/models.py", line 4191, in _generate_order_by

    order_by_elements = self._generate_order_by_inner(self._table, order_spec, query)

  File "/opt/odoo/odoo/models.py", line 4145, in _generate_order_by_inner

    self._check_qorder(order_spec)

  File "/opt/odoo/odoo/models.py", line 4025, in _check_qorder

    raise UserError(_('Invalid "order" specified. A valid "order" specification is a comma-separated list of valid field names (optionally followed by asc/desc for the direction)'))

Thanks in advance



Avatar
Discard
Best Answer

Hi lin,

Can you please provide the search domain you wrote? ..a snippet of your code

Avatar
Discard
Author

products = Product.search(domain, limit=ppg, offset=pager['offset'],

order=self._get_search_order(post))

odoo.addons.http_routing.models.ir_http: 400 Bad Request:

Traceback (most recent call last):

File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 229, in _dispatch

result = request.dispatch()

File "/odoo/odoo-server/odoo/http.py", line 809, in dispatch

r = self._call_function(**self.params)

File "/odoo/odoo-server/odoo/http.py", line 350, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper

return f(dbname, *args, **kwargs)

File "/odoo/odoo-server/odoo/http.py", line 339, in checked_call

result = self.endpoint(*a, **kw)

File "/odoo/odoo-server/odoo/http.py", line 915, in __call__

return self.method(*args, **kw)

File "/odoo/odoo-server/odoo/http.py", line 515, in response_wrap

response = f(*args, **kw)

File "/odoo/odoo-server/addons/website_sale/controllers/main.py", line 253, in shop

search_product = Product.search(domain, order=self._get_search_order(post))

File "/odoo/odoo-server/odoo/models.py", line 1618, in search

res = self._search(args, offset=offset, limit=limit, order=order, count=count)

File "/odoo/odoo-server/odoo/models.py", line 4384, in _search

order_by = self._generate_order_by(order, query)

File "/odoo/odoo-server/odoo/models.py", line 4288, in _generate_order_by

order_by_elements = self._generate_order_by_inner(self._table, order_spec, query)

File "/odoo/odoo-server/odoo/models.py", line 4241, in _generate_order_by_inner

self._check_qorder(order_spec)

File "/odoo/odoo-server/odoo/models.py", line 4122, in _check_qorder

raise UserError(_('Invalid "order" specified. A valid "order" specification is a comma-separated list of valid field names (optionally followed by asc/desc for the direction)'))

odoo.exceptions.UserError: ('Invalid "order" specified. A valid "order" specification is a comma-separated list of valid field names (optionally followed by asc/desc for the direction)', '')

HERE IS THE SAME PROBLEM PLEASE HELP