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
    • Guest House
    • Distributeur de boissons
    • Hotel
    Real Estate
    • Real Estate Agency
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consulting
    • Accounting Firm
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Metal
    • Furnitures
    • Food
    • 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
    • Solar Energy Systems
    • Cordonnier
    • Services de nettoyage
    • HVAC Services
    Others
    • Nonprofit Organization
    • 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

how to trace errors like this ?

S'inscrire

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

Cette question a été signalée
8.0odoo
6 Réponses
12383 Vues
Avatar
Rachid

2014-09-05 10:47:12,462 20595 ERROR test_v8 openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 476, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 495, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 311, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 308, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 685, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 360, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo-8.0/addons/web/controllers/main.py", line 945, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/odoo-8.0/addons/web/controllers/main.py", line 933, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/api.py", line 234, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/addons/base/module/wizard/base_module_upgrade.py", line 104, in upgrade_module
    openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/opt/odoo/odoo-8.0/openerp/modules/registry.py", line 324, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo-8.0/openerp/modules/loading.py", line 353, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/opt/odoo/odoo-8.0/openerp/modules/loading.py", line 263, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/odoo/odoo-8.0/openerp/modules/loading.py", line 228, in load_module_graph
    registry.setup_models(cr, partial=True)
  File "/opt/odoo/odoo-8.0/openerp/modules/registry.py", line 167, in setup_models
    model._setup_fields(cr, SUPERUSER_ID, partial=partial)
  File "/opt/odoo/odoo-8.0/openerp/api.py", line 234, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/api.py", line 329, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/models.py", line 2991, in _setup_fields
    field.setup(self.env)
  File "/opt/odoo/odoo-8.0/openerp/fields.py", line 374, in setup
    self._setup(env)
  File "/opt/odoo/odoo-8.0/openerp/fields.py", line 381, in _setup
    self._setup_regular(env)
  File "/opt/odoo/odoo-8.0/openerp/fields.py", line 1527, in _setup_regular
    invf = env[self.comodel_name]._fields[self.inverse_name]
KeyError: 'sale_line_id'

0
Avatar
Ignorer
Avatar
Yogesh
Meilleure réponse

The error says there is one2many or related field is defined in such a way

line_ids: fields.one2many('sale.order.line','sale_line_id','Order lines')

 

but the field 'sale_line_id' doesn't exists in respective model in database.

 

1
Avatar
Ignorer
Avatar
Annadurai
Meilleure réponse

hey! hello you may declared it in under model but u forgot to give it in __init__.py in models :)

3
Avatar
Ignorer
Avatar
Erdem Uney
Meilleure réponse

Usually look at the last lines. It says here `KeyError: 'sale_line_id'`. Probably in your code you are trying to call something `object.sale_line_id` but there is no field on that object or the id you are passing to that method is wrong. Can't say much without seeing the code but usually last lines give more info.

1
Avatar
Ignorer
Rachid
Auteur

the trace have no details about the module or the file where I've to find in !!!!

Bole

no, it does not, because you are trying to upgrade some module.. so you should know what is the last module you were working on, or whyt is the last module you addes to server, that could cause hte error.... after all you can search|grep for "sale_line_id" ... HINT: module is dealing with sale order lines.. and sale order object has no sale_line_id... it is en example of not openerp/odoo not folowing naming convention... in v7 the field is : 'order_line': fields.one2many ... same name is in v8.... and it goes on back to v5 :)

Avatar
Resham Kumari
Meilleure réponse

Hi 

I was also getting same issue, Some how I am able to resolve it. Might be it is not correct solution but it helped me.

In my case I declared my Parent object with out fields, after that declared my child class completely then declare my parent class with fields and methods. 

example:

class MedicalInpatientMedication (models.Model):

    _name = "medical.inpatient.medication"

class MedicalInpatientMedicationAdminTime(models.Model):

    _name = "medical.inpatient.medication.admin.time"

    _description = 'Inpatient Medication Admin Times'

    name = fields.Many2one('medical.inpatient.medication', 'Medication')

    admin_time = fields.Datetime("Date",default=fields.Datetime.now)

health_professional = fields.Many2one('medical.physician','Health Professional,)

   class MedicalInpatientMedication (models.Model):

   _inherit = "medical.inpatient.medication"

   _inherits={'medical.medication.template' : 'medication_id'}

   _description = "Inpatient Medication"

   medication_id = fields.Many2one('medical.medication.template','medication_id',required=True,ondelete='cascade') discontinued = fields.Boolean('Discontinued') course_completed = fields.Boolean('Course Completed') admin_times = fields.One2many('medical.inpatient.medication.admin.time','name', "Admin times")

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é
how to update server and DB?
8.0 odoo
Avatar
Avatar
1
mars 15
4212
IntegrityError: null value in column "uom_id" violates not-null constraint ?
8.0 odoo
Avatar
1
mars 15
7454
how to call a rml report from button ?
8.0 odoo
Avatar
Avatar
1
mars 15
6674
bug: creating product depending in product templte
8.0 odoo
Avatar
0
mars 15
3835
how to configure routes WHM ?
8.0 odoo
Avatar
0
mars 15
4581
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