Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4518 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 25
1275
2
jul 25
1535
1
jul 25
2573
3
abr 25
2486
3
abr 25
3494