Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Error when fetching client details through API

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
pythonclientapi
2 Antwoorden
3676 Weergaven
Avatar
Pelle Brakkee

When I'm trying to fetch the client details though the API i get an error. I updated the base of Odoo to the newest files. Running Odoo 16 on a windows platform:

Traceback (most recent call last): File "F:\Odoo\server\odoo\addons\base\controllers\rpc.py", line 150, in xmlrpc_2 response = self._xmlrpc(service) File "F:\Odoo\server\odoo\addons\base\controllers\rpc.py", line 130, in _xmlrpc result = dispatch_rpc(service, method, params) File "F:\Odoo\server\odoo\http.py", line 366, in dispatch_rpc return dispatch(method, params) File "F:\Odoo\server\odoo\service\model.py", line 35, in dispatch res = execute(db, uid, *params[3:]) File "F:\Odoo\server\odoo\service\model.py", line 65, in execute res = execute_cr(cr, uid, obj, method, *args, **kw) File "F:\Odoo\server\odoo\service\model.py", line 50, in execute_cr result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env) File "F:\Odoo\server\odoo\service\model.py", line 133, in retrying result = func() File "F:\Odoo\server\odoo\api.py", line 457, in call_kw result = _call_kw_model(method, model, args, kwargs) File "F:\Odoo\server\odoo\api.py", line 430, in _call_kw_model result = method(recs, *args, **kwargs) File "F:\Odoo\server\odoo\models.py", line 1512, in search res = self._search(domain, offset=offset, limit=limit, order=order, count=count) File "F:\Odoo\server\odoo\addons\base\models\res_partner.py", line 911, in _search return super(Partner, self)._search(args, offset=offset, limit=limit, order=order, File "F:\Odoo\server\odoo\models.py", line 4655, in _search if expression.is_false(self, domain): File "F:\Odoo\server\odoo\osv\expression.py", line 226, in is_false elif token[1] == 'in' and not (isinstance(token[2], Query) or token[2]): IndexError: string index out of range


Does anyone have an idea what is going wrong?
Thanks in advance ​

0
Avatar
Annuleer
Mehjabin Farsana

Hi,
Please add relevant part of written api along with the question.
thanks

Pelle Brakkee
Auteur

Hi Mehjabin,


I'm using a external party for controlling the API functions (apicenter.io). The only code i get to see is:


{"Exception":{"fault":{"value":{"struct":{"member":[{"name":"faultCode","value":{"int":"1"}},{"name":"faultString","value":{"string":"Traceback (most recent call last): File "F:\Odoo\server\odoo\addons\base\controllers\rpc.py", line 150, in xmlrpc_2 response = self._xmlrpc(service) File "F:\Odoo\server\odoo\addons\base\controllers\rpc.py", line 130, in _xmlrpc result = dispatch_rpc(service, method, params) File "F:\Odoo\server\odoo\http.py", line 366, in dispatch_rpc return dispatch(method, params) File "F:\Odoo\server\odoo\service\model.py", line 35, in dispatch res = execute(db, uid, *params[3:]) File "F:\Odoo\server\odoo\service\model.py", line 65, in execute res = execute_cr(cr, uid, obj, method, *args, **kw) File "F:\Odoo\server\odoo\service\model.py", line 50, in execute_cr result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env) File "F:\Odoo\server\odoo\service\model.py", line 133, in retrying result = func() File "F:\Odoo\server\odoo\api.py", line 457, in call_kw result = _call_kw_model(method, model, args, kwargs) File "F:\Odoo\server\odoo\api.py", line 430, in _call_kw_model result = method(recs, *args, **kwargs) File "F:\Odoo\server\odoo\models.py", line 1512, in search res = self._search(domain, offset=offset, limit=limit, order=order, count=count) File "F:\Odoo\server\odoo\addons\base\models\res_partner.py", line 911, in _search return super(Partner, self)._search(args, offset=offset, limit=limit, order=order, File "F:\Odoo\server\odoo\models.py", line 4655, in _search if expression.is_false(self, domain): File "F:\Odoo\server\odoo\osv\expression.py", line 226, in is_false elif token[1] == 'in' and not (isinstance(token[2], Query) or token[2]): IndexError: string index out of range "}}]}}}},"data":{"startTag":"methodCall","methodName":"execute","params":{"param":[{"value":{"string":"MYDATABASE"}},{"value":{"int":2}},{"value":{"string":"MYPASSWORD"}},{"value":{"string":"res.partner"}},{"value":{"string":"search"}},{"value":{"array":{"data":{"value":[]}}}},{"offset":{"value":{"int":0}},"limit":{"value":{"int":10}}}]}}}


Avatar
shubham shiroya
Beste antwoord

you can take to diagnose and resolve this issue:

  1. Check the Domain Expression:

    • Review the code where you are constructing the domain for the search operation. Look for any places where you might be using the "in" operator incorrectly or passing incorrect data types in the domain.
  2. Examine the Data:

    • Check the data in your Odoo database, specifically the records related to the search operation. Ensure that there are no data inconsistencies or unexpected values that could be causing this error.

Review Custom Code:

  • If you have any custom code or modules that modify the behavior of Odoo's search operations, review them carefully. Check for any custom domain expressions that might be causing the issue.


0
Avatar
Annuleer
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste antwoord

Hi,

The error message you provided indicates an issue with the search operation on the res.partner model in Odoo. Specifically, it seems to be related to a problem with the domain expression. Check the domain expression you're using in your API request. And also check If you have any custom code or modules that interact with the res.partner model, review them to see if there might be any logic or expressions causing the issue.

It may helps you

0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Error when passing information through API Opgelost
python api
Avatar
Avatar
1
sep. 23
3194
Search a production order that is planned for today on python with an api
python api
Avatar
Avatar
3
apr. 19
3814
Error with call to external API
python api odoo
Avatar
Avatar
1
aug. 25
2419
Develop API and Test API in postman
python api odoo12
Avatar
Avatar
Avatar
Avatar
Avatar
5
mei 25
35566
Auto generate invoice attachment
python invoice api
Avatar
Avatar
1
mrt. 23
3089
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now