diff options
| author | Raphael Collet <rco@openerp.com> | 2016-09-02 15:58:39 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2016-09-02 17:28:12 +0200 |
| commit | 9e64f9f9514194d74e166b032add8511182f2677 (patch) | |
| tree | 5086710c04c6b923be18a6d1d97b3f0f3a2a9c4a /odoo/conf | |
| parent | 11812b0b9e82b2b1b9041d8250ce01e7b4a5f7ee (diff) | |
[REF] openerp: move `openerp` to `odoo`
Diffstat (limited to 'odoo/conf')
| -rw-r--r-- | odoo/conf/__init__.py | 28 | ||||
| -rw-r--r-- | odoo/conf/deprecation.py | 36 |
2 files changed, 64 insertions, 0 deletions
diff --git a/odoo/conf/__init__.py b/odoo/conf/__init__.py new file mode 100644 index 00000000000..a189f085405 --- /dev/null +++ b/odoo/conf/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +""" Library-wide configuration variables. + +For now, configuration code is in openerp.tools.config. It is in mainly +unprocessed form, e.g. addons_path is a string with commas-separated +paths. The aim is to have code related to configuration (command line +parsing, configuration file loading and saving, ...) in this module +and provide real Python variables, e.g. addons_paths is really a list +of paths. + +To initialize properly this module, openerp.tools.config.parse_config() +must be used. + +""" + +import deprecation + +# Paths to search for OpenERP addons. +addons_paths = [] + +# List of server-wide modules to load. Those modules are supposed to provide +# features not necessarily tied to a particular database. This is in contrast +# to modules that are always bound to a specific database when they are +# installed (i.e. the majority of OpenERP addons). This is set with the --load +# command-line option. +server_wide_modules = [] diff --git a/odoo/conf/deprecation.py b/odoo/conf/deprecation.py new file mode 100644 index 00000000000..4f1c56c980f --- /dev/null +++ b/odoo/conf/deprecation.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +""" Regroup variables for deprecated features. + +To keep the OpenERP server backward compatible with older modules, some +additional code is needed throughout the core library. This module keeps +track of those specific measures by providing variables that can be unset +by the user to check if her code is future proof. + +In a perfect world, all these variables are set to False, the corresponding +code removed, and thus these variables made unnecessary. +""" + +# If True, the Python modules inside the openerp namespace are made available +# without the 'openerp.' prefix. E.g. openerp.osv.osv and osv.osv refer to the +# same module. +# Introduced around 2011.02. +# Change to False around 2013.02. +open_openerp_namespace = False + +# If True, openerp.netsvc.LocalService() can be used to lookup reports or to +# access openerp.workflow. +# Introduced around 2013.03. +# Among the related code: +# - The openerp.netsvc.LocalService() function. +# - The openerp.report.interface.report_int._reports dictionary. +# - The register attribute in openerp.report.interface.report_int (and in its +# - auto column in ir.actions.report.xml. +# inheriting classes). +allow_local_service = True + +# Applies for the register attribute in openerp.report.interface.report_int. +# See comments for allow_local_service above. +# Introduced around 2013.03. +allow_report_int_registration = True |
