Skip to main content
Best answer

Odoo ERP Self hosted Fault (code BaseModel.search() takes from 2 to 5 positional arguments but 6 were given


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, *params[3:]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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.

Best answer by SamB

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. 🙂 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

17 replies

Troy Tessalone
Forum|alt.badge.img+14

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


  • New
  • 1 reply
  • July 22, 2024

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

 

Did any one find the fix to this problem 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7297 replies
  • Answer
  • July 23, 2024

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. 🙂 


  • Author
  • Beginner
  • 1 reply
  • July 23, 2024

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


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7297 replies
  • August 1, 2024

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?


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • 6324 replies
  • August 9, 2024

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.


  • New
  • 2 replies
  • September 9, 2024

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.


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7297 replies
  • September 10, 2024

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! 


  • New
  • 3 replies
  • September 23, 2024

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


  • New
  • 2 replies
  • September 23, 2024

 

RobertS wrote:

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

Just do this:

Show content
AgnitumuS wrote:

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.

 


  • New
  • 3 replies
  • September 24, 2024
AgnitumuS wrote:

 

RobertS wrote:

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

Just do this:

Show content
AgnitumuS wrote:

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. 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7297 replies
  • September 24, 2024

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.


  • New
  • 1 reply
  • September 26, 2024

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 :(


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2203 replies
  • September 27, 2024

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. 


  • New
  • 3 replies
  • September 27, 2024
SamB wrote:

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! 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7297 replies
  • September 30, 2024

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! 🧡