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

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

Subscriure's

Get notified when there's activity on this post

This question has been flagged
modulesbaseodoo12
2 Respostes
6885 Vistes
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
Descartar
Avatar
Marco
Autor 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
Descartar
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
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
Difference between xpath and normal field Solved
modules odoo12
Avatar
Avatar
Avatar
Avatar
Avatar
6
de gen. 23
12475
Set field to readonly if currently edited user has higher privelage
modules odoo12
Avatar
0
d’ag. 19
3923
"Model 'maintenance' does not exist in registry" even if it does and it is inside dependencies Solved
modules odoo12
Avatar
Avatar
3
d’ag. 19
5162
Get value of field from one module and add it to new module
modules odoo odoo12
Avatar
0
d’abr. 19
4772
can I add odoo enterprise apps in odoo community Solved
community modules odoo12
Avatar
Avatar
Avatar
2
de gen. 19
7349
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