From cfe5f2dbfb2540750a3e99fb33c56514c8269a67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Duy=20=28=C4=90=E1=BB=97=20Anh=29?= <¨duyda@trobz.com¨>
Date: Fri, 17 May 2024 17:33:07 +0700
Subject: [PATCH] [MIG] report_layout_config: Migration to 17.0
---
report_layout_config/README.rst | 3 ++-
report_layout_config/__manifest__.py | 8 ++++++--
.../migrations/14.0.1.0.0/pre-migrate.py | 17 -----------------
.../models/base_document_layout.py | 2 +-
report_layout_config/readme/CONTRIBUTORS.md | 1 +
report_layout_config/readme/USAGE.md | 2 +-
.../static/description/index.html | 3 ++-
report_layout_config/templates/assets.xml | 14 --------------
.../templates/report_templates.xml | 4 ++--
report_layout_config/views/document_layout.xml | 7 ++++++-
10 files changed, 21 insertions(+), 40 deletions(-)
delete mode 100644 report_layout_config/migrations/14.0.1.0.0/pre-migrate.py
delete mode 100644 report_layout_config/templates/assets.xml
diff --git a/report_layout_config/README.rst b/report_layout_config/README.rst
index 8f36d4a36..b4a7cc363 100644
--- a/report_layout_config/README.rst
+++ b/report_layout_config/README.rst
@@ -39,7 +39,7 @@ to replace header and footer.
Usage
=====
-- In Setting/General Setting/Business Documents:
+- In Setting/General Setting/Document Layout:
- Click on Configure Document Layout
- On the wizard choose Layout images
@@ -68,6 +68,7 @@ Contributors
- Thomas Nowicki
- Iryna Vyshnevska
+- Do Anh Duy
Maintainers
-----------
diff --git a/report_layout_config/__manifest__.py b/report_layout_config/__manifest__.py
index b002134ab..e6d03f41d 100644
--- a/report_layout_config/__manifest__.py
+++ b/report_layout_config/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Report layout configuration",
"summary": "Add possibility to easily modify the global report layout",
- "version": "14.0.1.0.1",
+ "version": "17.0.1.0.0",
"category": "Reporting",
"website": "https://github.com/OCA/reporting-engine",
"author": "Camptocamp, " "Odoo Community Association (OCA)",
@@ -12,10 +12,14 @@
"depends": ["web", "base"],
"data": [
"views/document_layout.xml",
- "templates/assets.xml",
"templates/report_templates.xml",
"data/report_layout.xml",
],
+ "assets": {
+ "web.report_assets_common": [
+ "/report_layout_config/static/src/scss/style.scss",
+ ],
+ },
"application": False,
"installable": True,
}
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
deleted file mode 100644
index 1b412e34c..000000000
--- a/report_layout_config/migrations/14.0.1.0.0/pre-migrate.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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 11a353d1f..45f7460e9 100644
--- a/report_layout_config/models/base_document_layout.py
+++ b/report_layout_config/models/base_document_layout.py
@@ -23,4 +23,4 @@ class BaseDocumentLayout(models.TransientModel):
"full_header_img",
)
def _compute_preview(self):
- super()._compute_preview()
+ return super()._compute_preview()
diff --git a/report_layout_config/readme/CONTRIBUTORS.md b/report_layout_config/readme/CONTRIBUTORS.md
index e9ed7be5f..ec91e9cba 100644
--- a/report_layout_config/readme/CONTRIBUTORS.md
+++ b/report_layout_config/readme/CONTRIBUTORS.md
@@ -1,2 +1,3 @@
- Thomas Nowicki \<\>
- Iryna Vyshnevska \<\>
+- Do Anh Duy \<\>
diff --git a/report_layout_config/readme/USAGE.md b/report_layout_config/readme/USAGE.md
index 50af3fb45..4acfa807e 100644
--- a/report_layout_config/readme/USAGE.md
+++ b/report_layout_config/readme/USAGE.md
@@ -1,4 +1,4 @@
-- In Setting/General Setting/Business Documents:
+- In Setting/General Setting/Document Layout:
- Click on Configure Document Layout
- On the wizard choose Layout images
- Set the Full header image + Full footer image
diff --git a/report_layout_config/static/description/index.html b/report_layout_config/static/description/index.html
index d518f0374..e22473d60 100644
--- a/report_layout_config/static/description/index.html
+++ b/report_layout_config/static/description/index.html
@@ -388,7 +388,7 @@ to replace header and footer.
-- In Setting/General Setting/Business Documents:
+- In Setting/General Setting/Document Layout:
- Click on Configure Document Layout
- On the wizard choose Layout images
- Set the Full header image + Full footer image
@@ -417,6 +417,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
diff --git a/report_layout_config/templates/assets.xml b/report_layout_config/templates/assets.xml
deleted file mode 100644
index e27fd9d89..000000000
--- a/report_layout_config/templates/assets.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/report_layout_config/templates/report_templates.xml b/report_layout_config/templates/report_templates.xml
index 24d7b1f27..fba24fc84 100644
--- a/report_layout_config/templates/report_templates.xml
+++ b/report_layout_config/templates/report_templates.xml
@@ -45,7 +45,7 @@
@@ -105,7 +105,7 @@
}
}
-
+
diff --git a/report_layout_config/views/document_layout.xml b/report_layout_config/views/document_layout.xml
index d03e0432c..148c2a9ce 100644
--- a/report_layout_config/views/document_layout.xml
+++ b/report_layout_config/views/document_layout.xml
@@ -10,7 +10,12 @@
- max-width: 450px;
+
+ max-width: 450px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+