Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5055 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit

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

Related Posts Odpovědi Zobrazení Aktivita
2
zář 24
2653
5
srp 19
47123
4
čvn 18
20800
0
čvn 18
3792
2
kvě 16
17854