Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Artificial Intelligence
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Property Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Referral Program
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč
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č

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

Naroči se

Get notified when there's activity on this post

This question has been flagged
modulesbaseodoo12
2 Odgovori
8307 Prikazi
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
Opusti
Avatar
Marco
Avtor 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
Opusti
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
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
Difference between xpath and normal field Solved
modules odoo12
Avatar
Avatar
Avatar
Avatar
Avatar
6
jan. 23
14111
Set field to readonly if currently edited user has higher privelage
modules odoo12
Avatar
0
avg. 19
4643
"Model 'maintenance' does not exist in registry" even if it does and it is inside dependencies Solved
modules odoo12
Avatar
Avatar
3
avg. 19
6241
Get value of field from one module and add it to new module
modules odoo odoo12
Avatar
0
apr. 19
5677
can I add odoo enterprise apps in odoo community Solved
community modules odoo12
Avatar
Avatar
Avatar
2
jan. 19
8447
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 Svenska ภาษาไทย 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