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

i want to print report base on condition

Iscriviti

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

La domanda è stata contrassegnata
reportingodoov15
1 Rispondi
3765 Visualizzazioni
Avatar
Ra_one_1_11

hello everyone ,


i have 5 date fields and i deed to print report which is 5 page. so i need if date1 is add so print page 1 , if date2 is add so print page 2 


is tahat possible or not ??


thanks in advance 

0
Avatar
Abbandona
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Risposta migliore

Hi,

Suppose you have the fields date1, date2, date3, date4, and date5. As you mentioned, you have 5 pages in the report template. So, you can add conditions based on the date fields.
For example, if you have already placed the contents of each pages in a block like a division:

<div t-if="date1">


    <!--  Page 1 code  -->


</div>


<div t-if="date2">


    <!--  Page 2 code  -->


</div>


<div t-if="date3">


    <!--  Page 3 code  -->


</div>


<div t-if="date4">


    <!--  Page 4 code  -->


</div>


<div t-if="date5">


    <!--  Page 5 code  -->


</div>




If you don't have any such blocks, you can add one. Since it is a template, you can also use the t tag:

<t t-if="date1">


    <!--  Page 1 code  -->


</t>


<t t-if="date2">


    <!--  Page 2 code  -->


</t>


<t t-if="date3">


    <!--  Page 3 code  -->


</t>


<t t-if="date4">


    <!--  Page 4 code  -->


</t>


<t t-if="date5">


    <!--  Page 5 code  -->


</t>


Regards

1
Avatar
Abbandona
Ra_one_1_11
Autore

this is not possible because i dont have 5 different pages but i add loop for pages . in my report two colums first is content and second is number . the conytent are same for all page but number are different for all pages .

Cybrosys Techno Solutions Pvt.Ltd

So, you have a report with 2 columns. Are the numbers in the second column unique for each date? (You just mentioned that the numbers are different for all pages.) If yes, then you can add a variable in the report where you can set the value there based on the dates and use that variable within the for loop to add only matching rows. For example,
<!-- Set the number corresponding for the date in col_val. 1 to 5 is used here for example and 0 as default value -->
<t t-set="col_val" t-value="0" />
<t t-if="date1">
<t t-set="col_val" t-value="1" />
</t>
<t t-if="date2">
<t t-set="col_val" t-value="2" />
</t>
<t t-if="date3">
<t t-set="col_val" t-value="3" />
</t>
<t t-if="date4">
<t t-set="col_val" t-value="4" />
</t>
<t t-if="date5">
<t t-set="col_val" t-value="5" />
</t>

If you have used the for loop in <tr>, move it into another block and add the condition in <tr> for the table body.

<t t-foreach="rows" t-as="row">
<tr t-if="col_val == row.number">
<td><span t-esc="row.content" /></td>
<td><span t-esc="row.number" /></td>
</tr>
<t>

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à
ODOO 15 for "Einnahmenüberschussrechnung EÜR"
reporting v15
Avatar
Avatar
Avatar
2
ago 25
3880
report layout generates error on pdf export but works in preview
reporting v15
Avatar
Avatar
1
apr 25
5320
Reports: table headers repeating PO vs SO Risolto
reporting v15
Avatar
Avatar
2
lug 24
6906
Insert image into a report Risolto
reporting v15
Avatar
Avatar
1
apr 24
2638
How to hide the add detail line button of an order
odoo v15
Avatar
1
dic 23
3404
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