Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Sociale media-marketing
    • E-mailmarketing
    • Sms-marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

How to hide button in Header

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
3 Antwoorden
37391 Weergaven
Avatar
Maik Steinfeld

Hello,

i am trying to hide a button in the header section of a form view:

<field name="arch" type="xml">
            <form string="Collect Order" version="7.0">
            <header>
                <button name="become_interested" states="draft, confirmed" string="Interest" type="object" attrs="{'invisible':[('interested','=',True)]}" class="oe_highlight" />
                <button name="lost_interested" states="draft, confirmed, price, pending" string="Lost Interest" type="object" class="oe_higlhight" attrs="{'invisible': [('interested','=',False)]}" />
                <button name="interest_to_buy" states="pending" string="Order" type="object" class="oe_highlight"/>
                <field name="state" widget="statusbar" nolabel="1" />
            </header>

Under attrs Tag the invisible doesn't work. Does i have a typo or programming error, i don't see?

1
Avatar
Annuleer
Gustavo

how about modifying the CSS stylesheet?

Maik Steinfeld
Auteur

but shouldn't it work this way? i had a look at accounting module, and there are also buttons made invisible this way...

Avatar
Atchuthan - Technical Consultant, Sodexis Inc
Beste antwoord

Use either states or attrs:

Your code:

<button name="become_interested" states="draft, confirmed" string="Interest" type="object" attrs="{'invisible':[('interested','=',True)]}" class="oe_highlight" />

Try using this code:

<button name="become_interested" string="Interest" type="object" attrs="{'invisible':['|','|',('interested','=',True),('state','!=','draft'),('state','!=','confirmed')]}" class="oe_highlight" />
7
Avatar
Annuleer
Maik Steinfeld
Auteur

will have a try this evening and answer. typo failure: type="object should be closed with " , right?

Atchuthan - Technical Consultant, Sodexis Inc

@Steinfeld, just add a double quotation at the end object like type="object"

Maik Steinfeld
Auteur

Tried and verify with a little modification: <button name="become_interested" string="Interested" type="object" attrs="{'invisible':['|',('interested','=',True),('state','not in',['draft','confirmed'])]}" class="oe_highlight" />

Avatar
Anas Taji
Beste antwoord

Try to add invisible="1" to the button you want to hide permanently. .%

3
Avatar
Annuleer
Avatar
Vikram
Beste antwoord

Hello Maik, I come to same problem for hiding a button in header button, Now i get solution, Here i share you. My scenario is to hide a print button in header when state is draft & sent. So i use attributes tag for this. Again i inherit button print once again. In base module already to 2 lines Please refer below, so i hide that 2 lines for my customized one.

    <button name="print_quotation" position = "attributes" > 
        <attribute name = "invisible">1</attribute>
    </button>

To Hide and Inherit a print button :

<xpath expr="//form/header/button[@name='action_quotation_send']" position="after"> <button name="print_quotation" string="Print" type="object" states="draft" class="oe_highlight" groups="base.group_user" invisible="1"/> <button name="print_quotation" string="Print" type="object" states="sent" groups="base.group_user" invisible="1"/> <button name="print_quotation" string="Print" type="object" class="oe_highlight" attrs="{'invisible': [('state','not in',('manual','progress'))]}" groups="base.group_user"/> </xpath>

I hope you may get some idea.. Thanks for your time

Vikram.V

1
Avatar
Annuleer
Maik Steinfeld
Auteur

did you see, that i marked the question as solved?

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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