Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

How to hide the Log note button in crm view from

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
odooodoocommunityodoocrmodoocode
3 Besvarelser
12855 Visninger
Avatar
afjal khan

0
Avatar
Kassér
Avatar
Gracious Joseph
Bedste svar

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
Kassér
Avatar
afjal khan
Forfatter Bedste svar

Can you provide the full code?


0
Avatar
Kassér
Avatar
Anaghan Heri
Bedste svar

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


                  


.o_ChatterTopbar_buttonLogNote{

            display: none;

   }

                     

                   

0
Avatar
Kassér
Nimesh Parikh

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

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
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
okt. 24
1653
How to hide the Log note button in crm view from with code
odoo odoocommunity Odoo18.0 odoocrm
Avatar
0
sep. 24
1383
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
sep. 24
1486
Inquiry About Odoo SMS Module Pricing in India
odoo odoocommunity odoosms
Avatar
0
okt. 24
1514
How to hide the Log note button in crm view from
odoo odoocommunity odoo17
Avatar
Avatar
2
sep. 24
1745
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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