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

Can't load module base, onchange() takes 1 positional argument but 3 were given

Subscribe

Get notified when there's activity on this post

This question has been flagged
modulesbaseodoo12
2 Replies
6926 Views
Avatar
Marco

Impacted versions: Odoo 12

Current behavior: Odoo fails to load server-wide module base

Expected behavior: Odoo load server-wide module 'base'

Hi,
while restarting odoo service from pycharm I have got errors starting from loading module 'web'.
It says an api.onchange call went wrong cause it needs 1 argument instead of 3 ones specified in file ir_model.py.
I've just copied addons folders from official repository to addons path.

postgresql service is running and web module.
the command launched form IDE is odoo-bin -c /home/user/Odoo/odoo-12.0/odoo.conf --dev=reload -u /home/user/Odoo/odoo-12.0/addons

I'm gonna report below my conf file and entire error.
ODOO.CONF FILE

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo
addons_path = /home/odoovm/Odoo/odoo-12.0/addons,/home/odoovm/Odoo/odoo-12.0/master-app
xmlrpc_port = 8099

[logging]
; logfile = /home/odoovm/Odoo/odoo-12.0/logs/openerp-server.log
; logrotate = False
log-level = debug
; log-db = False
; syslog = False



LOGS

/usr/bin/python3.6 /home/odoovm/Odoo/odoo-12.0/odoo-bin -c /home/odoovm/Odoo/odoo-12.0/odoo.conf --dev=reload -u /home/odoovm/Odoo/odoo-12.0/addons

2020-06-30 14:16:30,410 6134 INFO ? odoo: Odoo version 12.0
2020-06-30 14:16:30,411 6134 INFO ? odoo: Using configuration file at /home/odoovm/Odoo/odoo-12.0/odoo.conf
2020-06-30 14:16:30,411 6134 INFO ? odoo: addons paths: ['/home/odoovm/.local/share/Odoo/addons/12.0', '/home/odoovm/Odoo/odoo-12.0/addons', '/home/odoovm/Odoo/odoo-12.0/master-app', '/home/odoovm/Odoo/odoo-12.0/odoo/addons']
2020-06-30 14:16:30,411 6134 INFO ? odoo: database: odoo@localhost:5432
2020-06-30 14:16:30,432 6134 CRITICAL ? odoo.modules.module: Couldn't load module base
2020-06-30 14:16:30,432 6134 CRITICAL ? odoo.modules.module: onchange() takes 1 positional argument but 3 were given
2020-06-30 14:16:30,432 6134 ERROR ? odoo.service.server: Failed to load server-wide module `base`.
Traceback (most recent call last):
  File "/home/odoovm/Odoo/odoo-12.0/odoo/service/server.py", line 1098, in load_server_wide_modules
    odoo.modules.module.load_openerp_module(m)
  File "/home/odoovm/Odoo/odoo-12.0/odoo/modules/module.py", line 368, in load_openerp_module
    __import__('odoo.addons.' + module_name)
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/home/odoovm/Odoo/odoo-12.0/odoo/modules/module.py", line 82, in load_module
    exec(open(modfile, 'rb').read(), new_mod.__dict__)
  File "<string>", line 5, in <module>
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/__init__.py", line 7, in <module>
    from . import ir_model
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/ir_model.py", line 330, in <module>
    class IrModelFields(models.Model):
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/ir_model.py", line 520, in IrModelFields
    @api.onchange('ttype', 'model_id', 'relation')
TypeError: onchange() takes 1 positional argument but 3 were given
2020-06-30 14:16:30,436 6134 WARNING ? odoo.service.server: 'inotify' module not installed. Code autoreload feature is disabled
2020-06-30 14:16:30,440 6134 INFO ? odoo.service.server: HTTP service (werkzeug) running on odoovm-VirtualBox:8099
Exception in thread odoo.service.cron.cron0:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/odoovm/Odoo/odoo-12.0/odoo/service/server.py", line 425, in target
    self.cron_thread(i)
  File "/home/odoovm/Odoo/odoo-12.0/odoo/service/server.py", line 396, in cron_thread
    from odoo.addons.base.models.ir_cron import ir_cron
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/__init__.py", line 7, in <module>
    from . import ir_model
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/ir_model.py", line 330, in <module>
    class IrModelFields(models.Model):
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/ir_model.py", line 520, in IrModelFields
    @api.onchange('ttype', 'model_id', 'relation')
TypeError: onchange() takes 1 positional argument but 3 were given

Exception in thread odoo.service.cron.cron1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/odoovm/Odoo/odoo-12.0/odoo/service/server.py", line 425, in target
    self.cron_thread(i)
  File "/home/odoovm/Odoo/odoo-12.0/odoo/service/server.py", line 396, in cron_thread
    from odoo.addons.base.models.ir_cron import ir_cron
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/__init__.py", line 7, in <module>
    from . import ir_model
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/ir_model.py", line 330, in <module>
    class IrModelFields(models.Model):
  File "/home/odoovm/Odoo/odoo-12.0/odoo/addons/base/models/ir_model.py", line 520, in IrModelFields
    @api.onchange('ttype', 'model_id', 'relation')
TypeError: onchange() takes 1 positional argument but 3 were given

0
Avatar
Discard
Avatar
Marco
Author Best Answer

Thanks Ravy for replying.

I tried to add that path in addons path but the error still be the same.
I've also tried to copy and paste from official repo branch 12.0 the entire folder odoo/odoo/addons but it doesn't change nothing.

0
Avatar
Discard
Avatar
Ravi Gadhia
Best Answer

 I think there is an issue with addons path, 'base' module didn't include in addons path due to copy/move folder

can you try with following addons path in config file

addons_path = /home/odoovm/Odoo/odoo-12.0/odoo/addons,/home/odoovm/Odoo/odoo-12.0/addons,/home/odoovm/Odoo/odoo-12.0/master-app



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
Difference between xpath and normal field Solved
modules odoo12
Avatar
Avatar
Avatar
Avatar
Avatar
6
Jan 23
12526
Set field to readonly if currently edited user has higher privelage
modules odoo12
Avatar
0
Aug 19
3949
"Model 'maintenance' does not exist in registry" even if it does and it is inside dependencies Solved
modules odoo12
Avatar
Avatar
3
Aug 19
5190
Get value of field from one module and add it to new module
modules odoo odoo12
Avatar
0
Apr 19
4808
can I add odoo enterprise apps in odoo community Solved
community modules odoo12
Avatar
Avatar
Avatar
2
Jan 19
7384
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