diff --git a/report_layout_config/__manifest__.py b/report_layout_config/__manifest__.py
index e27c0401e..6524f68fa 100644
--- a/report_layout_config/__manifest__.py
+++ b/report_layout_config/__manifest__.py
@@ -12,6 +12,7 @@
"depends": ["web", "base"],
"data": [
"views/document_layout.xml",
+ "templates/assets.xml",
"templates/report_templates.xml",
"data/report_layout.xml",
],
diff --git a/report_layout_config/data/report_layout.xml b/report_layout_config/data/report_layout.xml
index 480a10408..1d41271b8 100644
--- a/report_layout_config/data/report_layout.xml
+++ b/report_layout_config/data/report_layout.xml
@@ -1,14 +1,27 @@
-
- Layout images
+
+ Layout images standard
/report_layout_config/static/img/preview_standard.png
/report_layout_config/static/pdf/preview_standard.pdf
+
+
+ Layout images clean
+
+ /report_layout_config/static/img/preview_standard.png
+ /report_layout_config/static/pdf/preview_standard.pdf
+
+
diff --git a/report_layout_config/migrations/14.0.1.0.0/pre-migrate.py b/report_layout_config/migrations/14.0.1.0.0/pre-migrate.py
new file mode 100644
index 000000000..fd4459fee
--- /dev/null
+++ b/report_layout_config/migrations/14.0.1.0.0/pre-migrate.py
@@ -0,0 +1,18 @@
+# Copyright 2021 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+
+from openupgradelib.openupgrade import rename_xmlids
+
+
+def migrate(cr, version):
+
+ rename_xmlids(
+ cr,
+ [
+ (
+ "report_layout_config.external_layout_images",
+ "report_layout_config.external_standard_layout_images_template",
+ )
+ ],
+ )
diff --git a/report_layout_config/models/base_document_layout.py b/report_layout_config/models/base_document_layout.py
index 387ce0ba4..11a353d1f 100644
--- a/report_layout_config/models/base_document_layout.py
+++ b/report_layout_config/models/base_document_layout.py
@@ -8,22 +8,16 @@ class BaseDocumentLayout(models.TransientModel):
_inherit = "base.document.layout"
full_header_img = fields.Binary(
- related="company_id.full_header_img", readonly=False
+ related="company_id.full_header_img",
+ readonly=False,
+ help="Replaces whole header with image",
)
full_footer_img = fields.Binary(
- related="company_id.full_footer_img", readonly=False
+ related="company_id.full_footer_img",
+ readonly=False,
+ help="Replaces whole footer, disables footer logo",
)
- need_images_layout = fields.Boolean(
- compute="_compute_need_images_layout", readonly=True
- )
-
- @api.depends("report_layout_id")
- def _compute_need_images_layout(self):
- self.ensure_one()
- img_lay = self.env.ref("report_layout_config.external_layout_images").view_id
- self.need_images_layout = self.external_report_layout_id == img_lay
-
@api.depends(
"full_footer_img",
"full_header_img",
diff --git a/report_layout_config/readme/CONTRIBUTORS.rst b/report_layout_config/readme/CONTRIBUTORS.rst
index 0a9139f76..429d07530 100644
--- a/report_layout_config/readme/CONTRIBUTORS.rst
+++ b/report_layout_config/readme/CONTRIBUTORS.rst
@@ -1 +1,2 @@
* Thomas Nowicki
+* Iryna Vyshnevska
diff --git a/report_layout_config/static/src/scss/style.scss b/report_layout_config/static/src/scss/style.scss
new file mode 100644
index 000000000..bc9b9350f
--- /dev/null
+++ b/report_layout_config/static/src/scss/style.scss
@@ -0,0 +1,11 @@
+.footer-image {
+ max-width: 500px;
+}
+
+.header-image {
+ margin-top: 22px;
+}
+
+.header-full-image {
+ max-height: 60px;
+}
diff --git a/report_layout_config/templates/assets.xml b/report_layout_config/templates/assets.xml
new file mode 100644
index 000000000..e27fd9d89
--- /dev/null
+++ b/report_layout_config/templates/assets.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/report_layout_config/templates/report_templates.xml b/report_layout_config/templates/report_templates.xml
index e9665acd0..d10909717 100644
--- a/report_layout_config/templates/report_templates.xml
+++ b/report_layout_config/templates/report_templates.xml
@@ -1,7 +1,7 @@
@@ -12,13 +12,12 @@
@@ -31,59 +30,123 @@
- Page: /
-
+ Page: /
+
-
-
-
- &.o_report_layout_standard {
- h2 {
- color: ;
- }
- #informations strong {
- color: ;
- }
- #total strong{
- color: ;
- }
- table {
- thead {
- color: ;
- }
- }
- }
-
+
+
+
+
+
+
+
-
-
diff --git a/report_layout_config/views/document_layout.xml b/report_layout_config/views/document_layout.xml
index 8900c36c7..d03e0432c 100644
--- a/report_layout_config/views/document_layout.xml
+++ b/report_layout_config/views/document_layout.xml
@@ -5,40 +5,9 @@
base.document.layout
-
- {'invisible': [('need_images_layout', '=', True)]}
-
-
- {'invisible': [('need_images_layout', '=', True)]}
-
-
- {'invisible': [('need_images_layout', '=', True)]}
-
-
- {'invisible': [('need_images_layout', '=', True)]}
-
-
-
-
+
+
max-width: 450px;