Skip to main content

I see on other tickets that odoo is not supported anymore.  But is there someone who can help me out with this error or give me some advice how I can solve this?

 

Failed to create a create lead/opportunity 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/odoo17/odoo/addons/base/controllers/rpc.py", line 138, in xmlrpc_1 response = self._xmlrpc(service) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo17/odoo/addons/base/controllers/rpc.py", line 127, in _xmlrpc result = dispatch_rpc(service, method, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo17/odoo/http.py", line 391, in dispatch_rpc return dispatch(method, params) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo17/odoo/service/model.py", line 35, in dispatch res = execute(db, uid, *paramsm3:]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo17/odoo/service/model.py", line 65, in execute res = execute_cr(cr, uid, obj, method, *args, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo17/odoo/service/model.py", line 50, in execute_cr result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo17/odoo/service/model.py", line 133, in retrying result = func() ^^^^^^ File "/opt/odoo17/odoo/api.py", line 464, in call_kw result = _call_kw_model(method, model, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo17/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

show more

Click on the Troubleshoot tab below or learn more in our help center.

Hi @Deef 

For us to have more context, post screenshots with how your Zap steps are outlined and configured in EDIT mode along with the encountered error.

 

Help article for using Odoo Self Hosted in Zaps that may provide guidance: https://help.zapier.com/hc/en-us/articles/18834378921997-How-to-get-started-with-Odoo-ERP-Self-Hosted-on-Zapier


WE are getting same issue when we moved from V13 odoo to V17 

 

Did any one find the fix to this problem 


Hi there @Deef and @SimonD! 👋

Sorry you’re both running into these “Fault (code BaseModel.search() takes from 2 to 5 positional arguments but 6 were given...” errors. I did some digging and discovered these errors are caused by a bug so I’ve added you both to the list of folks being impacted by this. 

I can’t give any sort of ETA on when it will be resolved by, but adding you will help to increase it’s priority. And it will allow us to automatically notify you once the issue is solved. 

Sorry to not have a workaround to suggest at the moment but if we come across any we’ll be sure to share details of them here. Thanks for your patience in the meantime. 🙂 


Hello @SamB I am in search for a other solution then zapier that's working with Odoo.    Do you have a suggestion?


Apologies for the delay in my reply here @Deef!

Wish I was writing with better news here but unfortunately I don’t know of any alternatives, or workarounds at the moment. I’ll definitely be keeping an eye out though and will let you know if I come across any. And if you manage to find an alternative or workaround in the meantime please let us know here, would love to hear from you on this!


We are having the same issue. Is there any news of a bug fix?


Hi @NativeGrace,

Unfortunately, the bug is still open. In the meantime, I have added you to the open bug report. We will keep you updated via email once the bug has been fixed.

I appreciate your patience and understanding.


Simplest way to fix this problem is edit /opt/odoo17/odoo/models.py

on line 1600 need to found the line:

    def search(self, domain, offset=0, limit=None, order=None):

and replace with 

    def search(self, domain, offset=0, limit=None, order=None, anything=None):

 

the problem:

Zapier sending request with wrong amount of parameters.


Thanks so much for sharing your insights here @AgnitumuS! 🤗 I’ve passed these details over to the developers working on this issue and I’ve added you to bug report to help bump up it’s priority. You’ll receive an email notification from us once it’s been fixed. 

Thanks for everyone’s continued patience in the meantime, it’s much appreciated! 


Any news on a fix for this issue? We are getting it too! ☹️


 

Any news on a fix for this issue? We are getting it too! ☹️

Just do this:

Simplest way to fix this problem is edit /opt/odoo17/odoo/models.py

on line 1600 need to found the line:

    def search(self, domain, offset=0, limit=None, order=None):

and replace with 

    def search(self, domain, offset=0, limit=None, order=None, anything=None):

 

the problem:

Zapier sending request with wrong amount of parameters.

 


 

Any news on a fix for this issue? We are getting it too! ☹️

Just do this:

Simplest way to fix this problem is edit /opt/odoo17/odoo/models.py

on line 1600 need to found the line:

    def search(self, domain, offset=0, limit=None, order=None):

and replace with 

    def search(self, domain, offset=0, limit=None, order=None, anything=None):

 

the problem:

Zapier sending request with wrong amount of parameters.

 

We pay for hosting of our Odoo, not Odoo.sh which I know isn't supported but a local provider that offers different hosting packages. We only get the Odoo logins, I don't think I can edit files. 


I’m so sorry you’re unable to use that workaround @RobertS. I’ve added you to the list of folks that are being affected by this. I can’t make any promises around when a fix will be shipped but we’ll definitely email you as soon as it’s sorted.


We were trying to use Zapier to connect a third part system to our client’s Odoo database, but we also came across this error, both when trying to access Odoo to read (trigger) as well as to write (Action).  We always get “Odoo API Error (BaseModel.search() takes from 2 to 5 positional arguments but 6 were given): Traceback (most recent call last)...” 

So clearly the Odoo connectivity is unusable now :(


Hi @OdooMalta,

 

We sincerely apologize for any inconvenience, hence I’ve added to the list of affected users and we’ll update you via email once an update is available. 


I’m so sorry you’re unable to use that workaround @RobertS. I’ve added you to the list of folks that are being affected by this. I can’t make any promises around when a fix will be shipped but we’ll definitely email you as soon as it’s sorted.

We contacted our host and he applied the workaround. It seems to be working now. Thanks to @AgnitumuS for posting the solution! 


Yay! That’s fantastic news @RobertS! 🎉

Hopefully that workaround will help to resolve things for everyone else that’s affected too! Thanks again to @AgnitumuS for sharing that workaround here! 🧡


Reply