Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

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

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

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

Subscribe

Get notified when there's activity on this post

This question has been flagged
salesaccounting
1 Reply
1689 Views
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
Discard
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
Author

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
Author

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

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

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
Discard
Enjoying the discussion? Don't just read, join in!

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

Sign up
Related Posts Replies Views Activity
How can send / receive Peppol Invoices in Odoo? Is it free? Which App / module? Solved
sales accounting
Avatar
Avatar
Avatar
2
नव॰ 25
2350
Warehouse on Product lines level
sales accounting
Avatar
Avatar
Avatar
2
अक्तू॰ 25
666
Confusion regarding Product Categories and E-commerce Categories
sales accounting
Avatar
Avatar
Avatar
3
अक्तू॰ 25
770
Can I use custom fields and Python to calculate Sales Tax? Solved
sales accounting
Avatar
Avatar
2
अग॰ 25
1282
Cambio de moneda en la factura, no funciona.
sales accounting
Avatar
Avatar
1
अग॰ 25
845
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة 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, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

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