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

Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!(its a custom field))

S'inscrire

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

Cette question a été signalée
customizeodooOdoo13.0
1 Répondre
4707 Vues
Avatar
Arun

i tried to delete one of my custom field (ex: x_yz). when i save error popup.

Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!


but in miscellaneous, it show type custom field.

how to delete this field

Even when i create or edit , the error in shown up

0
Avatar
Ignorer
Avatar
Syama Prajith
Meilleure réponse

Hi Arun

The error message "Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!" indicates that you're attempting to modify a field that Odoo considers a base field. Base fields are essential fields that are part of Odoo's core framework and cannot be directly edited through the user interface.

In your case, the field "x_yz" is likely considered a base field, even though it appears under the "Custom Field" category in Odoo's Miscellaneous section. This could be due to its underlying relationship with another model or its involvement in some core Odoo functionality.  

To delete this field, you'll need to modify it through Python code. Follow these steps:

  1. Create a Custom Addon: Create a new Odoo module to house the code for deleting the field. This will allow you to make changes to Odoo's code without directly modifying the core files.
  2. Locate the Field Definition: Identify the model where the field "x_yz" is defined. This can be found in the model's .py file, usually under the fields attribute.
  3. Remove the Field Definition: Remove the field definition from the model's fields attribute. This will effectively remove the field from the model and its associated views.
  4. Update the Odoo Database: Once you've modified the field definition, you need to update the Odoo database to reflect the change. This can be done by restarting the Odoo server or manually clearing the database cache.
  5. Verify the Field Deletion: After the Odoo server restarts or the cache is cleared, check the model's form view to ensure the field "x_yz" has been removed.

Here's an example code snippet for removing the field "x_yz" from the res.partner model:

class PartnerCustom(models.Model):

    _inherit = 'res.partner'


    def _remove_x_yz_field(self):

        # Remove the x_yz field from the model's fields attribute

        del self._fields['x_yz']


        # Update the database to reflect the change. This might require restarting the Odoo server or clearing the database cache.


This code defines a new class PartnerCustom that inherits from the res.partner model. It defines a method _remove_x_yz_field that removes the field x_yz from the model's fields attribute. This method can be called to remove the field from the database.


Thanks,

Syama Prajith 

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é
Add New Operation Type in Warehouse Résolu
odoo Odoo13.0
Avatar
Avatar
Avatar
2
déc. 24
5213
Unable to use TensorFlow in Odoo module Résolu
odoo Odoo13.0
Avatar
Avatar
1
nov. 25
4080
Low Stock methods
customize odoo
Avatar
Avatar
Avatar
2
août 23
3217
how to get values from a res config settings field Résolu
odoo Odoo13.0
Avatar
Avatar
Avatar
2
avr. 23
19830
Getting password reset invitation mail for inactive user in Odoo13? Résolu
odoo Odoo13.0
Avatar
Avatar
1
mars 23
3295
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