From e23ff200241e93a77ab71ceef24622fe1a3e570d Mon Sep 17 00:00:00 2001
From: "Gauthier Wala (gawa)" <gawa@odoo.com>
Date: Tue, 22 Aug 2023 09:25:13 +0000
Subject: [PATCH] [REV] l10n_de: remove l10n_de_document_title field from
 template"

This reverts commit 95468505f0bf1e71bcfb6ab73d893f0a1b9e4dc5.

The commits break the preview, as docs is not defined in preview (while done in real printing).
Not sure what we will do, with a check on the presence of the field or not, as it was working fine before, only a wrong modification of a view made it visible.
Linked to runbot error 24276

closes odoo/odoo#132639

Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
---
 addons/l10n_de/report/din5008_report.xml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/addons/l10n_de/report/din5008_report.xml b/addons/l10n_de/report/din5008_report.xml
index c5b260ff8451..c261e3afcce6 100644
--- a/addons/l10n_de/report/din5008_report.xml
+++ b/addons/l10n_de/report/din5008_report.xml
@@ -106,9 +106,12 @@
                         </tr>
                     </table>
                     <h2>
-                        <t t-set="o" t-value="docs[0]" t-if="not o" />
-                        <span t-if="'l10n_de_document_title' in o"><t t-esc="o.l10n_de_document_title"/></span>
-                        <span t-elif="'name' in o" t-field="o.name"/>
+                        <span t-if="not o and not docs"><t t-esc="company.l10n_de_document_title"/></span>
+                        <span t-else="">
+                            <t t-set="o" t-value="docs[0]" t-if="not o" />
+                            <span t-if="'l10n_de_document_title' in o"><t t-esc="o.l10n_de_document_title"/></span>
+                            <span t-elif="'name' in o" t-field="o.name"/>
+                        </span>
                     </h2>
                     <t t-raw="0"/>
                 </div>
-- 
GitLab