Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Invoice Report. Wording based on Selected Journal

By
Yves Goldberg
on 1/20/16, 11:51 AM 338 views

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.
2

Jusab Sida (jsi)

--Jusab Sida (jsi)--
Tiny ERP Pvt Ltd
http://www.odoo.com
874
| 2 1 5
Gandhinagar, India
--Jusab Sida (jsi)--


Jusab Sida (jsi)
On 1/21/16, 1:52 AM

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).

Ygol InternetWork, Yves Goldberg
on 1/21/16, 2:41 AM
0
Yves Goldberg
On 1/21/16, 3:40 PM

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>




Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/20/16, 11:51 AM
Seen: 338 times
Last updated: 1/21/16, 3:40 PM