Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
documents spreadsheets #Honduras #cursobloqueado #leccionesterminadas
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
documents spreadsheets #Honduras #cursobloqueado #leccionesterminadas
Sul forum
  1. Documents
  2. Forum

Add new fields inside documents inspector

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
documentsinspector
3 Risposte
5804 Visualizzazioni
Avatar
reham almahroom

can you help me please to add a new field inside documents inspector 
(add field inside black side of document information "that shown in below image")  



0
Avatar
Abbandona
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Risposta migliore

Hi,

To add a field in document inspector, You need to push the field to inspectorFields. /** @odoo-module */
import { inspectorFields} from "@documents/views/inspector/documents_inspector";

inspectorFields.push("accessed_user_ids");


After that you can call the field in the XML using Xpath. The template name is documents.DocumentsInspector.documentsInfo.


Hope it helps

1
Avatar
Abbandona
Tom Rubino

could you be a bit more specific on how to do that please? Right now I have the field as x_studio_document_name. When you say push the field what does that mean?

Avatar
Alberto
Risposta migliore

How work in odoo 17?

0
Avatar
Abbandona
Avatar
Gracious Joseph
Risposta migliore

To add a new field inside the Documents Inspector panel in Odoo, as shown in the provided image, you can achieve this by customizing the documents.document model and the corresponding inspector view. Here’s how you can add a field step-by-step:

1. Enable Developer Mode

  1. Go to Settings > General Settings.
  2. Activate Developer Mode (find the option in the settings menu or from your user menu dropdown).

2. Add a Custom Field to the documents.document Model

You need to add a custom field to the model that powers the Documents module.

Option 1: Using Studio (Enterprise Only)

  1. Navigate to Documents > Configuration > Documents.
  2. Open Odoo Studio (if available).
  3. Drag and drop a new field into the form view for documents.
  4. Save the changes.

Option 2: Using a Custom Module (Community or Enterprise)

If you're using Odoo Community or prefer to work with code:

  1. Create a custom module or use an existing one.
  2. Add the following code to extend the documents.document model:
    from odoo import models, fields
    
    class DocumentsDocument(models.Model):
        _inherit = 'documents.document'
    
        custom_field = fields.Char(string="Custom Field")
    
  3. Update your module by running:
    odoo-bin -u your_module_name
    

3. Add the Field to the Documents Inspector View

The Documents Inspector panel is a special view tied to the documents.document model. You need to extend this view to include your custom field.

  1. Create a new XML file in your custom module, e.g., views/documents_inspector_view.xml.
  2. Add the following code to include the custom field:
    <odoo>
        <record id="view_document_inspector_inherit" model="ir.ui.view">
            <field name="name">documents.inspector.inherit</field>
            <field name="model">documents.document</field>
            <field name="inherit_id" ref="documents.documents_inspector_sidebar_view"/>
            <field name="arch" type="xml">
                <xpath expr="//div[@class='o_inspector_body']" position="inside">
                    <div>
                        <field name="custom_field" placeholder="Enter custom value here"/>
                    </div>
                </xpath>
            </field>
        </record>
    </odoo>
    
  3. Update your module to apply the changes:
    odoo-bin -u your_module_name
    

4. Verify the Changes

  1. Navigate to the Documents app.
  2. Select a document and open the Inspector Panel (the right-hand side panel).
  3. You should now see your custom field displayed in the panel.

5. Optional: Make the Field Editable or Dynamic

  • To make the field editable directly in the Inspector panel, ensure the field is not readonly.
  • If you need additional logic, such as dynamically setting the field value or adding validation, you can use Python methods or JavaScript.

6. Troubleshooting

  • If the changes do not appear:
    • Clear the Odoo cache by restarting the server.
    • Refresh your browser or clear the browser cache.
  • Check the Odoo logs for errors if the inspector panel does not load.

Let me know if you encounter any issues or need further assistance!

0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Windows Desktop Sync with Odoo Online Documents
documents
Avatar
Avatar
1
ago 25
814
Access rights for individual user workspaces
documents
Avatar
0
mar 24
4174
Link Documents to Contacts
documents
Avatar
Avatar
Avatar
Avatar
3
ott 24
6200
Odoo v16 Documents App. How can I manage versions of Documents?
documents
Avatar
0
ago 23
3878
How can I Edit InDesign documents in a web browser?
documents
Avatar
0
mar 23
4170
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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