diff options
| author | Priyanka Kakadiya <pka@odoo.com> | 2017-10-09 16:51:44 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2018-02-05 11:03:05 +0100 |
| commit | 83a437dd8f22f9288e7e9eb70fcae5846975cd09 (patch) | |
| tree | 08dfccd647ec06344f7ed2e08721e44d663cee13 | |
| parent | ccaea94a66f75dc8cfe8e412080e098ffbd720d1 (diff) | |
[IMP] account: Use the user lang instead of the supplier lang
Purpose
=======
On a supplier invoice, everything should be in the language of the user, not in the language of the supplier
| -rw-r--r-- | addons/account/views/report_invoice.xml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml index 270c792c606..486f4c50d07 100644 --- a/addons/account/views/report_invoice.xml +++ b/addons/account/views/report_invoice.xml @@ -3,7 +3,7 @@ <data> <template id="report_invoice_document"> <t t-call="web.external_layout"> - <t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" /> + <t t-set="o" t-value="o.with_context({'lang': lang})"/> <div class="page"> <div class="row"> <div name="invoice_address" class="col-xs-5 col-xs-offset-7"> @@ -180,7 +180,8 @@ <template id="report_invoice"> <t t-call="web.html_container"> <t t-foreach="docs" t-as="o"> - <t t-call="account.report_invoice_document" t-lang="o.partner_id.lang"/> + <t t-set="lang" t-value="o.user_id.lang if o.type in ('in_invoice', 'in_refund') else o.partner_id.lang"/> + <t t-call="account.report_invoice_document" t-lang="lang"/> </t> </t> </template> @@ -188,7 +189,8 @@ <template id="report_invoice_with_payments"> <t t-call="web.html_container"> <t t-foreach="docs" t-as="o"> - <t t-call="account.report_invoice_document_with_payments" t-lang="o.partner_id.lang"/> + <t t-set="lang" t-value="o.user_id.lang if o.type in ('in_invoice', 'in_refund') else o.partner_id.lang"/> + <t t-call="account.report_invoice_document_with_payments" t-lang="lang"/> </t> </t> </template> |
