parent
81e168ea3b
commit
405d90406f
|
@ -1,6 +1 @@
|
||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Author Nicolas Bessi. Copyright Camptocamp SA
|
|
||||||
##############################################################################
|
|
||||||
from . import env_mail
|
from . import env_mail
|
|
@ -1,8 +1,24 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Author Nicolas Bessi. Copyright Camptocamp SA
|
# Author: Nicolas Bessi
|
||||||
|
# Copyright 2012 Camptocamp SA
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Server env config for mail + fetchmail',
|
'name': 'Server env config for mail + fetchmail',
|
||||||
'version': '0.1',
|
'version': '0.1',
|
||||||
|
@ -39,6 +55,7 @@ password = openerp
|
||||||
|
|
||||||
""",
|
""",
|
||||||
'author': 'Camptocamp',
|
'author': 'Camptocamp',
|
||||||
|
'license': 'AGPL-3',
|
||||||
'website': 'http://openerp.camptocamp.com',
|
'website': 'http://openerp.camptocamp.com',
|
||||||
'depends': ['mail', 'fetchmail', 'server_environment', 'server_environment_files', 'crm'],
|
'depends': ['mail', 'fetchmail', 'server_environment', 'server_environment_files', 'crm'],
|
||||||
'init_xml': [],
|
'init_xml': [],
|
||||||
|
|
|
@ -1,8 +1,24 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Author Nicolas Bessi. Copyright Camptocamp SA
|
# Author: Nicolas Bessi
|
||||||
|
# Copyright 2012 Camptocamp SA
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from osv import fields
|
from osv import fields
|
||||||
from osv import osv
|
from osv import osv
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Author Guewen Baconnier. Copyright Camptocamp SA
|
# Author: Guewen Baconnier
|
||||||
|
# Copyright 2012 Camptocamp SA
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU Affero General Public License as
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
# (at your option) any later version.
|
# License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU Affero General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Author Guewen Baconnier. Copyright Camptocamp SA
|
# Author: Guewen Baconnier
|
||||||
|
# Copyright 2011-2012 Camptocamp SA
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU Affero General Public License as
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
# (at your option) any later version.
|
# License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU Affero General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -23,6 +24,7 @@
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"depends": ["base", 'server_environment', 'base_external_referentials'],
|
"depends": ["base", 'server_environment', 'base_external_referentials'],
|
||||||
"author": "Camptocamp",
|
"author": "Camptocamp",
|
||||||
|
'license': 'AGPL-3',
|
||||||
"description": """This module is based on the server_environment module to use files for configuration.
|
"description": """This module is based on the server_environment module to use files for configuration.
|
||||||
Thus we can have a different file for each environment (dev, test, staging, prod).
|
Thus we can have a different file for each environment (dev, test, staging, prod).
|
||||||
This module define the config variables for the base_external_referential module.
|
This module define the config variables for the base_external_referential module.
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Author Guewen Baconnier. Copyright Camptocamp SA
|
# Author: Guewen Baconnier
|
||||||
|
# Copyright 2011-2012 Camptocamp SA
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU Affero General Public License as
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
# (at your option) any later version.
|
# License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU Affero General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
|
@ -38,16 +38,16 @@ _boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
|
||||||
|
|
||||||
if not system_base_config.get('running_env', False):
|
if not system_base_config.get('running_env', False):
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"The parameter 'running_env' has not be set neither in base config file option -c or in openerprc.\n"
|
("The parameter 'running_env' has not be set neither in base config file option -c or in openerprc.\n"
|
||||||
"We strongly recommend against using the rc file but instead use an explicit config file with this content:\n"
|
"We strongly recommand you not to use the rc file but instead use an explicite config file with this content : \n"
|
||||||
"[options]\nrunning_env = dev"
|
"[options] \nrunning_env = dev")
|
||||||
)
|
)
|
||||||
|
|
||||||
ck_path = os.path.join(_dir, system_base_config['running_env'])
|
ck_path = os.path.join(_dir, system_base_config['running_env'])
|
||||||
|
|
||||||
if not os.path.exists(ck_path) :
|
if not os.path.exists(ck_path) :
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"Provided server environment does not exist, please add a folder %s" % ck_path
|
"Provided server environment does not exists please add a folder %s"%(ck_path)
|
||||||
)
|
)
|
||||||
|
|
||||||
def setboolean(obj, attr, _bool=_boolean_states):
|
def setboolean(obj, attr, _bool=_boolean_states):
|
||||||
|
@ -127,6 +127,9 @@ class ServerConfiguration(osv.osv_memory):
|
||||||
# Mask passwords
|
# Mask passwords
|
||||||
if 'passw' in k and not self.show_passwords:
|
if 'passw' in k and not self.show_passwords:
|
||||||
v = '**********'
|
v = '**********'
|
||||||
|
# for the GTK display, we need to replace '_' with '__'.
|
||||||
|
# XXX: remove this hack when we switch to the web client.
|
||||||
|
k = k.replace('_', '__')
|
||||||
self._columns[key] = fields.char(k, size=1024)
|
self._columns[key] = fields.char(k, size=1024)
|
||||||
self._conf_defaults[key] = v
|
self._conf_defaults[key] = v
|
||||||
names.append(key)
|
names.append(key)
|
||||||
|
|
Loading…
Reference in New Issue