33< head >
44< meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 " />
55< meta name ="generator " content ="Docutils: https://docutils.sourceforge.io/ " />
6- < title > README.rst </ title >
6+ < title > server configuration environment files </ title >
77< style type ="text/css ">
88
99/*
360360</ style >
361361</ head >
362362< body >
363- < div class ="document ">
363+ < div class ="document " id ="server-configuration-environment-files ">
364+ < h1 class ="title "> server configuration environment files</ h1 >
364365
365-
366- < a class ="reference external image-reference " href ="https://odoo-community.org/get-involved?utm_source=readme ">
367- < img alt ="Odoo Community Association " src ="https://odoo-community.org/readme-banner-image " />
368- </ a >
369- < div class ="section " id ="server-configuration-environment-files ">
370- < h1 > server configuration environment files</ h1 >
371366<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367!! This file is generated by oca-gen-addon-readme !!
373368!! changes will be overwritten. !!
374369!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370!! source digest: sha256:63b219d993d67edff4ef7cdfdb79606dce9435d848bf3c0e56252b4f5fd2d415
376371!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377- < p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Production/Stable " src ="https://img.shields.io/badge/maturity-Production%2FStable-green.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/lgpl-3.0-standalone.html "> < img alt ="License: LGPL-3 " src ="https://img.shields.io/badge/license-LGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/server-env/tree/18.0/server_environment "> < img alt ="OCA/server-env " src ="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/server-env-18-0/server-env-18-0-server_environment "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=18.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
372+ < p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Production/Stable " src ="https://img.shields.io/badge/maturity-Production%2FStable-green.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/lgpl-3.0-standalone.html "> < img alt ="License: LGPL-3 " src ="https://img.shields.io/badge/license-LGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/server-env/tree/17.0/server_environment "> < img alt ="OCA/server-env " src ="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/server-env-17-0/server-env-17-0-server_environment "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=17.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
378373< p > This module provides a way to define an environment in the main Odoo
379374configuration file and to read some configurations from files depending
380375on the configured environment: you define the environment in the main
@@ -410,7 +405,7 @@ <h1>server configuration environment files</h1>
410405</ ul >
411406</ div >
412407< div class ="section " id ="installation ">
413- < h2 > < a class ="toc-backref " href ="#toc-entry-1 "> Installation</ a > </ h2 >
408+ < h1 > < a class ="toc-backref " href ="#toc-entry-1 "> Installation</ a > </ h1 >
414409< p > By itself, this module does little. See for instance the
415410< tt class ="docutils literal "> mail_environment</ tt > addon which depends on this one to allow
416411configuring the incoming and outgoing mail servers depending on the
@@ -422,7 +417,7 @@ <h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
422417< tt class ="docutils literal "> SERVER_ENV_CONFIG</ tt > and < tt class ="docutils literal "> SERVER_ENV_CONFIG_SECRET</ tt > .</ p >
423418</ div >
424419< div class ="section " id ="configuration ">
425- < h2 > < a class ="toc-backref " href ="#toc-entry-2 "> Configuration</ a > </ h2 >
420+ < h1 > < a class ="toc-backref " href ="#toc-entry-2 "> Configuration</ a > </ h1 >
426421< p > To configure this module, you need to edit the main configuration file
427422of your instance, and add a directive called < tt class ="docutils literal "> running_env</ tt > . Commonly
428423used values are ‘dev’, ‘test’, ‘production’:</ p >
@@ -441,21 +436,21 @@ <h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
441436< p > If you don’t provide any value, test is used as a safe default.</ p >
442437< p > You have several possibilities to set configuration values:</ p >
443438< div class ="section " id ="server-environment-files ">
444- < h3 > < a class ="toc-backref " href ="#toc-entry-3 "> server_environment_files</ a > </ h3 >
439+ < h2 > < a class ="toc-backref " href ="#toc-entry-3 "> server_environment_files</ a > </ h2 >
445440< p > You can edit the settings you need in the < tt class ="docutils literal "> server_environment_files</ tt >
446441addon. The < tt class ="docutils literal "> server_environment_files_sample</ tt > can be used as an
447442example:</ p >
448443< ul class ="simple ">
449444< li > values common to all / most environments can be stored in the
450445< tt class ="docutils literal "> default/</ tt > directory using the .ini file syntax;</ li >
451- < li > each environment you need to define is stored in its own directory and
452- can override or extend default values;</ li >
446+ < li > each environment you need to define is stored in its own directory
447+ and can override or extend default values;</ li >
453448< li > you can override or extend values in the main configuration file of
454449your instance;</ li >
455450</ ul >
456451</ div >
457452< div class ="section " id ="environment-variable ">
458- < h3 > < a class ="toc-backref " href ="#toc-entry-4 "> Environment variable</ a > </ h3 >
453+ < h2 > < a class ="toc-backref " href ="#toc-entry-4 "> Environment variable</ a > </ h2 >
459454< p > You can define configuration in the environment variable
460455< tt class ="docutils literal "> SERVER_ENV_CONFIG</ tt > and/or < tt class ="docutils literal "> SERVER_ENV_CONFIG_SECRET</ tt > . The 2
461456variables are handled the exact same way, this is only a convenience for
@@ -505,7 +500,7 @@ <h3><a class="toc-backref" href="#toc-entry-4">Environment variable</a></h3>
505500reference records. See “USAGE”.</ blockquote >
506501</ div >
507502< div class ="section " id ="default-values ">
508- < h3 > < a class ="toc-backref " href ="#toc-entry-5 "> Default values</ a > </ h3 >
503+ < h2 > < a class ="toc-backref " href ="#toc-entry-5 "> Default values</ a > </ h2 >
509504< p > When using the < tt class ="docutils literal "> server.env.mixin</ tt > mixin, for each env-computed field,
510505a companion field < tt class ="docutils literal "> <field>_env_default</ tt > is created. This field is not
511506environment-dependent. It’s a fallback value used when no key is set in
@@ -514,13 +509,15 @@ <h3><a class="toc-backref" href="#toc-entry-5">Default values</a></h3>
514509< p > Note: empty environment keys always take precedence over default fields</ p >
515510</ div >
516511< div class ="section " id ="server-environment-integration ">
517- < h3 > < a class ="toc-backref " href ="#toc-entry-6 "> Server environment integration</ a > </ h3 >
512+ < h2 > < a class ="toc-backref " href ="#toc-entry-6 "> Server environment integration</ a > </ h2 >
518513< p > Read the documentation of the class
519- < a class ="reference external " href ="models/server_env_mixin.py "> models/server_env_mixin.py</ a > .</ p >
514+ < a class ="reference external " href ="models/server_env_mixin.py "> models/server_env_mixin.py</ a > and
515+ [models/server_env_tech_name_mixin.py]
516+ (models/server_env_tech_name_mixin.py)</ p >
520517</ div >
521518</ div >
522519< div class ="section " id ="usage ">
523- < h2 > < a class ="toc-backref " href ="#toc-entry-7 "> Usage</ a > </ h2 >
520+ < h1 > < a class ="toc-backref " href ="#toc-entry-7 "> Usage</ a > </ h1 >
524521< p > You can include a mixin in your model and configure the env-computed
525522fields by an override of < tt class ="docutils literal "> _server_env_fields</ tt > .</ p >
526523< pre class ="literal-block ">
@@ -538,41 +535,41 @@ <h2><a class="toc-backref" href="#toc-entry-7">Usage</a></h2>
538535< pre class ="literal-block ">
539536class StorageBackend(models.Model):
540537 _name = "storage.backend"
541- _inherit = ["storage.backend", "server.env.techname.mixin", "server.env.mixin" ]
538+ _inherit = ["storage.backend", "server.env.techname.mixin"]
542539
543540 [...]
544541</ pre >
545542</ div >
546543< div class ="section " id ="known-issues-roadmap ">
547- < h2 > < a class ="toc-backref " href ="#toc-entry-8 "> Known issues / Roadmap</ a > </ h2 >
544+ < h1 > < a class ="toc-backref " href ="#toc-entry-8 "> Known issues / Roadmap</ a > </ h1 >
548545< ul class ="simple ">
549546< li > it is not possible to set the environment from the command line. A
550547configuration file must be used.</ li >
551- < li > the module does not allow to set low level attributes such as database
552- server, etc.</ li >
548+ < li > the module does not allow to set low level attributes such as
549+ database server, etc.</ li >
553550< li > server.env.techname.mixin’s tech_name field could leverage the new
554- option for computable / writable fields and get rid of some onchange /
555- read / write code.</ li >
551+ option for computable / writable fields and get rid of some onchange
552+ / read / write code.</ li >
556553</ ul >
557554</ div >
558555< div class ="section " id ="bug-tracker ">
559- < h2 > < a class ="toc-backref " href ="#toc-entry-9 "> Bug Tracker</ a > </ h2 >
556+ < h1 > < a class ="toc-backref " href ="#toc-entry-9 "> Bug Tracker</ a > </ h1 >
560557< p > Bugs are tracked on < a class ="reference external " href ="https://github.com/OCA/server-env/issues "> GitHub Issues</ a > .
561558In case of trouble, please check there if your issue has already been reported.
562559If you spotted it first, help us to smash it by providing a detailed and welcomed
563560< a class ="reference external " href ="https://github.com/OCA/server-env/issues/new?body=module:%20server_environment%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior** "> feedback</ a > .</ p >
564561< p > Do not contact contributors directly about support or help with technical issues.</ p >
565562</ div >
566563< div class ="section " id ="credits ">
567- < h2 > < a class ="toc-backref " href ="#toc-entry-10 "> Credits</ a > </ h2 >
564+ < h1 > < a class ="toc-backref " href ="#toc-entry-10 "> Credits</ a > </ h1 >
568565< div class ="section " id ="authors ">
569- < h3 > < a class ="toc-backref " href ="#toc-entry-11 "> Authors</ a > </ h3 >
566+ < h2 > < a class ="toc-backref " href ="#toc-entry-11 "> Authors</ a > </ h2 >
570567< ul class ="simple ">
571568< li > Camptocamp</ li >
572569</ ul >
573570</ div >
574571< div class ="section " id ="contributors ">
575- < h3 > < a class ="toc-backref " href ="#toc-entry-12 "> Contributors</ a > </ h3 >
572+ < h2 > < a class ="toc-backref " href ="#toc-entry-12 "> Contributors</ a > </ h2 >
576573< ul class ="simple ">
577574< li > Florent Xicluna (Wingo) << a class ="reference external " href ="mailto:florent.xicluna@gmail.com "> florent.xicluna@gmail.com</ a > ></ li >
578575< li > Nicolas Bessi << a class ="reference external " href ="mailto:nicolas.bessi@camptocamp.com "> nicolas.bessi@camptocamp.com</ a > ></ li >
@@ -589,7 +586,7 @@ <h3><a class="toc-backref" href="#toc-entry-12">Contributors</a></h3>
589586</ ul >
590587</ div >
591588< div class ="section " id ="maintainers ">
592- < h3 > < a class ="toc-backref " href ="#toc-entry-13 "> Maintainers</ a > </ h3 >
589+ < h2 > < a class ="toc-backref " href ="#toc-entry-13 "> Maintainers</ a > </ h2 >
593590< p > This module is maintained by the OCA.</ p >
594591< a class ="reference external image-reference " href ="https://odoo-community.org ">
595592< img alt ="Odoo Community Association " src ="https://odoo-community.org/logo.png " />
@@ -602,6 +599,5 @@ <h3><a class="toc-backref" href="#toc-entry-13">Maintainers</a></h3>
602599</ div >
603600</ div >
604601</ div >
605- </ div >
606602</ body >
607603</ html >
0 commit comments