Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

TypeError: inconsistent models in: res.partner() - library.member(3,)

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
ServerErrorv17
1 Rispondi
2503 Visualizzazioni
Avatar
akrem

This is my GitHub repository for my odoo project that I recently moved it to work on odoo v17:

github.com/akrembc/library_app_odoo17

when I navigate to my application called "library" then I go to "checkout" tab, an error will be raised that doesn't mention any of my application code:

❌

Traceback (most recent call last):

  File "/home/akrem/work17/odoo/odoo/http.py", line 1768, in _serve_db

    return service_model.retrying(self._serve_ir_http, self.env)

  File "/home/akrem/work17/odoo/odoo/service/model.py", line 133, in retrying

    result = func()

  File "/home/akrem/work17/odoo/odoo/http.py", line 1795, in _serve_ir_http

    response = self.dispatcher.dispatch(rule.endpoint, args)

  File "/home/akrem/work17/odoo/odoo/http.py", line 1999, in dispatch

    result = self.request.registry['ir.http']._dispatch(endpoint)

  File "/home/akrem/work17/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch

    result = endpoint(**request.params)

  File "/home/akrem/work17/odoo/odoo/http.py", line 725, in route_wrapper

    result = endpoint(self, *args, **params_ok)

  File "/home/akrem/work17/odoo/addons/web/controllers/dataset.py", line 24, in call_kw

    return self._call_kw(model, method, args, kwargs)

  File "/home/akrem/work17/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/home/akrem/work17/odoo/odoo/api.py", line 464, in call_kw

    result = _call_kw_model(method, model, args, kwargs)

  File "/home/akrem/work17/odoo/odoo/api.py", line 435, in _call_kw_model

    result = method(recs, *args, **kwargs)

  File "/home/akrem/work17/odoo/addons/web/models/models.py", line 677, in search_panel_select_range

    comodel_records = Comodel.search_read(comodel_domain, field_names, limit=limit)

  File "/home/akrem/work17/odoo/odoo/models.py", line 5732, in search_read

    records = self.search_fetch(domain or [], fields, offset=offset, limit=limit, order=order)

  File "/home/akrem/work17/odoo/odoo/models.py", line 1634, in search_fetch

    query = self._search(domain, offset=offset, limit=limit, order=order or self._order)

  File "/home/akrem/work17/odoo/odoo/models.py", line 5391, in _search

    query = self._where_calc(domain)

  File "/home/akrem/work17/odoo/odoo/models.py", line 5102, in _where_calc

    return expression.expression(domain, self).query

  File "/home/akrem/work17/odoo/odoo/osv/expression.py", line 794, in __init__

    self.parse()

  File "/home/akrem/work17/odoo/odoo/osv/expression.py", line 1021, in parse

    dom = HIERARCHY_FUNCS[operator](left, ids2, model)

  File "/home/akrem/work17/odoo/odoo/osv/expression.py", line 935, in parent_of_domain

    records = records[parent_name] - records.browse(parent_ids)

  File "/home/akrem/work17/odoo/odoo/models.py", line 6488, in __sub__

    raise TypeError(f"inconsistent models in: {self} - {other}")

TypeError: inconsistent models in: res.partner() - library.member(3,)


Note that this error only occur when trying to access kanban or list view of checkout model, if for example I navigate directly to form, pivot, graph or calendar view, no error will be thrown


Also note that this wasn't the case when the project was running on odoo v15 so everything was working as expected

0
Avatar
Abbandona
Avatar
akrem
Autore Risposta migliore

I fixed it,

what's common between the Kanban and list view is the element, and indeed it uses the library.member model.

this is how it was:

searchpanel

  field name="member_id" enable_counters="1" /

  field name="stage_id" select="multi" /

/searchpanel

this is my rework:

first, I added the field "partner_id" to the "library_checkout" model:


✅

partner_id = fields.Many2one(related="member_id.partner_id", store=True)



then replace the "member_id" field with "partner_id" in the searchpanel element:

✅

searchpanel

  field name="partner_id" enable_counters="1" /

  field name="stage_id" select="multi" /

/searchpanel

 




This one is obviously on the odoo developers, they must provide an error message that take you back to your own code not just odoo code !!

0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
getting odoo server error
ServerError v17
Avatar
Avatar
Avatar
2
giu 24
2579
Ya es posible hacer Upgrade de v17 a v17.1 ?
v17
Avatar
Avatar
1
ott 25
1220
How to add a new Many2one field in res.config.settings? Risolto
v17
Avatar
Avatar
Avatar
Avatar
4
ott 25
3530
Add field to ALL models in Odoo
v17
Avatar
Avatar
Avatar
2
set 25
2227
How to disable Email notification - You have been assigned to Risolto
v17
Avatar
Avatar
Avatar
Avatar
4
set 25
7567
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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