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

Hide fields in Filters And Group By

Iscriviti

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

La domanda è stata contrassegnata
python3odoo11.0Jquery
3 Risposte
17041 Visualizzazioni
Avatar
Ibrahim Boudmir

Hi All, 
How to hide Fields in Filters and Group by in kanban, list, pivot.. views ? 

Thanks. 

0
Avatar
Abbandona
Cybrosys Techno Solutions Pvt.Ltd

You already have answered it here : https://www.odoo.com/forum/help-1/question/hide-filter-name-from-add-custom-filter-drop-down-147813

Ibrahim Boudmir
Autore

that was only the Filters' part ;)

I prefered to join the answer for both cases ( Filters and Group By) in one post.

Avatar
Ibrahim Boudmir
Autore Risposta migliore

Answer: 

There are two parts : 
A- Filters : 

Please follow this link  : https://www.odoo.com/fr_FR/forum/aide-1/question/hide-filter-name-from-add-custom-filter-drop-down-147813#answer-147820.

B- Group by : 

In Odoo11, add a Js file to your module:  controlpanel.js

then paste this : 

odoo.define('module.ControlPanel', function (require) {
    'use strict';
    var ControlPanel = require('web.ControlPanel');
    ControlPanel.include({
        _update_search_view: function(searchview, is_hidden) {
            this._super.apply(this, arguments);
            if(searchview){
                this._rpc({
                        model: 'your.model.name',
                        method: 'the_function_that_returns_list_of_field_to_hide_in_group_by',
                }).then(function (result) {
                    for(var i=0;i<result.length;i++){
                        searchview.$buttons.find('option[data-name="' + result[i] + '"]').hide();
                    }
                    })
            }
            },
        });
});

Then add a xml file to consider your JS : template.xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="assets_backend_extension" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="Path_to_your_js_file"></script>
</xpath>
</template>
</data>
</odoo>
and finally, add your Xml file to your manifest and update your module.

Explanation :
Until now, i couldn't figure out how to not consider the fields before the construction of the
option elements
. So what i did, is just hide Them.
The RPC is for calling the python function that i already added to list all the fields i want to hide in Group By. for ex :
@api.model
def get_fields_to_ignore_in_search(self):
return ['field1', 'field2', 'field3']
2
Avatar
Abbandona
Manish Bohra

Thanks it's working for me in group by but i have query related to can hide filter in group by using python like

you suggest in above link

https://www.odoo.com/fr_FR/forum/aide-1/question/hide-filter-name-from-add-custom-filter-drop-down-147813#answer-147820.

Avatar
Vishal Kaladiya
Risposta migliore

You can use this module to hide any fields, or views from any models by the model's access rights feature,
Here you will just need the functional knowledge of this module and you will be able to customize the hide show anything from any user.
https://www.terabits.xyz/simplify_access_management#bt-pills-fields

Thanks

0
Avatar
Abbandona
Avatar
EnayfuoS
Risposta migliore

As an alternative to Boudmir's answer (Group By part), you can override the get_groupable_fields of web.Widget component defined in search_menu.js.

Then you have to create an xml file just like mentionned in Boudmir's answer to consider your new js file.

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à
make my function work forever
python3 odoo11.0
Avatar
Avatar
1
gen 20
3708
add python function to specific action
python3 odoo11.0
Avatar
0
gen 20
3985
valid logged in user
python3 odoo11.0
Avatar
Avatar
1
dic 19
4795
Add dynamic domain to allocation leave type
onchange python3 odoo11.0
Avatar
Avatar
1
mag 24
3738
Group by function / computed field with out ==> “store = True” in odoo 11 Risolto
python3 odoo11community odoo11.0
Avatar
Avatar
1
mar 22
14472
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