From a1f169cee3655809e653f35fbc28349e827c4a68 Mon Sep 17 00:00:00 2001 From: thien Date: Wed, 2 Oct 2024 15:41:23 +0700 Subject: [PATCH] [MIG] sql_request_abstract: Migration to 18.0 --- sql_request_abstract/README.rst | 7 +++++++ sql_request_abstract/__manifest__.py | 2 +- .../models/sql_request_mixin.py | 10 +++++----- sql_request_abstract/readme/CONTRIBUTORS.md | 1 + sql_request_abstract/readme/CREDITS.md | 1 + .../static/description/index.html | 6 ++++++ .../static/src/js/code_editor.esm.js | 2 -- .../views/view_sql_request_mixin.xml | 17 ++++++----------- 8 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 sql_request_abstract/readme/CREDITS.md diff --git a/sql_request_abstract/README.rst b/sql_request_abstract/README.rst index 40dd1c281..d78dec84f 100644 --- a/sql_request_abstract/README.rst +++ b/sql_request_abstract/README.rst @@ -124,6 +124,13 @@ Contributors - Alfadil Tabar (alfadil.tabar@gmail.com) - Helly kapatel - Nguyen Minh Chien +- Vo Hong Thien + +Other credits +------------- + +The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp. Maintainers ----------- diff --git a/sql_request_abstract/__manifest__.py b/sql_request_abstract/__manifest__.py index 82decd51f..518ef344f 100644 --- a/sql_request_abstract/__manifest__.py +++ b/sql_request_abstract/__manifest__.py @@ -4,7 +4,7 @@ { "name": "SQL Request Abstract", - "version": "17.0.1.0.1", + "version": "18.0.1.0.0", "author": "GRAP,Akretion,Odoo Community Association (OCA)", "maintainers": ["legalsylvain"], "website": "https://github.com/OCA/reporting-engine", diff --git a/sql_request_abstract/models/sql_request_mixin.py b/sql_request_abstract/models/sql_request_mixin.py index 94765997e..dced7edf7 100644 --- a/sql_request_abstract/models/sql_request_mixin.py +++ b/sql_request_abstract/models/sql_request_mixin.py @@ -114,8 +114,8 @@ class SQLRequestMixin(models.AbstractModel): raise ValidationError( _( "You can't use an external database as there are no such " - "configuration about this. Please contact your Odoo administrator" - " to solve this issue." + "configuration about this. Please contact " + "your Odoo administrator to solve this issue." ) ) @@ -260,14 +260,14 @@ class SQLRequestMixin(models.AbstractModel): def _create_savepoint(self, cr): rollback_name = "{}_{}".format(self._name.replace(".", "_"), uuid.uuid1().hex) # pylint: disable=sql-injection - req = "SAVEPOINT %s" % (rollback_name) + req = f"SAVEPOINT {rollback_name}" cr.execute(req) return rollback_name @api.model def _rollback_savepoint(self, rollback_name, cr): # pylint: disable=sql-injection - req = "ROLLBACK TO SAVEPOINT %s" % (rollback_name) + req = f"ROLLBACK TO SAVEPOINT {rollback_name}" cr.execute(req) # close external database cursor if self.env.cr != cr: @@ -300,7 +300,7 @@ class SQLRequestMixin(models.AbstractModel): self.ensure_one() query = self.query.lower() for word in self.PROHIBITED_WORDS: - expr = r"\b%s\b" % word + expr = rf"\b{word}\b" is_not_safe = re.search(expr, query) if is_not_safe: raise UserError( diff --git a/sql_request_abstract/readme/CONTRIBUTORS.md b/sql_request_abstract/readme/CONTRIBUTORS.md index 908f292d8..73e7977d1 100644 --- a/sql_request_abstract/readme/CONTRIBUTORS.md +++ b/sql_request_abstract/readme/CONTRIBUTORS.md @@ -3,3 +3,4 @@ - Alfadil Tabar () - Helly kapatel \<\> - Nguyen Minh Chien \<\> +- Vo Hong Thien \<\> diff --git a/sql_request_abstract/readme/CREDITS.md b/sql_request_abstract/readme/CREDITS.md new file mode 100644 index 000000000..83b3ec91f --- /dev/null +++ b/sql_request_abstract/readme/CREDITS.md @@ -0,0 +1 @@ +The migration of this module from 17.0 to 18.0 was financially supported by Camptocamp. diff --git a/sql_request_abstract/static/description/index.html b/sql_request_abstract/static/description/index.html index 032550c2a..831a8f1fa 100644 --- a/sql_request_abstract/static/description/index.html +++ b/sql_request_abstract/static/description/index.html @@ -464,8 +464,14 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
  • Alfadil Tabar (alfadil.tabar@gmail.com)
  • Helly kapatel <helly.kapatel@initos.com>
  • Nguyen Minh Chien <chien@trobz.com>
  • +
  • Vo Hong Thien <thienvh@trobz.com>
  • +
    +

    Other credits

    +

    The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp.

    +

    Maintainers

    This module is maintained by the OCA.

    diff --git a/sql_request_abstract/static/src/js/code_editor.esm.js b/sql_request_abstract/static/src/js/code_editor.esm.js index d738cc548..325f9c6a4 100644 --- a/sql_request_abstract/static/src/js/code_editor.esm.js +++ b/sql_request_abstract/static/src/js/code_editor.esm.js @@ -1,5 +1,3 @@ -/** @odoo-module **/ - import {CodeEditor} from "@web/core/code_editor/code_editor"; import {patch} from "@web/core/utils/patch"; diff --git a/sql_request_abstract/views/view_sql_request_mixin.xml b/sql_request_abstract/views/view_sql_request_mixin.xml index ea8c37a3b..d8619e2bb 100644 --- a/sql_request_abstract/views/view_sql_request_mixin.xml +++ b/sql_request_abstract/views/view_sql_request_mixin.xml @@ -5,17 +5,16 @@ Copyright (C) 2022 - Today: GRAP (http://www.grap.coop) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> - sql.request.mixin - - + @@ -62,7 +61,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - - + @@ -96,13 +95,9 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -
    - - -
    + + - -