Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
5015 Visualizzazioni

I am creating a report that is based on the sale.order model, I want to show whether or not the order has been paid which is in the account.invoice model. The link between them is docs.invoice_ids = account_invoice.number, is there a way to pull this information into my report?

<t t-if="docs.invoice_ids == account_invoice.number and account_invoice.state != 'Paid'">
    <b>****ORDER UNPAID****</b>
</t>
<t t-else="">
    ****ORDER PAID****
</t>

Avatar
Abbandona
Autore Risposta migliore

I worked it out.. :)

<t t-if="docs.invoice_ids.state != 'paid'">
<b>****ORDER UNPAID****</b>
</t>
<t t-else="">
****ORDER <span style="text-transform: uppercase" t-esc="docs.invoice_ids.state"/>****
</t>

Avatar
Abbandona

It will work fine as long as there is only single invoice for the sale order. You will get error message if there is multiple invoice for the sale order

Post correlati Risposte Visualizzazioni Attività
2
set 24
2612
5
ago 19
47093
4
giu 18
20746
0
giu 18
3747
2
mag 16
17782