Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
5956 Представления

I have added some field in account invoice report and i want to make those field be visible only in state Paind and Open. how can i achieve it.

<xpath expr="//span[@t-field='o.amount_total']/../.." position="after">
                <t t-if="get_report_setting('print_payment_info', o)">
                    <tr class="border-black">
                        <td>Paid to date</td>
                        <td class="text-right">
                            <span t-esc="o.amount_total-o.residual" t-esc-options='{"widget": "monetary", "display_currency": "o.currency_id",}'/>
                        </td>
                    </tr>
                    <tr>
                        <td><strong>Balance amount</strong></td>
                        <td class="text-right">
                            <span t-field="o.residual" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
                        </td>
                    </tr>
                </t>
            </xpath>
Аватар
Отменить
Лучший ответ

Hi,

You can add a if condition based on the state to achieve this,

<t t-if="doc.state in ['done', 'open']">
<t t-raw="doc.field_name"/>
</t>

This is a sample. Adjust it accordingly with yours

Thanks

Аватар
Отменить
Лучший ответ

Hi, 

i want to add invoice state  in sale order periodic report,please help

thanks

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
окт. 24
1752
0
авг. 24
1574
0
янв. 24
2063
1
нояб. 23
1778
0
июн. 23
2099