Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

404 when testing demo xmlrpc client in python

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
pythonxmlrpc
3 Besvarelser
2025 Visninger
Avatar
Mitch Van Looy

Hi everyone,

I am trying to connect to the demo database of Odoo using xmlrpc.client in python but I get 404 errors everytime.

I tried this with python 3.10 and 3.13 on a Mac, and 3.13 on windows and I always get the same results.

I also have tried different networks (work, home and hotspot).


Note sure what I am doing wrong here. This is just the example code from the documentation. 

I have tried searching for this issue, but there is nobody else with this issue apparently.


import xmlrpc.client

info = xmlrpc.client.ServerProxy("https://demo.odoo.com/start").start()

url, db, username, password = info["host"], info["database"], info["user"], info["password"]

common = xmlrpc.client.ServerProxy("{}/xmlrpc/2/common".format(url))

common.version()

 

Traceback (most recent call last):

  File "<python-input-0>", line 5, in <module>

    common.version()

    ~~~~~~~~~~~~~~^^

  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/xmlrpc/client.py", line 1096, in __call__

    return self.__send(self.__name, args)

           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^

  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/xmlrpc/client.py", line 1435, in __request

    response = self.__transport.request(

        self.__host,

    ...<2 lines>...

        verbose=self.__verbose

        )

  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/xmlrpc/client.py", line 1140, in request

    return self.single_request(host, handler, request_body, verbose)

           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/xmlrpc/client.py", line 1170, in single_request

    raise ProtocolError(

    ...<3 lines>...

        )

xmlrpc.client.ProtocolError: <ProtocolError for demo3.odoo.com/xmlrpc/2/common: 404 NOT FOUND>

0
Avatar
Kassér
Mitch Van Looy
Forfatter

Hi,

Thank you for your reply @Cybrosys 

The code I posted, is letter for letter exactly what is published on those pages.

See "test database"and "logging in" (I can't post links because of low karma).

So I still don't know what I am doing wrong here

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Bedste svar

Hi,


You can go through the official documentation of Odoo. Please refer to the link below.

https://www.odoo.com/documentation/17.0/th/developer/reference/external_api.html


Hope it helps

1
Avatar
Kassér
Avatar
Adil Akbar
Bedste svar

Hi, please check this: https://youtu.be/Cmbo2iGuTBY 
Hope it helps.

0
Avatar
Kassér
Avatar
D Enterprise
Bedste svar

Hii,


import xmlrpc.client


url = "http://localhost:8069"       # or https://yourdomain.odoo.com if hosted

db = "your_database_name"           # your actual database name

username = "admin"                  # your Odoo username

password = "admin"                  # your Odoo password



common = xmlrpc.client.ServerProxy(f"{url}/xmlrpc/2/common")

uid = common.authenticate(db, username, password, {})

print("Authenticated UID:", uid)


if not uid:

    print("Authentication failed. Check credentials.")

    exit()



models = xmlrpc.client.ServerProxy(f"{url}/xmlrpc/2/object")


# Example: Read the first 5 partners

partner_ids = models.execute_kw(

    db, uid, password,

    'res.partner', 'search',

    [[]],  # empty domain = all records

    {'limit': 5}

)


partners = models.execute_kw(

    db, uid, password,

    'res.partner', 'read',

    [partner_ids],

    {'fields': ['name', 'email']}

)


print("First 5 partners:")

for partner in partners:

    print(f"  {partner['name']} - {partner.get('email', 'No email')}")


please try this code as your work and one example is also there 
i hope it is use full

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Creating journal entries via external API (XML-RPC) Løst
python xmlrpc
Avatar
1
aug. 23
15405
XMLRPC Error 302 Temporarily moved (odoo.sh v13)
python xmlrpc
Avatar
0
jun. 20
61
Adding translations while creating records for models with XMLRPC
python translations xmlrpc
Avatar
Avatar
1
maj 24
3849
Create invoice via xmlrpc Løst
python invoice xmlrpc
Avatar
Avatar
1
nov. 22
4303
API attachment question
python api xmlrpc
Avatar
Avatar
Avatar
Avatar
3
jun. 22
7789
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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