Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

This module provides a classical configuration by environnement file pattern into OpenERP. Based on code written by WinGo and Camptocamp.

This module allows you to use the classical environment file pattern by reading a directive call running_env in the OpenERP configuration file:

[options]
running_env=dev / prod / etc.

We intended to add a server command line but there is no correct way to do it.

This method allows you to keep your settings into a module instead of using config files that might be mixed with openerprc or altered. It is an alternative way to the base config file for such configuration needs . All your configurations will be read only and accessible under the admin menu. If you are not in the ‘dev’ environment you will not be able to see the values contained in keys named ‘passw’.

At the current time, the module does not allow to set low level attributes such as database server, etc. .

The first goal of the module is to ensure that OpenERP will never mess up the external system. Once installed, profile is mandatory. We do not want to launch an instance in the dev environment on a production server.

The configuration files are stored in the server_environment_files module, and user config parser module syntax. Look at the module to get some examples. The default configuration are stored in the default/ directory. You can add one directory for each environment you want to define, named after the environment. All config defined in non-default environments will override or complement the default config. If your attibutes contain passw, it will only be shown in the dev environment.

Example usage

from server_environment import serv_config
for key, value in serv_config.items('external_service.ftp'):
   print (key, value)

serv_config.get('external_service.ftp', 'tls')

This module provides also the possibility to load static files depending on the environment.

Example usage

Create a file view/templates.xml, and insert a css file

<openerp><data>
    <template id="login_layout_no_db" name="Login Layout"
            inherit_id="web.login_layout" >
        <xpath expr="." position="inside">
            <link rel="stylesheet"
            href="/server_environment_files/static/RUNNING_ENV/css.css"/>
        </xpath>
    </template>
</data></openerp>

Then, create css files for each environment you have. exemple:

/server_environment_files/static/dev/css.css
/server_environment_files/static/prod/css.css
...

Metadata

Release files for odoo8-addon-server-environment 8.0.1.1.0.99.dev40

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo8-addon-server-environment 8.0.1.1.0.99.dev40
File Interpreter ABI Platform
odoo8_addon_server_environment-8.0.1.1.0.99.dev40-py2-none-any.whl Python 2 none any Details

Release files / odoo8_addon_server_environment-8.0.1.1.0.99.dev40-py2-none-any.whl

Download URL odoo8_addon_server_environment-8.0.1.1.0.99.dev40-py2-none-any.whl
Size 160.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
a30c08006a2a31a6d16f0f416dfe0dae0d77446ad6852f4f253d59630aacc9a2
BLAKE2b-256 checksum
How to use checksums
53a8868fac2f6839e4b96ef28d755f3284e64d1d63cb2fb6f24c1008e6438714
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.5

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page