[IMP] account_payment_order: Print payment order in user lang if not generated

When you haven't still generated the file, `generated_user_id` is not filled, and
so, you can't control the language in which the payment order is going to be printed.

Adding a condition for using the user language in that case makes this more
comfortable.
This commit is contained in:
Pedro M. Baeza
2020-02-12 20:00:18 +01:00
parent f1930ad52e
commit 96c1587079
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
{
"name": "Account Payment Order",
"version": "13.0.1.0.0",
"version": "13.0.1.1.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV, "
"Therp BV, "

View File

@@ -5,7 +5,7 @@
<template id="print_account_payment_order_document">
<t
t-set="doc"
t-value="doc.with_context({'lang':doc.generated_user_id.lang})"
t-value="doc.with_context({'lang': doc.generated_user_id and doc.generated_user_id.lang or user.lang})"
/>
<t t-call="web.external_layout">
<div class="page">