[MIG] report_layout_config: Migration to 17.0

This commit is contained in:
Duy (Đỗ Anh)
2024-05-17 17:33:07 +07:00
parent c83845a387
commit cfe5f2dbfb
10 changed files with 21 additions and 40 deletions

View File

@@ -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 <thomas.nowicki@camptocamp.com>
- Iryna Vyshnevska <iryna.vyshnevska@camptocamp.com>
- Do Anh Duy <duyda@trobz.com>
Maintainers
-----------

View File

@@ -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,
}

View File

@@ -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",
)
],
)

View File

@@ -23,4 +23,4 @@ class BaseDocumentLayout(models.TransientModel):
"full_header_img",
)
def _compute_preview(self):
super()._compute_preview()
return super()._compute_preview()

View File

@@ -1,2 +1,3 @@
- Thomas Nowicki \<<thomas.nowicki@camptocamp.com>\>
- Iryna Vyshnevska \<<iryna.vyshnevska@camptocamp.com>\>
- Do Anh Duy \<<duyda@trobz.com>\>

View File

@@ -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

View File

@@ -388,7 +388,7 @@ to replace header and footer.</p>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<ul class="simple">
<li>In Setting/General Setting/Business Documents:<ul>
<li>In Setting/General Setting/Document Layout:<ul>
<li>Click on Configure Document Layout</li>
<li>On the wizard choose Layout images</li>
<li>Set the Full header image + Full footer image</li>
@@ -417,6 +417,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<ul class="simple">
<li>Thomas Nowicki &lt;<a class="reference external" href="mailto:thomas.nowicki&#64;camptocamp.com">thomas.nowicki&#64;camptocamp.com</a>&gt;</li>
<li>Iryna Vyshnevska &lt;<a class="reference external" href="mailto:iryna.vyshnevska&#64;camptocamp.com">iryna.vyshnevska&#64;camptocamp.com</a>&gt;</li>
<li>Do Anh Duy &lt;<a class="reference external" href="mailto:duyda&#64;trobz.com">duyda&#64;trobz.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_assets_common" inherit_id="web.report_assets_common">
<xpath expr="." position="inside">
<link
href="/report_layout_config/static/src/scss/style.scss"
rel="stylesheet"
type="text/scss"
/>
</xpath>
</template>
</odoo>

View File

@@ -45,7 +45,7 @@
<template
id="external_clean_layout_images_template"
primary="True"
inherit_id="web.external_layout_clean"
inherit_id="web.external_layout_bold"
priority="99"
>
<xpath expr="//div[contains(@t-attf-class, 'header')]" position="replace">
@@ -105,7 +105,7 @@
}
}
</t>
<!-- next part is the same as in web/views/report_templates web.external_layout_clean -->
<!-- next part is the same as in web/views/report_templates web.external_layout_bold -->
<t
t-elif="layout == 'report_layout_config.external_clean_layout_images_template'"
>

View File

@@ -10,7 +10,12 @@
<field name="full_footer_img" widget="image" class="mb-4" />
</xpath>
<field name="preview" position="attributes">
<attribute name='style'>max-width: 450px;</attribute>
<attribute name='style'>
max-width: 450px;
display: flex;
align-items: center;
justify-content: center;
</attribute>
</field>
</field>
</record>