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;quot;no_marker&amp;quot;: true}">
&amp;lt;...&amp;gt;
<div class="oe_structure">
</div>
</div></div></div></div></div></t></template>
0 Comment(s)