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

Hi All, What is the correct way to include the document number in the footer for qweb reports. This would be used under sale orders, invoices and picking documents. Because in a sale order the field is called number (sale_order.name eg S0/12345) and in an invoice is is called a number (account_invoice.number eg VKB/171234 )

I tried this. But when i print qweb stops without warning when a field is not available in the current table. 

This is in my footer:

<span t-if='o.number' t-raw='o.number'/>

<span t-if='o.name' t-raw='o.name'/>

I check for the field but still the printing stops.

Best regards,

Maarten

아바타
취소
작성자

Ok that works thanks a lot

베스트 답변

Try checking to see if the field exists like this. This is how it is done in the external_layout view to check for company name.

<span t-if="'number' in o" t-raw='o.number'/>
<span t-if="'name' in o" t-raw='o.name'/>
아바타
취소
베스트 답변

Hello,

You can try using the following code

<div class="footer">

<span t-field="o.number"></span>
</div>

아바타
취소
작성자 베스트 답변

Thanks but no this will just stop during printing a sale order because this field does not exist in the sale_order table. I just checked, but I think I had done this before. That is why I tried the t-if.

아바타
취소
관련 게시물 답글 화면 활동
1
1월 20
9045
3
3월 17
4635
1
7월 23
2644
7
12월 23
22549
2
1월 25
10087