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

xml condition in base.xml depends by viewed model

Iscriviti

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

La domanda è stata contrassegnata
xmlwebaddonsbase.xml
2 Risposte
24384 Visualizzazioni
Avatar
LukaszK

Hello,


I want to add condition to base.xml that if i'm view some model then show me this code.

So i add t-if but it don't work:

my code add to base.xml :


<t t-if="widget.model == 'hr.recruitment.agency.skills'"> 

<div class="row">
   <div class="col-md-6">
       <h2>Test</h2>
       <p>Test Test Test Test Test Test </p>
   </div>    
</div>
      </t>


in


<t t-name="ControlPanel">
    <div class="oe-control-panel">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-6 oe-cp-title">
                    <ol class="oe-view-title breadcrumb">
                    </ol>
                </div>
                <div class="oe-cp-search-view col-md-6" />
            </div>
            <div class="row">
                <div class="col-md-6 oe-button-column">
                    <div class="oe-cp-buttons"></div>
                    <div class="oe-cp-sidebar"></div>
     
                </div>
                <div class="col-md-6">
                    <div class="oe-search-options btn-group"/>
                    <div class="oe-right-toolbar">
                        <div class="oe-cp-pager"></div>
                        <div class="oe-cp-switch-buttons btn-group btn-group-sm"></div>
                    </div>
                </div>
    
            </div>
   
           <t t-if="widget.model == 'hr.recruitment.agency.skills'"> 

<div class="row">
   <div class="col-md-6">
       <h2>Test</h2>
       <p>Test Test Test Test Test Test </p>
   </div>    
</div>
      </t>  

        </div>
    </div>
</t>


but this depends <t t-if="widget.model == 'hr.recruitment.agency.skills'">

don't work.


Any idea ?



2
Avatar
Abbandona
Avatar
Levenez Morgan
Risposta migliore

Hi,

because widget.model undefine.

use widget.field_manager.dataset._model.name

or other depending on version odoo

1
Avatar
Abbandona
LukaszK
Autore

Hi Shurshilov,

Thx for answer but I do not understand it :(

Can you show me some sample ?

Best regards,

Lukasz

Avatar
LukaszK
Autore Risposta migliore

Hi Shurshilov,


Thx for answer but I do not understand it :(

Can you show me some sample ?


Best regards,

Lukasz


1
Avatar
Abbandona
Levenez Morgan

<t t-if="widget.field_manager.dataset._model.name == 'hr.recruitment.agency.skills'">

Levenez Morgan

say the version of the ode, this may depend on the code

LukaszK
Autore

@Shurshilov I use Odoo9

LukaszK
Autore

to be more accurate it's 9.0c

Levenez Morgan

use <t t-if="widget.field_manager.dataset._model.name == 'hr.recruitment.agency.skills'">

LukaszK
Autore

Unfortunettly it don't work.

Page stuck on load: http://scr.hu/0e1mq/x9n8w

OdooBot
hmm, screenshot console onload page pls


24.11.2017, 17:01, "LukaszK" <lukaszkaptur.glosema@gmail.com>:

Unfortunettly it don't work.

Page stuck on load: http://scr.hu/0e1mq/x9n8w

--
LukaszK


Sent by Odoo S.A. using Odoo.

LukaszK
Autore

Hi @Shurshilov

Sorry for not response i was on holiday without access to internet.

So, it stuck like that: https://scr.hu/0e1mq/x9n8w

I upload my whole base.xml: https://www.pastiebin.com/5a2e610da3f06

Can you look for that ?

LukaszK
Autore

Added line 174-177

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à
xml condition in base.xml to check the source model ?
xml base.xml
Avatar
Avatar
1
mar 15
18327
Why do I get "openerp.modules.module: Couldn't load module web" after reboot? Risolto
web addons
Avatar
Avatar
2
gen 24
15773
Adding addons path makes web interface fail
web addons odoo11
Avatar
2
dic 19
3485
Problem only in eclipse: Failed to load server-wide module `web`
development web addons environment
Avatar
Avatar
2
mar 15
9368
How to insert custom widget in openerp 6.1
xml web widget qtweb
Avatar
Avatar
1
mar 15
8487
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