diff --git a/server_environment/README.rst b/server_environment/README.rst index 74065b9..75279dc 100644 --- a/server_environment/README.rst +++ b/server_environment/README.rst @@ -11,13 +11,13 @@ server configuration environment files :target: https://odoo-community.org/page/development-status :alt: Beta .. |badge2| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github - :target: https://github.com/OCA/server-env/tree/13.0/server_environment + :target: https://github.com/OCA/server-env/tree/14.0/server_environment :alt: OCA/server-env .. |badge3| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-env-13-0/server-env-13-0-server_environment + :target: https://translation.odoo-community.org/projects/server-env-14-0/server-env-14-0-server_environment :alt: Translate me on Weblate .. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/254/13.0 + :target: https://runbot.odoo-community.org/runbot/254/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| @@ -152,8 +152,8 @@ When the default field is used, the field is made editable on Odoo. Note: empty environment keys always take precedence over default fields -Keychain integration -~~~~~~~~~~~~~~~~~~~~ +Server environment integration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Read the documentation of the class `models/server_env_mixin.py `_. @@ -201,7 +201,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. @@ -242,6 +242,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/__manifest__.py b/server_environment/__manifest__.py index 7699d18..7b0cbf2 100644 --- a/server_environment/__manifest__.py +++ b/server_environment/__manifest__.py @@ -4,13 +4,17 @@ { "name": "server configuration environment files", - "version": "13.0.2.3.1", + "version": "14.0.1.0.0", "depends": ["base", "base_sparse_field"], "author": "Camptocamp,Odoo Community Association (OCA)", "summary": "move some configurations out of the database", - "website": "http://github.com/OCA/server-env", + "website": "https://github.com/OCA/server-env", "license": "GPL-3 or any later version", "category": "Tools", - "data": ["security/res_groups.xml", "serv_config.xml"], + "data": [ + "security/ir.model.access.csv", + "security/res_groups.xml", + "serv_config.xml", + ], "installable": True, } diff --git a/server_environment/i18n/server_environment.pot b/server_environment/i18n/server_environment.pot index 919a908..1e8a588 100644 --- a/server_environment/i18n/server_environment.pot +++ b/server_environment/i18n/server_environment.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -75,7 +75,7 @@ msgid "Server Env Defaults" msgstr "" #. module: server_environment -#: model:ir.actions.act_window,name:server_environment.act_show_config_window +#: model:ir.actions.act_window,name:server_environment.server_env_act_show_config #: model:ir.ui.menu,name:server_environment.menu_server_show_config msgid "Server Environment" msgstr "" @@ -420,6 +420,11 @@ msgstr "" msgid "odoo | test_tags" msgstr "" +#. module: server_environment +#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_transient_age_limit +msgid "odoo | transient_age_limit" +msgstr "" + #. module: server_environment #: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_translate_in msgid "odoo | translate_in" diff --git a/server_environment/readme/CONFIGURE.rst b/server_environment/readme/CONFIGURE.rst index 84b9ff9..b3e8024 100644 --- a/server_environment/readme/CONFIGURE.rst +++ b/server_environment/readme/CONFIGURE.rst @@ -92,8 +92,8 @@ When the default field is used, the field is made editable on Odoo. Note: empty environment keys always take precedence over default fields -Keychain integration -~~~~~~~~~~~~~~~~~~~~ +Server environment integration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Read the documentation of the class `models/server_env_mixin.py `_. diff --git a/server_environment/security/ir.model.access.csv b/server_environment/security/ir.model.access.csv new file mode 100644 index 0000000..9940c85 --- /dev/null +++ b/server_environment/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_server_config,access_server_config,model_server_config,base.group_user,1,0,0,0 +access_server_config_manager,access_server_config_manger,model_server_config,base.group_system,1,1,1,1 diff --git a/server_environment/serv_config.xml b/server_environment/serv_config.xml index 29fab6d..5e66ec7 100644 --- a/server_environment/serv_config.xml +++ b/server_environment/serv_config.xml @@ -1,15 +1,14 @@ - + + Server Environment + server.config + form + diff --git a/server_environment/server_env.py b/server_environment/server_env.py index 3106f25..a0b265c 100644 --- a/server_environment/server_env.py +++ b/server_environment/server_env.py @@ -1,22 +1,8 @@ -############################################################################## -# -# Adapted by Nicolas Bessi. Copyright Camptocamp SA -# Based on Florent Xicluna original code. Copyright Wingo SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## +# Copyright 2020 Camptocamp (http://www.camptocamp.com) +# @author Nicolas Bessi +# Based on Florent Xicluna original code. Copyright Wingo SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + import configparser import logging @@ -149,7 +135,7 @@ def _load_config_from_env(config_p): def _load_config(): """Load the configuration and return a ConfigParser instance.""" - config_p = configparser.SafeConfigParser() + config_p = configparser.ConfigParser() # options are case-sensitive config_p.optionxform = str @@ -188,7 +174,7 @@ class ServerConfiguration(models.TransientModel): and init some properties """ - ModelClass = super(ServerConfiguration, cls)._build_model(pool, cr) + ModelClass = super()._build_model(pool, cr) ModelClass._add_columns() ModelClass._arch = None ModelClass._build_osv() @@ -306,10 +292,10 @@ class ServerConfiguration(models.TransientModel): ): """Overwrite the default method to render the custom view.""" res = super().fields_view_get(view_id, view_type, toolbar) - View = self.env["ir.ui.view"] + View = self.env["ir.ui.view"].browse(view_id) if view_type == "form": arch_node = self._arch - xarch, xfields = View.postprocess_and_fields(self._name, arch_node, view_id) + xarch, xfields = View.postprocess_and_fields(arch_node, model=self._name) res["arch"] = xarch res["fields"] = xfields return res diff --git a/server_environment/static/description/index.html b/server_environment/static/description/index.html index 45c83c3..c75433e 100644 --- a/server_environment/static/description/index.html +++ b/server_environment/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta OCA/server-env Translate me on Weblate Try me on Runbot

+

Beta OCA/server-env Translate me on Weblate Try me on Runbot

This module provides a way to define an environment in the main Odoo configuration file and to read some configurations from files depending on the configured environment: you define the environment in @@ -388,7 +388,7 @@ see the values contained in the defined secret keys

  • server_environment_files
  • Environment variable
  • Default values
  • -
  • Keychain integration
  • +
  • Server environment integration
  • Usage
  • @@ -497,8 +497,8 @@ configuration files / environment variable.

    When the default field is used, the field is made editable on Odoo.

    Note: empty environment keys always take precedence over default fields

    - @@ -540,7 +540,7 @@ for computable / writable fields and get rid of some onchange / read / write cod

    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.

    @@ -575,7 +575,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    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.