diff --git a/addons/l10n_de/__manifest__.py b/addons/l10n_de/__manifest__.py
index 6b18e7d6112..011db42cd59 100644
--- a/addons/l10n_de/__manifest__.py
+++ b/addons/l10n_de/__manifest__.py
@@ -22,5 +22,6 @@ German accounting chart and localization.
'data/res.country.state.csv',
'data/menuitem_data.xml',
'views/account_view.xml',
+ 'report/din5008_report.xml',
],
}
diff --git a/addons/l10n_de/models/__init__.py b/addons/l10n_de/models/__init__.py
index 5f5a7c384f3..682acc3a99b 100644
--- a/addons/l10n_de/models/__init__.py
+++ b/addons/l10n_de/models/__init__.py
@@ -2,4 +2,4 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import datev
-from . import chart_template
+from . import chart_template
\ No newline at end of file
diff --git a/addons/l10n_de/models/chart_template.py b/addons/l10n_de/models/chart_template.py
index 670bdfee873..9359902b578 100644
--- a/addons/l10n_de/models/chart_template.py
+++ b/addons/l10n_de/models/chart_template.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-from odoo import api, models, _
+from odoo import api, fields, models
class WizardMultiChartsAccounts(models.TransientModel):
@@ -12,3 +12,16 @@ class WizardMultiChartsAccounts(models.TransientModel):
existing_tags = [x[-1:] for x in res.get('tag_ids', [])]
res['tag_ids'] = [(6, 0, existing_tags + [xml_id])]
return res
+
+ # Write paperformat and report template used on company
+ @api.model
+ def execute(self):
+ res = super(WizardMultiChartsAccounts, self).execute()
+ if self.company_id.country_id.code == 'DE':
+ self.company_id.write({'external_report_layout': 'din5008', 'paperformat_id': self.env.ref('l10n_de.paperformat_euro_din').id})
+ return res
+
+class Company(models.Model):
+ _inherit = 'res.company'
+
+ external_report_layout = fields.Selection(selection_add=[('din5008', 'Din 5008')])
diff --git a/addons/l10n_de/report/din5008_report.xml b/addons/l10n_de/report/din5008_report.xml
new file mode 100644
index 00000000000..fbdbfaf2cb6
--- /dev/null
+++ b/addons/l10n_de/report/din5008_report.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+ European A4 for DIN
+
+ A4
+ Portrait
+ 45
+ 28
+ 0
+ 0
+
+ 45
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/l10n_de/static/img/preview_din.png b/addons/l10n_de/static/img/preview_din.png
new file mode 100644
index 00000000000..0c271a51513
Binary files /dev/null and b/addons/l10n_de/static/img/preview_din.png differ
diff --git a/addons/l10n_de/static/pdf/preview_din.pdf b/addons/l10n_de/static/pdf/preview_din.pdf
new file mode 100644
index 00000000000..63d05f58d99
Binary files /dev/null and b/addons/l10n_de/static/pdf/preview_din.pdf differ
diff --git a/addons/l10n_de/static/src/scss/report_din5008.scss b/addons/l10n_de/static/src/scss/report_din5008.scss
new file mode 100644
index 00000000000..7d68fdd9e03
--- /dev/null
+++ b/addons/l10n_de/static/src/scss/report_din5008.scss
@@ -0,0 +1,52 @@
+.din {
+ &.header {
+ min-height: 45mm;
+ max-height: 45mm;
+ overflow: hidden;
+ img {
+ max-height: 45mm;
+ }
+ }
+ .company_address {
+ position: relative;
+ left: 45mm;
+ top: 5mm;
+ width: 75mm;
+ min-width: 75mm;
+ display: inline-block;
+ }
+ .invoice_address {
+ position: relative;
+ left: 25mm;
+ top: 17.7mm;
+ width: 85mm;
+ height: 27.3mm;
+ overflow-y: hidden;
+ word-break: break-word;
+ float: left;
+ }
+ .header_address {
+ min-height: 45mm;
+ }
+ .page_number {
+ margin-top: 4.23mm;
+ margin-bottom: 4.23mm;
+ }
+ &.article {
+ .page {
+ position: relative;
+ top: 8.46mm;
+ left: 25mm;
+ width: 190mm;
+ }
+ .address {
+ margin-top: 5mm;
+ }
+ }
+ &.o_background_footer {
+ position: relative;
+ left: 25mm;
+ top: 8.46mm;
+ width: 190mm;
+ }
+}
\ No newline at end of file
diff --git a/addons/l10n_de/views/account_view.xml b/addons/l10n_de/views/account_view.xml
index 04234468252..25d3a9f997c 100644
--- a/addons/l10n_de/views/account_view.xml
+++ b/addons/l10n_de/views/account_view.xml
@@ -10,4 +10,71 @@
+
+
+ res.company.l10nde.report.form
+ res.company
+
+
+
+ {
+ 'background': {
+ 'image_link': '/base/static/img/preview_background.png',
+ 'preview_link': '/base/static/pdf/preview_background.pdf'
+ },
+ 'boxed': {
+ 'image_link': '/base/static/img/preview_boxed.png',
+ 'preview_link': '/base/static/pdf/preview_boxed.pdf'
+ },
+ 'clean': {
+ 'image_link': '/base/static/img/preview_clean.png',
+ 'preview_link': '/base/static/pdf/preview_clean.pdf'
+ },
+ 'standard': {
+ 'image_link': '/base/static/img/preview_standard.png',
+ 'preview_link': '/base/static/pdf/preview_standard.pdf'
+ },
+ 'din5008': {
+ 'image_link': '/l10n_de/static/img/preview_din.png',
+ 'preview_link': '/l10n_de/static/pdf/preview_din.pdf'
+ }
+ }
+
+
+
+
+
+
+
+ res.company.l10nde.template.report.form
+ res.company
+
+
+
+ {
+ 'background': {
+ 'image_link': '/base/static/img/preview_background.png',
+ 'preview_link': '/base/static/pdf/preview_background.pdf'
+ },
+ 'boxed': {
+ 'image_link': '/base/static/img/preview_boxed.png',
+ 'preview_link': '/base/static/pdf/preview_boxed.pdf'
+ },
+ 'clean': {
+ 'image_link': '/base/static/img/preview_clean.png',
+ 'preview_link': '/base/static/pdf/preview_clean.pdf'
+ },
+ 'standard': {
+ 'image_link': '/base/static/img/preview_standard.png',
+ 'preview_link': '/base/static/pdf/preview_standard.pdf'
+ },
+ 'din5008': {
+ 'image_link': '/l10n_de/static/img/preview_din.png',
+ 'preview_link': '/l10n_de/static/pdf/preview_din.pdf'
+ }
+ }
+
+
+
+
\ No newline at end of file