From 86e946cc68082beb6ddcdc99120f99a8c46e2d56 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Wed, 29 Nov 2017 16:51:05 +0100 Subject: [PATCH] [11.0][MIG] mail_environment --- mail_environment/README.rst | 4 ++-- mail_environment/__init__.py | 1 - mail_environment/__manifest__.py | 22 +++++++++---------- mail_environment/models/__init__.py | 1 - mail_environment/models/fetchmail_server.py | 6 ++--- mail_environment/models/ir_mail_server.py | 4 +--- .../views/fetchmail_server_views.xml | 4 +++- 7 files changed, 19 insertions(+), 23 deletions(-) diff --git a/mail_environment/README.rst b/mail_environment/README.rst index 9dbfb62..4093b45 100644 --- a/mail_environment/README.rst +++ b/mail_environment/README.rst @@ -33,7 +33,7 @@ default values with a section named `[outgoing_mail.resource_name]` or `[incoming_mail.resource_name]` where "resource_name" is the name of the server. -Exemple of config file :: +Example of config file :: [outgoing_mail] smtp_host = smtp.myserver.com @@ -81,7 +81,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +help us smash it by providing a detailed and welcomed feedback. Credits ======= diff --git a/mail_environment/__init__.py b/mail_environment/__init__.py index a0fdc10..0650744 100644 --- a/mail_environment/__init__.py +++ b/mail_environment/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import models diff --git a/mail_environment/__manifest__.py b/mail_environment/__manifest__.py index 5ae2b65..00983c1 100644 --- a/mail_environment/__manifest__.py +++ b/mail_environment/__manifest__.py @@ -1,19 +1,19 @@ -# -*- coding: utf-8 -*- -# Copyright 2012-2016 Camptocamp SA +# Copyright 2012-2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { 'name': 'Mail configuration with server_environment', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'category': 'Tools', 'summary': 'Configure mail servers with server_environment_files', - 'author': "Camptocamp,Odoo Community Association (OCA)", + 'author': "Camptocamp, Odoo Community Association (OCA)", 'license': 'AGPL-3', - 'website': 'http://odoo-community.org', - 'depends': ['fetchmail', - 'server_environment', - ], - 'data': ['views/fetchmail_server_views.xml', - ], - 'installable': True, + 'website': 'https://github.com/OCA/server-env', + 'depends': [ + 'fetchmail', + 'server_environment', + ], + 'data': [ + 'views/fetchmail_server_views.xml', + ], } diff --git a/mail_environment/models/__init__.py b/mail_environment/models/__init__.py index 493195a..a21a540 100644 --- a/mail_environment/models/__init__.py +++ b/mail_environment/models/__init__.py @@ -1,3 +1,2 @@ -# -*- coding: utf-8 -*- from . import ir_mail_server from . import fetchmail_server diff --git a/mail_environment/models/fetchmail_server.py b/mail_environment/models/fetchmail_server.py index 6d94def..72cd926 100644 --- a/mail_environment/models/fetchmail_server.py +++ b/mail_environment/models/fetchmail_server.py @@ -1,10 +1,8 @@ -# -*- coding: utf-8 -*- -# Copyright 2012-2016 Camptocamp SA +# Copyright 2012-2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) import operator from odoo import api, fields, models - from odoo.addons.server_environment import serv_config @@ -52,7 +50,7 @@ class FetchmailServer(models.Model): if serv_config.has_section(custom_section_name): config_vals.update(serv_config.items(custom_section_name)) - for key, to_type in key_types.iteritems(): + for key, to_type in key_types.items(): if config_vals.get(key): config_vals[key] = to_type(config_vals[key]) diff --git a/mail_environment/models/ir_mail_server.py b/mail_environment/models/ir_mail_server.py index 4aaed62..1f45fd3 100644 --- a/mail_environment/models/ir_mail_server.py +++ b/mail_environment/models/ir_mail_server.py @@ -1,9 +1,7 @@ -# -*- coding: utf-8 -*- -# Copyright 2012-2016 Camptocamp SA +# Copyright 2012-2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import api, fields, models - from odoo.addons.server_environment import serv_config diff --git a/mail_environment/views/fetchmail_server_views.xml b/mail_environment/views/fetchmail_server_views.xml index 1b04550..0c7f113 100644 --- a/mail_environment/views/fetchmail_server_views.xml +++ b/mail_environment/views/fetchmail_server_views.xml @@ -1,6 +1,7 @@ - + + fetchmail.server @@ -18,4 +19,5 @@ +