Skip to main content

In setting up Odoo self-hosted zap, I face this error:

Failed to create a create project task in Odoo ERP Self Hosted

Fault (code BaseModel.search() takes from 2 to 5 positional arguments but 6 were given) occurred. Message: 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 391, 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

Hi and welcome to the Community, @Aqlan🎉

I did some digging and found there’s a bug report for a similar “Fault (code BaseModel.search() takes from 2 to 5 positional arguments but 6 were given)” error but it relates to Odoo ERP Self Hosted triggers, not actions specifically. Would you mind reaching out to our Support team here to flag that this is happening with the Create Lead/Opportunity action as well? They’ll be able to investigate further can update the existing bug report needs to include details of the affected actions or open up a separate bug report if necessary.

That said, I wonder if it could be due to the version of Odoo you’re running. I believe the current Odoo ERP Self Hosted app on Zapier only supports versions up to but not including version 8. Can you confirm what version you’re running? And if it’s 8 or higher, are you able to switch to a previous version or create a new instance running an earlier version of Odoo to test whether that allows you to create a new lead/opportunity without hitting that same error? That will help to confirm or disprove my theory here! 🙂

Looking forward to hearing from you on this!


 

 

 

 

 


Hi @Aqlan 

Provide more context about the error by posting screenshots with how your Zap steps are outlined and configured in EDIT mode.


Reply