From ebecd3ebdccd6420ea414b02b2a54a5fd6b53ef5 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 23 Jul 2020 09:11:19 +0000 Subject: [PATCH] [UPD] README.rst --- server_environment/README.rst | 24 +++++++++++++++++-- .../static/description/index.html | 21 ++++++++++++++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/server_environment/README.rst b/server_environment/README.rst index 407e2de..74065b9 100644 --- a/server_environment/README.rst +++ b/server_environment/README.rst @@ -113,7 +113,7 @@ A public file, containing that will contain public variables:: # server environment options export SERVER_ENV_CONFIG=" - [storage_backend.my-sftp] + [storage_backend.my_sftp] sftp_server=10.10.10.10 sftp_login=foo sftp_port=22200 @@ -127,10 +127,18 @@ A second file which is encrypted and contains secrets:: export DB_PASSWORD='xxxxxxxxx' # server environment options export SERVER_ENV_CONFIG_SECRET=" - [storage_backend.my-sftp] + [storage_backend.my_sftp] sftp_password=xxxxxxxxx " +**WARNING** + + `my_sftp` must match the name of the record. + If you want something more reliable use `server.env.techname.mixin` + and use `tech_name` field to reference records. + See "USAGE". + + Default values ~~~~~~~~~~~~~~ @@ -169,12 +177,23 @@ by an override of ``_server_env_fields``. Read the documentation of the class and methods in `models/server_env_mixin.py `__. + +If you want to have a technical name to reference:: + + class StorageBackend(models.Model): + _name = "storage.backend" + _inherit = ["storage.backend", "server.env.techname.mixin", "server.env.mixin"] + + [...] + Known issues / Roadmap ====================== * it is not possible to set the environment from the command line. A configuration file must be used. * the module does not allow to set low level attributes such as database server, etc. +* `server.env.techname.mixin`'s `tech_name` field could leverage the new option + for computable / writable fields and get rid of some onchange / read / write code. Bug Tracker =========== @@ -208,6 +227,7 @@ Contributors * Guewen Baconnier * Thomas Binfeld * Stéphane Bidoul +* Simone Orsi Maintainers ~~~~~~~~~~~ diff --git a/server_environment/static/description/index.html b/server_environment/static/description/index.html index d534877..45c83c3 100644 --- a/server_environment/static/description/index.html +++ b/server_environment/static/description/index.html @@ -463,7 +463,7 @@ export DB_MAXCONN=5 # server environment options export SERVER_ENV_CONFIG=" -[storage_backend.my-sftp] +[storage_backend.my_sftp] sftp_server=10.10.10.10 sftp_login=foo sftp_port=22200 @@ -477,10 +477,16 @@ directory_path=Odoo export DB_PASSWORD='xxxxxxxxx' # server environment options export SERVER_ENV_CONFIG_SECRET=" -[storage_backend.my-sftp] +[storage_backend.my_sftp] sftp_password=xxxxxxxxx " +

WARNING

+
+my_sftp must match the name of the record. +If you want something more reliable use server.env.techname.mixin +and use tech_name field to reference records. +See “USAGE”.

Default values

@@ -510,6 +516,14 @@ class StorageBackend(models.Model): return {"directory_path": {}}

Read the documentation of the class and methods in models/server_env_mixin.py.

+

If you want to have a technical name to reference:

+
+class StorageBackend(models.Model):
+    _name = "storage.backend"
+    _inherit = ["storage.backend", "server.env.techname.mixin", "server.env.mixin"]
+
+    [...]
+

Known issues / Roadmap

@@ -517,6 +531,8 @@ class StorageBackend(models.Model):
  • it is not possible to set the environment from the command line. A configuration file must be used.
  • the module does not allow to set low level attributes such as database server, etc.
  • +
  • server.env.techname.mixin’s tech_name field could leverage the new option +for computable / writable fields and get rid of some onchange / read / write code.
  • @@ -549,6 +565,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Guewen Baconnier <guewen.baconnier@camptocamp.com>
  • Thomas Binfeld <thomas.binsfeld@acsone.eu>
  • Stéphane Bidoul <stefane.bidoul@acsone.com>
  • +
  • Simone Orsi <simahawk@gmail.com>