From 405d90406fd3fa861d6106e15ccbc0f6e19767da Mon Sep 17 00:00:00 2001 From: "Guewen Baconnier @ Camptocamp" Date: Mon, 5 Mar 2012 10:05:30 +0100 Subject: [PATCH] [MRG] from upstream (lp:c2c-addons/6.1 rev 45.1.4) --- mail_environment/__init__.py | 7 +------ mail_environment/__openerp__.py | 21 +++++++++++++++++-- mail_environment/env_mail.py | 20 ++++++++++++++++-- .../__init__.py | 15 ++++++------- .../__openerp__.py | 14 +++++++------ .../base_external_referentials.py | 13 ++++++------ server_environment/serv_config.py | 13 +++++++----- 7 files changed, 69 insertions(+), 34 deletions(-) diff --git a/mail_environment/__init__.py b/mail_environment/__init__.py index beab69dc0..be0b4da9a 100644 --- a/mail_environment/__init__.py +++ b/mail_environment/__init__.py @@ -1,6 +1 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Author Nicolas Bessi. Copyright Camptocamp SA -############################################################################## -from . import env_mail \ No newline at end of file +from . import env_mail diff --git a/mail_environment/__openerp__.py b/mail_environment/__openerp__.py index 49544f577..fce396f8d 100644 --- a/mail_environment/__openerp__.py +++ b/mail_environment/__openerp__.py @@ -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 . +# ############################################################################## + { 'name': 'Server env config for mail + fetchmail', 'version': '0.1', @@ -39,6 +55,7 @@ password = openerp """, 'author': 'Camptocamp', + 'license': 'AGPL-3', 'website': 'http://openerp.camptocamp.com', 'depends': ['mail', 'fetchmail', 'server_environment', 'server_environment_files', 'crm'], 'init_xml': [], diff --git a/mail_environment/env_mail.py b/mail_environment/env_mail.py index 77d265b38..59d5f5fe9 100644 --- a/mail_environment/env_mail.py +++ b/mail_environment/env_mail.py @@ -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 . +# ############################################################################## + from osv import fields from osv import osv diff --git a/server_env_base_external_referentials/__init__.py b/server_env_base_external_referentials/__init__.py index 74e3c6a64..3934b6ed9 100644 --- a/server_env_base_external_referentials/__init__.py +++ b/server_env_base_external_referentials/__init__.py @@ -1,21 +1,22 @@ # -*- 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 -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 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 . # ############################################################################## -import base_external_referentials \ No newline at end of file +import base_external_referentials diff --git a/server_env_base_external_referentials/__openerp__.py b/server_env_base_external_referentials/__openerp__.py index 5c8eb7442..ebcb918d2 100644 --- a/server_env_base_external_referentials/__openerp__.py +++ b/server_env_base_external_referentials/__openerp__.py @@ -1,19 +1,20 @@ # -*- 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 -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 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 . # ############################################################################## @@ -23,6 +24,7 @@ "version": "1.0", "depends": ["base", 'server_environment', 'base_external_referentials'], "author": "Camptocamp", + 'license': 'AGPL-3', "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). This module define the config variables for the base_external_referential module. diff --git a/server_env_base_external_referentials/base_external_referentials.py b/server_env_base_external_referentials/base_external_referentials.py index 735306fdb..35745e915 100644 --- a/server_env_base_external_referentials/base_external_referentials.py +++ b/server_env_base_external_referentials/base_external_referentials.py @@ -1,19 +1,20 @@ # -*- 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 -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 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 . # ############################################################################## diff --git a/server_environment/serv_config.py b/server_environment/serv_config.py index 196b33ef1..b8640714f 100644 --- a/server_environment/serv_config.py +++ b/server_environment/serv_config.py @@ -38,16 +38,16 @@ _boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True, if not system_base_config.get('running_env', False): raise Exception( - "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" - "[options]\nrunning_env = dev" + ("The parameter 'running_env' has not be set neither in base config file option -c or in openerprc.\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") ) - + ck_path = os.path.join(_dir, system_base_config['running_env']) if not os.path.exists(ck_path) : 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): @@ -127,6 +127,9 @@ class ServerConfiguration(osv.osv_memory): # Mask passwords if 'passw' in k and not self.show_passwords: 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._conf_defaults[key] = v names.append(key)