İç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

RPC_ERROR: psycopg2.ProgrammingError: can't adapt type 'res.partner' when creating invoice from sale.advance.payment.inv (Odoo 18 Enterprise)

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
salesaccounting
1 Cevapla
1679 Görünümler
Avatar
sabbam chandraneel

We're facing a persistent RPC_ERROR on our Odoo 18 Enterprise staging server during the "Create Invoice" action from the "Create Invoices" wizard (`sale.advance.payment.inv`). This is the traceback:


(psycopg2.ProgrammingError: can't adapt type 'res.partner' 

...see full traceback below...)


**Key points:**

- The error occurs when using the "Create Invoices" button on a sales order.

- We are on Odoo 18 Enterprise, latest build, no custom code running (all custom modules uninstalled, server restarted, still persists).

- Error also happens after restoring database and running on fresh staging.


**Traceback (full):**

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 2122, in _transactioning
    return service_model.retrying(func, env=self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/odoo/service/model.py", line 156, in retrying
    result = func()
             ^^^^^^
  File "/home/odoo/src/odoo/odoo/http.py", line 2089, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/odoo/http.py", line 2337, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/odoo/http.py", line 754, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 42, in call_button
    action = call_kw(request.env[model], method, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/odoo/api.py", line 533, in call_kw
    result = getattr(recs, name)(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 136, in create_invoices
    invoices = self._create_invoices(self.sale_order_ids)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/enterprise/industry_fsm_sale/wizard/sale_make_invoice_advance.py", line 11, in _create_invoices
    invoices = super()._create_invoices(sale_orders)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/enterprise/sale_timesheet_enterprise/wizard/sale_make_invoice_advance.py", line 42, in _create_invoices
    return super()._create_invoices(sale_orders)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/addons/sale_timesheet/wizard/sale_make_invoice_advance.py", line 51, in _create_invoices
    return super()._create_invoices(sale_orders)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/enterprise/sale_subscription/wizard/sale_make_invoice_advance.py", line 13, in _create_invoices
    return super(SaleAdvancePaymentInv, self)._create_invoices(sale_orders)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 170, in _create_invoices
    invoice = self.env['account.move'].sudo().create(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<decorator-gen-283>", line 2, in create
  File "/home/odoo/src/odoo/odoo/api.py", line 495, in _model_create_multi
    return create(self, [arg])
           ^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/addons/purchase/models/account_invoice.py", line 167, in create
    moves = super(AccountMove, self).create(vals_list)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<decorator-gen-144>", line 2, in create
  File "/home/odoo/src/odoo/odoo/api.py", line 496, in _model_create_multi
    return create(self, arg)
           ^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 3193, in create
    moves = super().create(vals_list)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<decorator-gen-50>", line 2, in create
  File "/home/odoo/src/odoo/odoo/api.py", line 496, in _model_create_multi
    return create(self, arg)
           ^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 278, in create
    threads = super(MailThread, self).create(vals_list)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<decorator-gen-0>", line 2, in create
  File "/home/odoo/src/odoo/odoo/api.py", line 496, in _model_create_multi
    return create(self, arg)
           ^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/odoo/models.py", line 5017, in create
    records = self._create(data_list)
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/odoo/odoo/models.py", line 5201, in _create
    cr.execute(SQL(
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 354, in execute
    res = self._obj.execute(query, params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/psycopg2/extensions.py", line 113, in getquoted
    pobjs = [adapt(o) for o in self._seq]
             ^^^^^^^^
psycopg2.ProgrammingError: can't adapt type 'res.partner'


**Request:**

- What could be causing this error?

- Is this related to data integrity, an internal bug, or a known issue with partner record assignment in Odoo 18?

- Any steps to debug or hotfix?


Thanks for your support.



0
Avatar
Vazgeç
Christoph Farnleitner

[Paste traceback as text, but *remove any http links/images* to avoid karma filter]
Also, unless you can reproduce this issue in runbot.odoo.com, this most likely is not related to core Odoo.

In general,
can't adapt type 'res.partner'
usually means a field expecting an id got set an object instead.

Christoph Farnleitner

Ok, since traceback is available now, nothing obvious meets the eye. Would be interesting to see what the final values to be set in the create() method actually are to identify the problematic field (could be partner_id but could anything else either).
Studio customization? Automated actions?

sabbam chandraneel
Üretici

Automated actions page i am unable to see under setting -> Technical -> Automation  -> Only I can see Automation rules, Scheduled Actions, Scheduled action triggers. Did not even done any odoo studio customization. What If I wanted to double check how to see my odoo studio views creations that are done by me.

sabbam chandraneel
Üretici

Doesn't work what to do now please help me out from this  Cybrosys Techno Solutions Pvt.Ltd

Avatar
Cybrosys Techno Solutions Pvt.Ltd
En İyi Yanıt

Hi,

The error message can't adapt type 'res.partner' means:

Somewhere in the call stack, Odoo is passing a full res.partner recordset instead of its id when creating an invoice (i.e., a value like partner_id: partner_record instead of partner_id: partner_record.id). If you have already uninstalled your custom module, please upgrade the sale and account modules to ensure the system works correctly.


Hope it helps

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 send / receive Peppol Invoices in Odoo? Is it free? Which App / module? Çözüldü
sales accounting
Avatar
Avatar
Avatar
2
Kas 25
2332
Warehouse on Product lines level
sales accounting
Avatar
Avatar
Avatar
2
Eki 25
665
Confusion regarding Product Categories and E-commerce Categories
sales accounting
Avatar
Avatar
Avatar
3
Eki 25
767
Can I use custom fields and Python to calculate Sales Tax? Çözüldü
sales accounting
Avatar
Avatar
2
Ağu 25
1280
Cambio de moneda en la factura, no funciona.
sales accounting
Avatar
Avatar
1
Ağu 25
845
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