I created a report with a table that has columns with the name, in the XML the name is in english but I would like to translate them into other languages, at the moment I tried with Italian but they remain in English. Column names are not the name of any model field. To create the report I took the odoo addons as an example, then to create the cycle report on docs by passing it partner_id.lang when I call the template.
As can be seen from the image on the screen, the lang value is also shown
call the report with docs loop
<template id="report_certificate">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-set="lang" t-value="o.partner_id.lang"/>
<t t-call="ngo_payment_certificate.report_certificate_view" t-lang="lang"/>
</t>
</t>
</template>
<template id="report_certificate_view">
<t t-set="o" t-value="o.with_context(lang=lang)" />
<t t-call="web.external_layout">
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<div t-if="o.partner_id.vat" class="mt16"><t t-esc="d.company_id.country_id.vat_label or 'Tax ID'"/>: <span t-field="o.partner_id.vat"/></div>
</t>
<div class="page">
<p t-esc="lang"></p>
<h3 class="text-left mt16">Donations</h3>
</div>
</t>
</template>
I created the po file and added it to the addon by correctly translating the words. I reloaded the language by overwriting and restarted the server but nothing. He does not translate words for me.
Can you help me? After much research I was unable to find a solution. The rest of the addon, form, treeview etc, are translated correctly
I use Odoo 12 CE Odoo 12.0-20200121
Part of po file exports by settings
#: code:addons/ngo_payment_certificate/wizards/ngo_donor_donation_report_wizard.py:17
#: model:ir.model.fields,field_description:ngo_payment_certificate.field_ngo_donor_donation_report_wizard__annual_donation_ids
#: model_terms:ir.ui.view,arch_db:ngo_payment_certificate.report_certificate_view
#, python-format
msgid "Donations"
msgstr "Donazioni"
I have tried to modify like this (like sale po file)
#. module: ngo_payment_certificate
model_terms:ir.ui.view,arch_db:ngo_payment_certificate.report_certificate_view
msgid "Donations"
msgstr "Donazioni"