콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4521 화면

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>



아바타
취소
베스트 답변

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
아바타
취소
관련 게시물 답글 화면 활동
1
7월 25
1275
2
7월 25
1539
1
7월 25
2576
3
4월 25
2488
3
4월 25
3497