Skip to Content
मेन्यू
This question has been flagged
1 Reply
4497 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
1
जुल॰ 25
1274
2
जुल॰ 25
1530
1
जुल॰ 25
2571
3
अप्रैल 25
2485
3
अप्रैल 25
3487