Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
4503 Prikazi

Hi Guys,

I am customizing my invoice.

I have created a new xml file with inherited "account.report_invoice_document".

I used xpath to totally replace the section  <table class="table table-condensed">

My problem is that i cannot hide the payment term.

Your kindness is much appreciated.

Thank you guys.

 Here is the code from account.report_invoice_document i was to hide:
           <p t-if="o.payment_term_id">

                <span t-field="o.payment_term_id.note"/>

            </p>



Avatar
Opusti
Best Answer

Hi Charlie,

I've made a pull request to Odoo 11 to allow cleaner xpath expressions on this report (see https://github.com/odoo/odoo/pull/20748 ) as at the moment this is quite tricky / easily to break. For now you would have to xpath to the third <p> element in order to do this. Something along the lines of:

<xpath expr="//p[3]" position="replace"/>

You could also only xpath to the field and just remote the field, without the <p> element:

<xpath expr=//field[@name='payment_term_id.note']" position="replace"/>

Regards,
Yenthe
Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jul. 25
1275
2
jul. 25
1535
1
jul. 25
2573
3
apr. 25
2486
3
apr. 25
3494