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 do tree view column invisible. Odoo17 Dynamic column_invisible --> EvalError: Can not evaluate python expression: (bool(is_vendor_group == True))

Iscriviti

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

La domanda è stata contrassegnata
invisibleodoo17V17.0
1 Rispondi
3983 Visualizzazioni
Avatar
Silambarasan P

is_vendor_group = fields.Boolean(compute='_compute_is_vendor_group',readonly=True)


def _compute_is_vendor_group(self):

current_user=self.env.user

print('current_user',current_user.name,"current_user",current_user.user_has_groups('fmcg_custom_module.group_order_vendor'))

for rec in self:

if not current_user.user_has_groups('fmcg_custom_module.group_order_vendor'):

rec.is_vendor_group=True

else:

rec.is_vendor_group=False

IN TREE VIEW​

<field name="vender_name" invisible="is_vendor_group == True"  />
      <field name="vender_name" invisible="is_vendor_group"  />        ---> Value is invisible but, column(label) name show.

i want column_invisible  (column name & value)     
<field name="vender_name" column_invisible="is_vendor_group == True"  />
      <field name="vender_name" column_invisible="is_vendor_group"  />  --> use this getting error

      
UncaughtPromiseError > OwlError

Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)

OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)

    Error: An error occured in the owl lifecycle (see this Error's "cause" property)

        at handleError (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:916:101)

        at App.handleError (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:1559:29)

        at Fiber._render (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:941:19)

        at Fiber.render (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:939:6)

        at ComponentNode.initiateRender (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:1009:47)


Caused by: EvalError: Can not evaluate python expression: (bool(is_vendor_group))

    Error: Name 'is_vendor_group' is not defined

    EvalError: Can not evaluate python expression: (bool(is_vendor_group))

    Error: Name 'is_vendor_group' is not defined

        at evaluateExpr (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:3071:54)

        at evaluateBooleanExpr (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:3074:8)

        at ListController.evalViewModifier (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9696:35)

        at ListRenderer.evalColumnInvisible (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9844:56)

        at http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9745:9

        at Array.filter (<anonymous>)

        at ListRenderer.getActiveColumns (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9743:47)

        at ListRenderer.setup (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9737:456)

        at new ComponentNode (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:1004:202)

        at http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:1557:6

& 
UncaughtPromiseError > OwlError

Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)

OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)

    Error: An error occured in the owl lifecycle (see this Error's "cause" property)

        at handleError (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:916:101)

        at App.handleError (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:1559:29)

        at Fiber._render (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:941:19)

        at Fiber.render (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:939:6)

        at ComponentNode.initiateRender (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:1009:47)


Caused by: EvalError: Can not evaluate python expression: (bool(is_vendor_group == True))

    Error: Name 'is_vendor_group' is not defined

    EvalError: Can not evaluate python expression: (bool(is_vendor_group == True))

    Error: Name 'is_vendor_group' is not defined

        at evaluateExpr (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:3071:54)

        at evaluateBooleanExpr (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:3074:8)

        at ListController.evalViewModifier (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9696:35)

        at ListRenderer.evalColumnInvisible (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9844:56)

        at http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9745:9

        at Array.filter (<anonymous>)

        at ListRenderer.getActiveColumns (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9743:47)

        at ListRenderer.setup (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:9737:456)

        at new ComponentNode (http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:1004:202)

        at http://localhost:8069/web/assets/bd2863e/web.assets_web.min.js:1557:6

Please Give Solution
        

0
Avatar
Abbandona
Jenish M

I have similar error in my xml,
while i check the odoo default uses in base modules, all the codes suggest me to use context value, try to add the field value in context and use context.get in column_invisible, may be this will help you

Avatar
Accurate | www.accurates.com.sa
Risposta migliore

Use the below approach to hide both the column (header) and values dynamically and ensure is_vendor_group is Passed in Context
<field name="vender_name" column_invisible="context.get('is_vendor_group', False)"/>

Regards,
Milu
Accurates

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à
Inventory Reporting Access Level Risolto
V17.0
Avatar
Avatar
Avatar
Avatar
3
ott 25
2349
Error while posting invoice to ZATCA odoo sh Risolto
odoo17
Avatar
Avatar
Avatar
Avatar
3
lug 25
3363
How to send a real-time notification to POS UI using bus.bus in Odoo 17?
odoo17
Avatar
Avatar
1
giu 25
5932
Odoo time-sheets rights to add
odoo17
Avatar
Avatar
2
mag 25
3249
POS is not recognizing short barcodes like "95" or "96" (Code 39 or custom short codes)
odoo17
Avatar
1
mag 25
2241
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