Skip to content
Snippets Groups Projects
Commit 95468505 authored by prye-odoo's avatar prye-odoo
Browse files

[FIX] l10n_de: remove l10n_de_document_title field from template

When the user configures the 'external_layout_din5008' layout template in the
general settings and tries to any QWeb reports, that case generates the
traceback.

Steps to reproduce:
- Install the 'l10n_de' and 'sale_timesheet' modules.
- Settings > General Settings
- Search for 'Document Layout' and configure the 'external_layout_din5008'
  layout.
- Settings > Technical > User Interface > Views
- Search the 'external_layout_din5008'  QWeb template view.
- Search  '<span t-if="not o and not docs">
<t t-esc="company.l10n_de_document_title"/></span>'
  line and replace by,
'<span t-if="company"><t t-esc="company.l10n_de_document_title"/></span>'
- Go to the Sales menu and print any reports from the print menu.
After that, a traceback was generated.
Error:
AttributeError: 'res.company' object has no attribute 'l10n_de_document_title'
Template: l10n_de.external_layout_din5008

The 'l10n_de_document_title' field does not exist in the 'res.company'
object and also this field used in 'l10n_de.external_layout_din5008'
template, and this template is configured as layout.  So, remove this line from
this template.
Code reference:
https://github.com/odoo/odoo/blob/14.0/addons/l10n_de/report/din5008_report.xml#L109



Sentry-4283510443

closes odoo/odoo#128559

Signed-off-by: default avatarFlorian Gilbert (flg) <flg@odoo.com>
parent 9cec2822
No related branches found
No related tags found
No related merge requests found
......@@ -106,12 +106,9 @@
</tr>
</table>
<h2>
<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>
<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"/>
</h2>
<t t-raw="0"/>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment