İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

External API Error - Getting sale.order information

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
apiapiclient
3 Cevaplar
5477 Görünümler
Avatar
xenic82661

Hi
I'm testing odoo external APi and I'm getting this error when i execute this last command:
models.execute_kw(db, uid, password, 'sale.order', 'search', [[]])
[4, 3, 1]

models.execute_kw(db, uid, password, 'sale.order', 'read', [1])

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\xenic82661\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1116, in __call__
return self.__send(self.__name, args)
File "C:\Users\xenic82661\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1458, in __request
response = self.__transport.request(
File "C:\Users\xenic82661\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1160, in request
return self.single_request(host, handler, request_body, verbose)
File "C:\Users\xenic82661\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1176, in single_request
return self.parse_response(resp)
File "C:\Users\xenic82661\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1348, in parse_response
return u.close()
File "C:\Users\xenic82661\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 662, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: \n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/home/odoo/src/odoo/saas-16.1/odoo/addons/base/controllers/rpc.py", line 148, in xmlrpc_2\n response = self._xmlrpc(service)\n File "/home/odoo/src/custom/trial/saas_trial/controllers/main.py", line 266, in _xmlrpc\n res = super(OdooRPC, self)._xmlrpc(service)\n File "/home/odoo/src/odoo/saas-16.1/odoo/addons/base/controllers/rpc.py", line 129, in _xmlrpc\n return xmlrpc.client.dumps((result,), methodresponse=1, allow_none=False)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 981, in dumps\n data = m.dumps(params)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 514, in dumps\n dump(v, write)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 536, in __dump\n f(self, value, write)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 589, in dump_array\n dump(v, write)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 536, in __dump\n f(self, value, write)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 607, in dump_struct\n dump(v, write)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 536, in __dump\n f(self, value, write)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 607, in dump_struct\n dump(v, write)\n File "/usr/lib/python3.10/xmlrpc/client.py", line 526, in __dump\n raise TypeError("cannot marshal %s objects" % type(value))\nTypeError: cannot marshal objects\n'>

 
BTW for res.partner is working without any problem
models.execute_kw(db, uid, password, 'res.partner', 'search', [[]])
[9, 10, 8, 7, 1, 3]

models.execute_kw(db, uid, password, 'res.partner', 'read', [9])

[{'id': 9, 'message_is_follower': True, 'message_follower_ids': [...], 'message_partner_ids': [...], 'message_ids': [...], 'has_message': True, 'message_needaction': False, 'message_needaction_counter': 0, 'message_has_error': False, ...}]

0
Avatar
Vazgeç
Niyas Raphy (Walnut Software Solutions)

seems the shared one line of code is fine for me, to debug more to cross check again, may be this helps: https://www.odoo.com/documentation/16.0/developer/api/external_api.html

Avatar
Mikhail Zuev
En İyi Yanıt

We are experiencing the same error. Could you please tell me if you solved it?

0
Avatar
Vazgeç
Mikhail Zuev

odoo support suggested specifying the exact orders attributes/fields that you want to download
this solved our issue

import xmlrpc.client

url = '<insert_own_db_url>'
db = '<insert_db_name>'

## username and password for uid performing search read
username=''
password=''

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

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

models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(url))
models.execute_kw(db, uid, password,
'sale.order', 'search_read',
[[['id', '<', 10]]], # Replace with your own search domain
{'fields': ['id', 'name']}) # replace with necessary fields that you would like to read

Avatar
xenic82661
Üretici En İyi Yanıt

Thanks for your reply Bennie, I already executed the 'search' and this record exists

0
Avatar
Vazgeç
Avatar
Bennie
En İyi Yanıt

You must be used to "search" method before "read" method.
You can used to "read" method when you know exactly recordset of model. Let's reference document for detail.

ids = models.execute_kw(db, uid, password, 'res.partner', 'search', [[['is_company', '=', True]]], {'limit': 1})
[record] = models.execute_kw(db, uid, password, 'res.partner', 'read', [ids])


0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
How can we accept a clients orders using the Odoo API
api apiclient
Avatar
0
Tem 21
2514
How to send data from odoo to another oracle database using AP I? mettre a jours ou creer ou suprimer les donnes d une application oracle externes a partir de odoo
api send apiclient
Avatar
Avatar
1
Oca 23
3438
External API Auth problem
api apiclient v15
Avatar
0
Ara 21
3848
How add new Log Note to Lead/Opportunity using API Çözüldü
api apiclient odoov12
Avatar
Avatar
1
Haz 20
8989
how can using odoo api without session id i want using jwt authentication ?
api apiclient ReactJs
Avatar
0
Kas 19
7206
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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