From 513e47e37253d780b168f886a39e1a90b153a0de Mon Sep 17 00:00:00 2001 From: Benoit Aimont Date: Mon, 5 Sep 2022 10:54:00 +0200 Subject: [PATCH] [MIG] server_environment_ir_config_parameter: Migration to 16.0 --- server_environment_ir_config_parameter/README.rst | 12 ++++++------ .../__manifest__.py | 2 +- .../server_environment_ir_config_parameter.pot | 2 +- .../models/ir_config_parameter.py | 15 ++++++++------- .../static/description/index.html | 6 +++--- .../addons/server_environment_ir_config_parameter | 1 + .../setup.py | 6 ++++++ 7 files changed, 26 insertions(+), 18 deletions(-) create mode 120000 setup/server_environment_ir_config_parameter/odoo/addons/server_environment_ir_config_parameter create mode 100644 setup/server_environment_ir_config_parameter/setup.py diff --git a/server_environment_ir_config_parameter/README.rst b/server_environment_ir_config_parameter/README.rst index b3c0cfe60..fe003ad1e 100644 --- a/server_environment_ir_config_parameter/README.rst +++ b/server_environment_ir_config_parameter/README.rst @@ -14,16 +14,16 @@ Server Environment Ir Config Parameter :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github - :target: https://github.com/OCA/server-env/tree/15.0/server_environment_ir_config_parameter + :target: https://github.com/OCA/server-env/tree/16.0/server_environment_ir_config_parameter :alt: OCA/server-env .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-env-15-0/server-env-15-0-server_environment_ir_config_parameter + :target: https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-server_environment_ir_config_parameter :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/254/15.0 + :target: https://runbot.odoo-community.org/runbot/254/16.0 :alt: Try me on Runbot -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| Override System Parameters from server environment file. @@ -73,7 +73,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -111,6 +111,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-env `_ project on GitHub. +This module is part of the `OCA/server-env `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/server_environment_ir_config_parameter/__manifest__.py b/server_environment_ir_config_parameter/__manifest__.py index 21afa72ba..bc2c7fbb5 100644 --- a/server_environment_ir_config_parameter/__manifest__.py +++ b/server_environment_ir_config_parameter/__manifest__.py @@ -5,7 +5,7 @@ "name": "Server Environment Ir Config Parameter", "summary": """ Override System Parameters from server environment file""", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/server-env", diff --git a/server_environment_ir_config_parameter/i18n/server_environment_ir_config_parameter.pot b/server_environment_ir_config_parameter/i18n/server_environment_ir_config_parameter.pot index 2b47b2f1f..6ae3161e7 100644 --- a/server_environment_ir_config_parameter/i18n/server_environment_ir_config_parameter.pot +++ b/server_environment_ir_config_parameter/i18n/server_environment_ir_config_parameter.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/server_environment_ir_config_parameter/models/ir_config_parameter.py b/server_environment_ir_config_parameter/models/ir_config_parameter.py index 2ad3eaedc..fa9c1c1f0 100644 --- a/server_environment_ir_config_parameter/models/ir_config_parameter.py +++ b/server_environment_ir_config_parameter/models/ir_config_parameter.py @@ -33,13 +33,14 @@ def get_param(self, key, default=False): return default return value - @api.model - def create(self, vals): - key = vals.get("key") - if serv_config.has_option(SECTION, key): - # enforce value from config file - vals = dict(vals, value=serv_config.get(SECTION, key)) - return super().create(vals) + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + key = vals.get("key") + if serv_config.has_option(SECTION, key): + # enforce value from config file + vals = dict(vals, value=serv_config.get(SECTION, key)) + return super().create(vals_list) def write(self, vals): for rec in self: diff --git a/server_environment_ir_config_parameter/static/description/index.html b/server_environment_ir_config_parameter/static/description/index.html index e1e554882..44d3153d4 100644 --- a/server_environment_ir_config_parameter/static/description/index.html +++ b/server_environment_ir_config_parameter/static/description/index.html @@ -367,7 +367,7 @@

Server Environment Ir Config Parameter

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/server-env Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/server-env Translate me on Weblate Try me on Runbot

Override System Parameters from server environment file.

Table of contents

@@ -418,7 +418,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -449,7 +449,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/server-env project on GitHub.

+

This module is part of the OCA/server-env project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/setup/server_environment_ir_config_parameter/odoo/addons/server_environment_ir_config_parameter b/setup/server_environment_ir_config_parameter/odoo/addons/server_environment_ir_config_parameter new file mode 120000 index 000000000..03cc1a8d3 --- /dev/null +++ b/setup/server_environment_ir_config_parameter/odoo/addons/server_environment_ir_config_parameter @@ -0,0 +1 @@ +../../../../server_environment_ir_config_parameter \ No newline at end of file diff --git a/setup/server_environment_ir_config_parameter/setup.py b/setup/server_environment_ir_config_parameter/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/server_environment_ir_config_parameter/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)