Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

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

Naroči se

Get notified when there's activity on this post

This question has been flagged
ServerErrorv17
1 Odgovori
2498 Prikazi
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
Opusti
Avatar
akrem
Avtor 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
Opusti
Enjoying the discussion? Don't just read, join in!

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
getting odoo server error
ServerError v17
Avatar
Avatar
Avatar
2
jun. 24
2574
Ya es posible hacer Upgrade de v17 a v17.1 ?
v17
Avatar
Avatar
1
okt. 25
1211
How to add a new Many2one field in res.config.settings? Solved
v17
Avatar
Avatar
Avatar
Avatar
4
okt. 25
3514
Add field to ALL models in Odoo
v17
Avatar
Avatar
Avatar
2
sep. 25
2221
How to disable Email notification - You have been assigned to Solved
v17
Avatar
Avatar
Avatar
Avatar
4
sep. 25
7552
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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