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)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

How to hide the Log note button in crm view from

Iscriviti

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

La domanda è stata contrassegnata
odooodoocommunityodoocrmodoocode
3 Risposte
12849 Visualizzazioni
Avatar
afjal khan

0
Avatar
Abbandona
Avatar
Gracious Joseph
Risposta migliore

To hide the Log Note button in the Chatter for the CRM view (or any other model) in Odoo, you are using an XML modification to override the mail.Chatter template. Here's how to ensure your approach works correctly:

1. Review Your Current Code

Your current XML code:

<templates xml:space="preserve">
    <t t-name="Chatter" t-inherit="mail.Chatter" t-inherit-mode="primary">
        <xpath expr="//button[@class='o-mail-Chatter-logNote']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
    </t>
</templates>

Checklist for your code:

  • Correct Template Name: Ensure mail.Chatter is the correct template to inherit. This is the main template for the Chatter component in Odoo.
  • XPath Accuracy: The XPath targets the Log Note button using the class o-mail-Chatter-logNote. Ensure the button has this class.
  • Inherit Mode: You are using t-inherit-mode="primary", which is correct for adding or overriding content in the parent template.

2. Common Issues

  • Incorrect Class: If the button class is dynamic or incorrect, the XPath will not match the element. Inspect the Chatter DOM in the browser (Developer Tools > Inspect) to verify the class.
  • Incorrect Template Loading: Ensure the XML file is loaded in the module's __manifest__.py file.
  • Incorrect Field Usage: The invisible attribute might not work as expected here. Use t-attributes to dynamically set visibility.

3. Fix the Code

If invisible doesn’t work, use t-attributes to hide the button dynamically:

<templates xml:space="preserve">
    <t t-name="Chatter" t-inherit="mail.Chatter" t-inherit-mode="primary">
        <xpath expr="//button[@class='o-mail-Chatter-logNote']" position="attributes">
            <attribute name="t-attributes">{'class': 'd-none'}</attribute>
        </xpath>
    </t>
</templates>

Here, the d-none class is added, which hides the button using Bootstrap's utility class.

4. Ensure XML File is Loaded

In the __manifest__.py file of your module, include the XML file:

'data': [
    'view/chatter_inherit.xml',
],

5. Test the Changes

  1. Restart your Odoo server:
    ./odoo-bin -c odoo.conf
    
  2. Upgrade your module:
    ./odoo-bin -u your_module_name
    
  3. Check the CRM view and ensure the Log Note button is hidden.

6. Debugging Tips

  • Inspect with Developer Tools: Ensure the Log Note button exists and the class matches your XPath.
  • Check Logs: Look for errors in the Odoo logs (odoo.log) if the changes don’t take effect.
  • Test XPath Separately: Use a broader XPath to ensure the targeting works:
    <xpath expr="//button" position="attributes">
        <attribute name="t-attributes">{'class': 'd-none'}</attribute>
    </xpath>
    

By following these steps, you should be able to successfully hide the Log Note button in the Chatter for the CRM view. Let me know if you need further assistance!

0
Avatar
Abbandona
Avatar
afjal khan
Autore Risposta migliore

Can you provide the full code?


0
Avatar
Abbandona
Avatar
Anaghan Heri
Risposta migliore

Hi you can inherit a CRM XML view and add inside CSS value 


                  


.o_ChatterTopbar_buttonLogNote{

            display: none;

   }

                     

                   

0
Avatar
Abbandona
Nimesh Parikh

Is it possible to keep it on based on state, like the button should get invisible if project.state is done

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à
In Odoo CRM, when you make changes to a CRM lead in the form view (e.g., updating the stage in crm.crm_lead_view_form), you want the lead to automatically appear at the top of the Kanban view (crm.crm_case_kanban_view_leads).
kanban odoo odoocommunity odoocrm
Avatar
0
ott 24
1652
How to hide the Log note button in crm view from with code
odoo odoocommunity Odoo18.0 odoocrm
Avatar
0
set 24
1381
Here I am adding the filed in crm activity from after the Due Date I want time filed but show this error
odoo odoocommunity
Avatar
0
set 24
1484
Inquiry About Odoo SMS Module Pricing in India
odoo odoocommunity odoosms
Avatar
0
ott 24
1513
How to hide the Log note button in crm view from
odoo odoocommunity odoo17
Avatar
Avatar
2
set 24
1745
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