Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Translatable Templates in Odoo-9

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 189
    Comment on it

    If you want to translate reports then you need to define two templates:
    1-The main report template
    2-The translatable document
    And follow the follow the following step in given below->
    you can go to Settings Reports Report Search associated QWeb views <translatable_document> Associated translations.
    And change the view in report you can see the below code .

    </translatable_document></report_name>
    <Main template>
    <template id="sale.report_saleorder">
        <t t-call="report.html_container">
            <t t-foreach="doc_ids" t-as="doc_id">
                <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')">
            </t>
        </t>
    </t></template>
    
    <!-- Translatable template -->
    <template id="report_saleorder_document">
        <t t-call="report.external_layout">
            <div class="page">
                <div class="oe_structure">
                <div class="row">
                    <div class="col-xs-6">
                        <strong t-if="o.partner_shipping_id == o.partner_invoice_id">Invoice and shipping address:</strong>
                        <strong t-if="o.partner_shipping_id != o.partner_invoice_id">Invoice address:</strong>
                        <div t-field="o.partner_invoice_id" t-field-options="{&amp;amp;quot;no_marker&amp;amp;quot;: true}">
                    &amp;amp;lt;...&amp;amp;gt;
                <div class="oe_structure">
            </div>
    
    </div></div></div></div></div></t></template>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: