Skip to Content
Menu
This question has been flagged
1 Reply
4207 Views

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
Discard
Author Best Answer

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
Discard

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 Replies Views Activity
2
Sep 24
255
5
Aug 19
45067
4
Jun 18
17984
0
Jun 18
2335
2
May 16
14963