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

Hi everyone,



I need to use a different wording based on the journal that is used for the invoices.

For example when printing an invoice with journal "ABC" I need to use "ABC Invoice #" in the document's header and when using journal "DEF" I would like the report to print "DEF Invoice #" 

How would I add it as a "t-if" like in the following statement?

<span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">Invoice</span>
Another option would be to use the prefix field in the sequence but then I need to be able to translate those prefix based on the partner's language.
any idea?


Thanks in advance.
아바타
취소
베스트 답변

Is it helpful???

<t t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">
<span t-field="o.journal_id"/> Invoice
</t>
아바타
취소
작성자

Hi Jusab. Thank you for replying. Now that I read your answer I understand that my question was wrong because this would solve the problem in a specific database but I am looking to add this as an installable module (the different "journal id" would be unknown).

작성자 베스트 답변

Here's what I used in the meantime:

<span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid') and o.journal_id.id == 19 "> Invoice </span>




아바타
취소
관련 게시물 답글 화면 활동
2
9월 24
1773
5
8월 19
46374
4
6월 18
19912
0
6월 18
3203
2
5월 16
16743