summaryrefslogtreecommitdiff
path: root/doc/reference/reports.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference/reports.rst')
-rw-r--r--doc/reference/reports.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/reference/reports.rst b/doc/reference/reports.rst
index f12efdcab07..696eabc5809 100644
--- a/doc/reference/reports.rst
+++ b/doc/reference/reports.rst
@@ -129,13 +129,13 @@ you need to define two templates:
* The main report template
* The translatable document
-You can then call the translatable document from your main template with the attribute
+You can then call the translatable document from your main template with the attribute
``t-lang`` set to a language code (for example ``fr`` or ``en_US``) or to a record field.
You will also need to re-browse the related records with the proper context if you use
fields that are translatable (like country names, sales conditions, etc.)
.. warning::
-
+
If your report template does not use translatable record fields, re-browsing the record
in another language is *not* necessary and will impact performances.
@@ -169,10 +169,10 @@ For example, let's look at the Sale Order report from the Sale module::
</template>
-The main template calls the translatable template with ``doc.partner_id.lang`` as a
-``t-lang`` parameter, so it will be rendered in the language of the partner. This way,
-each Sale Order will be printed in the language of the corresponding customer. If you wish
-to translate only the body of the document, but keep the header and footer in a default
+The main template calls the translatable template with ``doc.partner_id.lang`` as a
+``t-lang`` parameter, so it will be rendered in the language of the partner. This way,
+each Sale Order will be printed in the language of the corresponding customer. If you wish
+to translate only the body of the document, but keep the header and footer in a default
language, you could call the report's external layout this way::
<t t-call="web.external_layout" t-lang="en_US">
@@ -180,7 +180,7 @@ language, you could call the report's external layout this way::
.. tip::
Please take note that this works only when calling external templates, you will not be
- able to translate part of a document by setting a ``t-lang`` attribute on an xml node other
+ able to translate part of a document by setting a ``t-lang`` attribute on an xml node other
than ``t-call``. If you wish to translate part of a template, you can create an external
template with this partial template and call it from the main one with the ``t-lang``
attribute.
@@ -345,4 +345,4 @@ For example, you can access a Sale Order report in html mode by going to
Or you can access the pdf version at
\http://<server-address>/report/pdf/sale.report_saleorder/38
-.. _wkhtmltopdf: http://wkhtmltopdf.org
+.. _wkhtmltopdf: https://wkhtmltopdf.org