Skip to Content
Odoo Menu
  • Sign in
  • 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
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

ValueError: Invalid field res.company.employee_id in leaf ('employee_id.parent_id.user_id', '=', 2)

Subscribe

Get notified when there's activity on this post

This question has been flagged
fieldinvalidres.companyleaf
1 Reply
6072 Views
Avatar
Ander

Can someone help me?
I get this error whenever i try to enter some modules of my aplication.

RPC_ERROR Odoo Server Error Traceback (most recent call last): File "/home/odoo/src/odoo/16.0/odoo/api.py", line 983, in get cache_value = field_cache[record._ids[0]] KeyError: 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/src/odoo/16.0/odoo/fields.py", line 1160, in __get__ value = env.cache.get(record, self) File "/home/odoo/src/odoo/16.0/odoo/api.py", line 990, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: 'res.company(1,).name' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1583, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 134, in retrying result = func() File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1610, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1807, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_http.py", line 154, in _dispatch result = endpoint(**request.params) File "/home/odoo/src/odoo/16.0/odoo/http.py", line 696, in route_wrapper result = endpoint(self, *args, **params_ok) File "/home/odoo/src/odoo/16.0/addons/mail/controllers/discuss.py", line 196, in mail_init_messaging return request.env.user.sudo(request.env.user.has_group('base.group_portal'))._init_messaging() File "/home/odoo/src/odoo/16.0/addons/mail_bot/models/res_users.py", line 28, in _init_messaging return super()._init_messaging() File "/home/odoo/src/odoo/16.0/addons/mail/models/res_users.py", line 182, in _init_messaging 'companyName': self.env.company.name, File "/home/odoo/src/odoo/16.0/odoo/fields.py", line 1186, in __get__ recs._fetch_field(self) File "/home/odoo/src/odoo/16.0/odoo/models.py", line 3162, in _fetch_field self._read(fnames) File "/home/odoo/src/odoo/16.0/odoo/models.py", line 3219, in _read self._apply_ir_rules(query, 'read') File "/home/odoo/src/odoo/16.0/odoo/models.py", line 4425, in _apply_ir_rules expression.expression(domain, self.sudo(), self._table, query) File "/home/odoo/src/odoo/16.0/odoo/osv/expression.py", line 447, in __init__ self.parse() File "/home/odoo/src/odoo/16.0/odoo/osv/expression.py", line 672, in parse raise ValueError("Invalid field %s.%s in leaf %s" % (model._name, path[0], str(leaf))) ValueError: Invalid field res.company.employee_id in leaf ('employee_id.parent_id.user_id', '=', 2) The above server error caused the following client error: RPC_ERROR: Odoo Server Error at makeErrorFromResponse (https://edu-consultec.odoo.com/web/assets/269-d574a12/web.assets_backend.min.js:977:163) at XMLHttpRequest. (https://edu-consultec.odoo.com/web/assets/269-d574a12/web.assets_backend.min.js:985:13)


Thanks in advide

0
Avatar
Discard
Avatar
Malay Khamar (Serpent Consulting Services Pvt. Ltd.)
Best Answer

Hi Ander,

Please check is there any field named "employee_id" in the res.company model or not.  System is not found that field.  If not then please add the employee_id field in the company model.

(I guess you have added a domain on a wrong field)
Hope it will help you.

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
Invalid field %r in leaf %r" % (left, str(leaf)) Solved
field state invalid
Avatar
Avatar
Avatar
3
May 23
14249
Error i recieve, need emplaination please
field invalid openerp7.0
Avatar
0
Mar 15
3944
contact update fail : invalid field : client / supplier account Solved
field contact update invalid v15
Avatar
Avatar
1
Feb 22
3323
Project module or fields
field
Avatar
0
Feb 25
2189
extra checkout step
field
Avatar
0
Jan 25
1903
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