[FIX] account: fallback on company language

The field partner_id of an account.payment is not required and there
are no value specified for internal transfers.
Before this patch the report had lang=None so was bypassing the
translation system.
Fallback on company's language instead

Fixes odoo/odoo#43377

closes odoo/odoo#56030

X-original-commit: 63b161e8c927889cd82da1ed6a0973234c639fb1
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Martin Trigaux
2020-08-18 07:55:11 +00:00
parent 423f79c2dc
commit f9432df1b8
@@ -62,7 +62,7 @@
<template id="report_payment_receipt">
<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-set="lang" t-value="o.partner_id.lang or o.company_id.partner_id.lang"/>
<t t-call="account.report_payment_receipt_document" t-lang="lang"/>
</t>
</t>