Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

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

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
modulesbaseodoo12
2 Réponses
6900 Vues
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
Ignorer
Avatar
Marco
Auteur Meilleure réponse

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
Ignorer
Avatar
Ravi Gadhia
Meilleure réponse

 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
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Difference between xpath and normal field Résolu
modules odoo12
Avatar
Avatar
Avatar
Avatar
Avatar
6
janv. 23
12493
Set field to readonly if currently edited user has higher privelage
modules odoo12
Avatar
0
août 19
3926
"Model 'maintenance' does not exist in registry" even if it does and it is inside dependencies Résolu
modules odoo12
Avatar
Avatar
3
août 19
5172
Get value of field from one module and add it to new module
modules odoo odoo12
Avatar
0
avr. 19
4782
can I add odoo enterprise apps in odoo community Résolu
community modules odoo12
Avatar
Avatar
Avatar
2
janv. 19
7356
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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