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

creating new module that inherits from custom modules

S'inscrire

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

Cette question a été signalée
pythonodoo9
1 Répondre
7073 Vues
Avatar
amina

I was trying to add some fields to my new module which contains 5 classes 2 of them inherit from custom modules ( product.template/res.partner) those classes are related with relational fields, I have tried so many ways to make it work and correct many errors but now stuck with this one  

ParseError: "Invalid view definition

details of error :
the field `date_intv` doesn't existe 

Contexte de l'erreur :
Vue `intervention.form`
[view_id: 2592, xml_id: n/a, model: c.intervention, parent_id: n/a]
None" while parsing file:///C:/Program Files (x86)/Odoo 9.0-20151125/server/openerp/addons/Gestion_CVT/fileds_intervention.xml:5, near
<record model="ir.ui.view" id="intervention_form">
                <field name="name">intervention.form</field>
                <field name="model">c.intervention</field>
                <field name="type">form</field>
                <field name="arch" type="xml">
                    <form string="formulaire">
                        <field name="type_int"/>
                        <field name="properties4"/>
						<field name="date_intv"/>
                    </form>
                </field>
            </record>

manchening also that I have already used the osv.osv but didn't work with the equipement class because I was adding class by class  so  now I changed them all to models.Model  so here is my .py file

# -*- coding: utf-8 -*-

from openerp import models, fields, api

class centre(models.Model):

_name = 'res.partner'

_inherit = ['res.partner']

rs_ctr = fields.Char(string='Réseau')

nb_ligne = fields.Integer(string='Lignes')

n_agr = fields.Integer(string='N° d\'agrèment')

chef = fields.Char(string='Chef centre')

prp = fields.Char(string='Propriétaire')

equipement_id = fields.Many2one('c.intervention','Interventions',select=True,required=True)

properties1 = fields.One2many('product.template','centre_id','Centres')

centre()

class equipement(models.Model):

_name = 'product.template'

_inherit = ['product.template']

name = fields.Char(string='Nom')

num_ligne = fields.Integer(string='N° ligne')

model_mat = fields.Char(string='Model de materiel')

centre_id = fields.Many2one('res.partner','Centres',select=True)

marque_id = fields.Many2one('c.marque','Marques',select=True)

properties2 = fields.One2many('c.eptinv','equipement_id','Equipements')

equipement()

class marque(models.Model):

_name = 'c.marque'

_description = 'Marques'

name = fields.Char(string='Nom')

nom_four = fields.Char(string='Fournisseur')

properties3 = fields.One2many('product.template','marque_id','Marques')

marque()

class intervention(models.Model):

_name = 'c.intervention'

STATE_SELECTION = [('c','Corrective'),('p','Préventive')]

_description = 'Interventions'

name = fields.Char(string='Nom')

type_int = fields.Selection(STATE_SELECTION,'Type d\'intervention')

properties4 = fields.One2many('c.eptinv','intervention_id','Interventions')

intervention()

class eptinv(models.Model):

_name = 'c.eptinv'

_description = 'EptInv'

date_intv = fields.Date(string='Date d\'intervention')

equipement_id = fields.Many2one('product.template','Equipements')

intervention_id = fields.Many2one('c.intervention','Interventions')

eptinv()

0
Avatar
Ignorer
Avatar
Manali Kalariya
Meilleure réponse
please refer this site -->

http://stackoverflow.com/questions/34896532/creating-new-module-that-inherits-from-custom-modules/34898101?noredirect=1#comment57580069_34898101

Same Question is asking into that...  so i hope you will be get the Answer for your Query. If you still get the Error then Ask me .. If this Answer is helpful then Accept the Answer and provide upvote... Thank you


0
Avatar
Ignorer
amina
Auteur

thankyou for your reply well it happens to be my question I have posted in that site so thankyou one more time

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é
Does odoo9 has a auto reload function?
python odoo9
Avatar
0
févr. 17
3626
ODOO9: How to make a function called automatically!! Résolu
python odoo9
Avatar
Avatar
Avatar
4
janv. 16
7146
ODOO9: invisible field through a python function
python xml odoo9
Avatar
Avatar
4
juil. 20
9255
How to get current menu_id
python menuitem odoo9
Avatar
0
déc. 19
4381
Odoo 9 populate a reference field using automated action
python reference odoo9
Avatar
0
juin 18
4466
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