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

"Optional" Field Property to NEITHER "Show by default" nor "Hide by default" in Odoo Studio

S'inscrire

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

Cette question a été signalée
customizationUIodoo studio
2 Réponses
775 Vues
Avatar
Kiko Cruz

Hi, this might be a minor thing but has some usefulness for user experience... does anyone know how to set the Optional field property in Odoo Studio to be neither "Show by default" or "Hide by default," meaning, it's left blank (like the screenshot on the right)? As of now, you can't choose blank.

The reason why I'm asking is that I noticed that default list columns that cannot be hidden (by selecting that upper right column selector on view tables) have no Optional value set. See below example (for PO Form's Unit Price column in the items list) behavior if the Optional field is blank like above right.


Stupid as it may seem, but some users would get confused if they accidentally hid the field (and don't know how to make it appear. So better not to allow anyone choose to hide some fields in a list (like what Odoo has made on key columns, like Unit Price and Quantity in PO forms.

Help on a workaround is very much appreciated. I'm using Odoo Online (v18.4e).

0
Avatar
Ignorer
Avatar
Paresh Wagh
Meilleure réponse

Hi Francis:

Studio does not allow you to do this directly but you can do it if you are familiar with developer mode and XML.

Here's a work around for this using Studio since it is not natively supported by Studio:

  1. Activate Developer Mode (Settings > General Settings).
  2. Open the view in Studio and go to the field you want to edit like you normally do.
  3. Change the value of "Optional" so Studio generates the XML for the customization.
  4. Click on the "View" tab on the left and then on the "XML" button like so.
  5. This will open the XML of the customization. Look for the part where the "optional" property of the field is changed and remove the value within the tag like so to leave it empty.
  6. Save the changes.

Your field will now be permanently visible and will be removed from the list of fields on the right.

NOTE: Make sure you are making the edits in a view whose name starts with "Odoo Studio: ..." and not one of Odoo's built in views.

1
Avatar
Ignorer
Kiko Cruz
Auteur

Thank you Paresh! Thank you for the detailed steps!

And I appreciate the warnings to lessen risk in editing underlying base view XML. I'll have to take note first that a form or view needs to be edited for the first time in Odoo Studio for its XML view with name starting "Odoo Studio" to be created and customized further.

Avatar
Rani Tathod
Meilleure réponse

In Odoo Studio, the "Optional" field property is designed to either show or hide fields by default, but not leave them blank.



  To achieve a similar effect, consider setting the field to "Show by default" and then use access rights to control visibility.

  Alternatively, customize the view XML to remove the "optional" attribute for specific fields.

  Test the changes in a development environment to ensure they meet your user experience needs.


If you'd like to explore this further for your use case, you're welcome to connect with us at Pragmatic Techsoft.

-1
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é
module Extention/ Customization
customization
Avatar
Avatar
Avatar
Avatar
Avatar
5
août 24
4080
How to add a Table to a contacts form view.
UI
Avatar
0
août 23
1857
How to custom our Odoo LMS page?
customization
Avatar
0
janv. 22
3188
How to remove the "Create & Edit" on order lines ? Résolu
customization
Avatar
1
mars 25
5178
How to use AND conditions in the search bar instead of OR ? Résolu
customization
Avatar
1
sept. 21
6853
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