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

Translation in pdf file when clicking print button in sale/quotation order

By
Tomasz Twardowski
on 6/7/14, 4:01 PM 904 views

Hi,

how to make translation in pdf file when clicking print button in sale/quotation order  generating  from :

addons/sale/view/report_saleorder.xml

for example field "Salesperson:" :

 <div t-if="o.user_id.name" class="col-xs-3">
                    <strong>Salesperson:</strong>
                    <p t-field="o.user_id.name"/>
</div>

I've added record in translations --> application terms --> translated terms

Source: Salesperson: 

Translation Value: Sprzedawca

Translated Field: addons/sale/views/report_saleorder.xml

Language: Polski

Type: Code

and after that nothing happened .

I've changed "Type"  field to Code, View, Report/Template  and also no reaction.

What should I do .

Thanks for help in advance

 

 

0
Daniel Barthels
On 6/9/14, 6:42 AM

You can render the document in the partner's language by calling:

            """Helper used when a report should be translated into the associated
            partner's lang.

            <t t-foreach="doc_ids" t-as="doc_id">
                <t t-raw="render_doc(doc_id, doc_model, 'module.templatetocall')"/>
            </t>

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

2 follower(s)

Stats

Asked: 6/7/14, 4:01 PM
Seen: 904 times
Last updated: 3/16/15, 8:10 AM