Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

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

Subscriure's

Get notified when there's activity on this post

This question has been flagged
ServerErrorv17
1 Respondre
2602 Vistes
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
Descartar
Avatar
akrem
Autor Best Answer

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
getting odoo server error
ServerError v17
Avatar
Avatar
Avatar
2
de juny 24
2648
Ya es posible hacer Upgrade de v17 a v17.1 ?
v17
Avatar
Avatar
1
d’oct. 25
1331
How to add a new Many2one field in res.config.settings? Solved
v17
Avatar
Avatar
Avatar
Avatar
4
d’oct. 25
3762
Add field to ALL models in Odoo
v17
Avatar
Avatar
Avatar
2
de set. 25
2422
How to disable Email notification - You have been assigned to Solved
v17
Avatar
Avatar
Avatar
Avatar
4
de set. 25
7841
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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