-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bad call formation #39
Comments
You might want to try removing 1 or 2 sets of brackets in the domain
argument. Not sure though.
…On Fri, Oct 18, 2024 at 10:01 AM mwolfeu ***@***.***> wrote:
This is probably my issue entirely.
I looked at the odoo docs and I'm trying to get a count of some records as
they did there.
When I execute:
const unique_product_count = await this.odoo.execute_kw('res.partner',
'search_count', [[['is_company', '=', True]]]);
I get the error below. I'd be grateful for any clarification on what part
of the call I formed incorrectly.
For context, I'm successfully using all the crud methods, so it isn't a
connection issue.
Thanks!
Error Below:
ERROR Failed to process request: XML-RPC fault: Traceback (most recent
call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/controllers/rpc.py",
line 147, in xmlrpc_2
response = self._xmlrpc(service)
File "/usr/lib/python3/dist-packages/odoo/addons/base/controllers/rpc.py",
line 127, in _xmlrpc
result = dispatch_rpc(service, method, params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 391, in
dispatch_rpc
return dispatch(method, params)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 37, in
dispatch
res = execute_kw(db, uid, *params[3:])
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 59, in
execute_kw
return execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 65, in
execute
res = execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 50, in
execute_cr
result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in
retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/api.py", line 464, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 435, in
_call_kw_model
result = method(recs, *args, **kwargs)
TypeError: BaseModel.search_count() missing 1 required positional
argument: 'domain'
File "/usr/lib/python3/dist-packages/odoo/addons/base/controllers/rpc.py",
line 147, in xmlrpc_2
response = self._xmlrpc(service)
File "/usr/lib/python3/dist-packages/odoo/addons/base/controllers/rpc.py",
line 127, in _xmlrpc
result = dispatch_rpc(service, method, params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 391, in
dispatch_rpc
return dispatch(method, params)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 37, in
dispatch
res = execute_kw(db, uid, *params[3:])
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 59, in
execute_kw
return execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 65, in
execute
res = execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 50, in
execute_cr
result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in
retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/api.py", line 464, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 435, in
_call_kw_model
result = method(recs, *args, **kwargs)
TypeError: BaseModel.search_count() missing 1 required positional
argument: 'domain'
at createFault (node_modules/xmlrpc/lib/deserializer.js:83:21)
at Deserializer.onDone (node_modules/xmlrpc/lib/deserializer.js:89:21)
at SAXStream.emit (node:events:517:28)
at SAXStream._parser.onend (node_modules/sax/lib/sax.js:190:10)
at emit (node_modules/sax/lib/sax.js:624:35)
at end (node_modules/sax/lib/sax.js:667:5)
at SAXParser.end (node_modules/sax/lib/sax.js:154:24)
at SAXStream.end (node_modules/sax/lib/sax.js:248:18)
at IncomingMessage.onend (node:internal/streams/readable:748:10)
at Object.onceWrapper (node:events:631:28)
—
Reply to this email directly, view it on GitHub
<#39>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYFFLESR4MZMNSU4LDD4JLZ4EPD7AVCNFSM6AAAAABQGEPPRSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4TONZXGU3DKMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Tried every combo I could think of . If no one has concrete advice, I guess I'll try the JSON xmlrpc npm. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is probably my issue entirely.
I looked at the odoo docs and I'm trying to get a count of some records as they did there.
When I execute:
const unique_partner_count = await this.odoo.execute_kw('res.partner', 'search_count', [[['is_company', '=', True]]]);
I get the error below. I'd be grateful for any clarification on what part of the call I formed incorrectly.
For context, I'm successfully using all the crud methods, so it isn't a connection issue.
Thanks!
Error Below:
ERROR Failed to process request: XML-RPC fault: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/controllers/rpc.py", line 147, in xmlrpc_2
response = self._xmlrpc(service)
File "/usr/lib/python3/dist-packages/odoo/addons/base/controllers/rpc.py", line 127, in _xmlrpc
result = dispatch_rpc(service, method, params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 391, in dispatch_rpc
return dispatch(method, params)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 37, in dispatch
res = execute_kw(db, uid, *params[3:])
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 59, in execute_kw
return execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 65, in execute
res = execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 50, in execute_cr
result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/api.py", line 464, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 435, in _call_kw_model
result = method(recs, *args, **kwargs)
TypeError: BaseModel.search_count() missing 1 required positional argument: 'domain'
File "/usr/lib/python3/dist-packages/odoo/addons/base/controllers/rpc.py", line 147, in xmlrpc_2
response = self._xmlrpc(service)
File "/usr/lib/python3/dist-packages/odoo/addons/base/controllers/rpc.py", line 127, in _xmlrpc
result = dispatch_rpc(service, method, params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 391, in dispatch_rpc
return dispatch(method, params)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 37, in dispatch
res = execute_kw(db, uid, *params[3:])
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 59, in execute_kw
return execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 65, in execute
res = execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 50, in execute_cr
result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/api.py", line 464, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 435, in _call_kw_model
result = method(recs, *args, **kwargs)
TypeError: BaseModel.search_count() missing 1 required positional argument: 'domain'
at createFault (node_modules/xmlrpc/lib/deserializer.js:83:21)
at Deserializer.onDone (node_modules/xmlrpc/lib/deserializer.js:89:21)
at SAXStream.emit (node:events:517:28)
at SAXStream._parser.onend (node_modules/sax/lib/sax.js:190:10)
at emit (node_modules/sax/lib/sax.js:624:35)
at end (node_modules/sax/lib/sax.js:667:5)
at SAXParser.end (node_modules/sax/lib/sax.js:154:24)
at SAXStream.end (node_modules/sax/lib/sax.js:248:18)
at IncomingMessage.onend (node:internal/streams/readable:748:10)
at Object.onceWrapper (node:events:631:28)
The text was updated successfully, but these errors were encountered: