跳至内容
菜单
此问题已终结
1 回复
4995 查看

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>

形象
丢弃
编写者 最佳答案

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>

形象
丢弃

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

相关帖文 回复 查看 活动
2
9月 24
2532
5
8月 19
47040
4
6月 18
20679
0
6月 18
3720
2
5月 16
17736