Skip to main content
Best answer

Unable to pull lead: Error while retrieving: Odoo API Error

  • September 28, 2024
  • 3 replies
  • 46 views

Unable to pull leads

Please reload the page. If the issue persists, troubleshoot error or contact Support.

Error code: Error while retrieving: Odoo API Error (BaseModel.search() takes from 2 to 5 positional arguments but 6 were given): Traceback (most recent call last): File "/odoo/odoo-server/odoo/addons/base/controllers/rpc.py", line 138, in xmlrpc_1 response = self._xmlrpc(service) File "/odoo/odoo-server/odoo/addons/base/controllers/rpc.py", line 127, in _xmlrpc result = dispatch_rpc(service, method, params) File "/odoo/odoo-server/odoo/http.py", line 391, in dispatch_rpc return dispatch(method, params) File "/odoo/odoo-server/odoo/service/model.py", line 35, in dispatch res = execute(db, uid, *params[3:]) File "/odoo/odoo-server/odoo/service/model.py", line 65, in execute res = execute_cr(cr, uid, obj, method, *args, **kw) File "/odoo/odoo-server/odoo/service/model.py", line 50, in execute_cr result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env) File "/odoo/odoo-server/odoo/service/model.py", line 133, in retrying result = func() File "/odoo/odoo-server/odoo/api.py", line 464, in call_kw result = _call_kw_model(method, model, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 435, in _call_kw_model result = method(recs, *args, **kwargs) TypeError: BaseModel.search() takes from 2 to 5 positional arguments but 6 were given

Best answer by ken.a

Hi there @Vignesh Rajendran,

Welcome to the Community! 🎉

I did some digging into this and it seems like the error you’re running into is a known bug with the “New Lead/Opportunity” trigger in Odoo ERP Self Hosted app. Our team is aware of the issue and is working on a fix. I've added your email address as another affected user. That does a few things:

  • Bring this to the attention of the integration developers
  • Help track and prioritize fixes
  • Allows us to notify you via email if/when this is fixed

Unfortunately, I do not have an ETA, but I’ve added you to the list of users affected by this issue so we can let you know as soon as we have any updates.

In the meantime, you can stay in the loop/follow along with updates on the main thread here: 

I appreciate your patience and understanding.

 

For anyone that comes across this and wants to be added please reach out on the main topic for this issue here and we’ll get you added to the bug report.

View original
Did this topic help you find an answer to your question?

3 replies

ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • 6301 replies
  • Answer
  • September 30, 2024

Hi there @Vignesh Rajendran,

Welcome to the Community! 🎉

I did some digging into this and it seems like the error you’re running into is a known bug with the “New Lead/Opportunity” trigger in Odoo ERP Self Hosted app. Our team is aware of the issue and is working on a fix. I've added your email address as another affected user. That does a few things:

  • Bring this to the attention of the integration developers
  • Help track and prioritize fixes
  • Allows us to notify you via email if/when this is fixed

Unfortunately, I do not have an ETA, but I’ve added you to the list of users affected by this issue so we can let you know as soon as we have any updates.

In the meantime, you can stay in the loop/follow along with updates on the main thread here: 

I appreciate your patience and understanding.

 

For anyone that comes across this and wants to be added please reach out on the main topic for this issue here and we’ll get you added to the bug report.


Hi, we appeat to have the same issue.

We’ve been using Zapier to create opportunities in Odoo V16 for months and it worked very well.

Yesterday, we migrated to Odoo V17 and since then, we’ve had this error on each run : 

Odoo API Error (BaseModel.search() takes from 2 to 5 positional arguments but 6 were given): Traceback (most recent call last):
  File "/opt/odoo/odoo/addons/base/controllers/rpc.py", line 138, in xmlrpc_1
    response = self._xmlrpc(service)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/addons/base/controllers/rpc.py", line 127, in _xmlrpc
    result = dispatch_rpc(service, method, params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/http.py", line 389, in dispatch_rpc
    return dispatch(method, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/service/model.py", line 35, in dispatch
    res = execute(db, uid, *params[3:])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/service/model.py", line 65, in execute
    res = execute_cr(cr, uid, obj, method, *args, **kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/service/model.py", line 50, in execute_cr
    result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
             ^^^^^^
  File "/opt/odoo/odoo/api.py", line 464, in call_kw
    result = _call_kw_model(method, model, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/api.py", line 435, in _call_kw_model
    result = method(recs, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BaseModel.search() takes from 2 to 5 positional arguments but 6 were given

 

For now, even though we receive this error, the opportunity is correctly created in Odoo V17. So it’s actually not really an issue. I’m just worried because I read that a Zap running with error would be paused after 7 days. Is that correct?

 

Thanks for you help


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2188 replies
  • February 6, 2025

Hi ​@Neopower_Greg,

 

I’ve added you to the list of affected users, and we’ll  notify you via email once an update is readily available. Thanks.

 

For anyone that comes across this and wants to be added please reach out on the main topic for this issue here and we’ll get you added to the bug report.