Odoo Help

0

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

By
Tomasz Twardowski
on 6/7/14, 4:01 PM 1,182 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>

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

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