From a5ba449ea65d71b1a3ef0f8b765022598fa6f7ec Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 28 Jan 2020 11:49:20 +0100 Subject: [PATCH] Run pre-commit (black, isort) --- mail_environment/README.rst | 10 +++---- mail_environment/__manifest__.py | 2 +- mail_environment/i18n/de.po | 27 ++++++----------- mail_environment/i18n/es.po | 17 +---------- mail_environment/i18n/hr.po | 27 ++++++----------- mail_environment/i18n/mail_environment.pot | 24 +++------------ mail_environment/i18n/pt_BR.po | 30 ++++++++----------- mail_environment/i18n/sl.po | 27 ++++++----------- mail_environment/i18n/zh_CN.po | 27 ++++++----------- mail_environment/models/fetchmail_server.py | 20 +++++++------ mail_environment/models/ir_mail_server.py | 2 +- .../static/description/index.html | 6 ++-- 12 files changed, 74 insertions(+), 145 deletions(-) diff --git a/mail_environment/README.rst b/mail_environment/README.rst index 190904d..915a1e0 100644 --- a/mail_environment/README.rst +++ b/mail_environment/README.rst @@ -14,13 +14,13 @@ Mail configuration with server_environment :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github - :target: https://github.com/OCA/server-env/tree/12.0/mail_environment + :target: https://github.com/OCA/server-env/tree/13.0/mail_environment :alt: OCA/server-env .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-env-12-0/server-env-12-0-mail_environment + :target: https://translation.odoo-community.org/projects/server-env-13-0/server-env-13-0-mail_environment :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/254/12.0 + :target: https://runbot.odoo-community.org/runbot/254/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -103,7 +103,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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -138,6 +138,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-env `_ project on GitHub. +This module is part of the `OCA/server-env `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_environment/__manifest__.py b/mail_environment/__manifest__.py index 8eee4dc..63c7dad 100644 --- a/mail_environment/__manifest__.py +++ b/mail_environment/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Mail configuration with server_environment", - "version": "13.0.1.0.0", + "version": "13.0.1.0.1", "category": "Tools", "summary": "Configure mail servers with server_environment_files", "author": "Camptocamp, Odoo Community Association (OCA)", diff --git a/mail_environment/i18n/de.po b/mail_environment/i18n/de.po index 2f63945..01f50ce 100644 --- a/mail_environment/i18n/de.po +++ b/mail_environment/i18n/de.po @@ -19,22 +19,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -#, fuzzy -msgid "IMAP Server" -msgstr "POP/IMAP-Server" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "Local Server" -msgstr "" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_ir_mail_server #, fuzzy @@ -42,12 +31,14 @@ msgid "Mail Server" msgstr "ir.mail_server" #. module: mail_environment -#: selection:fetchmail.server,type:0 -#, fuzzy -msgid "POP Server" -msgstr "POP/IMAP-Server" - -#. module: mail_environment -#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__type +#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type msgid "Server Type" msgstr "" + +#, fuzzy +#~ msgid "IMAP Server" +#~ msgstr "POP/IMAP-Server" + +#, fuzzy +#~ msgid "POP Server" +#~ msgstr "POP/IMAP-Server" diff --git a/mail_environment/i18n/es.po b/mail_environment/i18n/es.po index 8e8fdeb..d0410dd 100644 --- a/mail_environment/i18n/es.po +++ b/mail_environment/i18n/es.po @@ -18,21 +18,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "IMAP Server" -msgstr "" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "Local Server" -msgstr "" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_ir_mail_server #, fuzzy @@ -40,11 +30,6 @@ msgid "Mail Server" msgstr "ir.mail_server" #. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "POP Server" -msgstr "" - -#. module: mail_environment -#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__type +#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type msgid "Server Type" msgstr "" diff --git a/mail_environment/i18n/hr.po b/mail_environment/i18n/hr.po index 464b0dd..ce39074 100644 --- a/mail_environment/i18n/hr.po +++ b/mail_environment/i18n/hr.po @@ -20,22 +20,11 @@ msgstr "" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -#, fuzzy -msgid "IMAP Server" -msgstr "POP/IMAP Server" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "Local Server" -msgstr "" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_ir_mail_server #, fuzzy @@ -43,12 +32,14 @@ msgid "Mail Server" msgstr "ir.mail_server" #. module: mail_environment -#: selection:fetchmail.server,type:0 -#, fuzzy -msgid "POP Server" -msgstr "POP/IMAP Server" - -#. module: mail_environment -#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__type +#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type msgid "Server Type" msgstr "" + +#, fuzzy +#~ msgid "IMAP Server" +#~ msgstr "POP/IMAP Server" + +#, fuzzy +#~ msgid "POP Server" +#~ msgstr "POP/IMAP Server" diff --git a/mail_environment/i18n/mail_environment.pot b/mail_environment/i18n/mail_environment.pot index 44c1244..7ce0740 100644 --- a/mail_environment/i18n/mail_environment.pot +++ b/mail_environment/i18n/mail_environment.pot @@ -1,45 +1,29 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * mail_environment +# * mail_environment # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "IMAP Server" -msgstr "" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "Local Server" -msgstr "" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_ir_mail_server msgid "Mail Server" msgstr "" #. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "POP Server" -msgstr "" - -#. module: mail_environment -#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__type +#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type msgid "Server Type" msgstr "" - diff --git a/mail_environment/i18n/pt_BR.po b/mail_environment/i18n/pt_BR.po index 8e13b4b..77949cf 100644 --- a/mail_environment/i18n/pt_BR.po +++ b/mail_environment/i18n/pt_BR.po @@ -10,8 +10,8 @@ msgstr "" "POT-Creation-Date: 2015-09-29 11:14+0000\n" "PO-Revision-Date: 2019-09-03 01:23+0000\n" "Last-Translator: Rodrigo Macedo \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/" -"OCA-server-tools-8-0/language/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-" +"tools-8-0/language/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,32 +19,26 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 3.8\n" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "IMAP Server" -msgstr "Servidor IMAP" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_fetchmail_server msgid "Incoming Mail Server" msgstr "Servidor de Mensagens Recebidas" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "Local Server" -msgstr "Servidor Local" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_ir_mail_server msgid "Mail Server" msgstr "Servidor de E-mail" #. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "POP Server" -msgstr "Servidor POP" - -#. module: mail_environment -#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__type +#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type msgid "Server Type" msgstr "Tipo de Servidor" + +#~ msgid "IMAP Server" +#~ msgstr "Servidor IMAP" + +#~ msgid "Local Server" +#~ msgstr "Servidor Local" + +#~ msgid "POP Server" +#~ msgstr "Servidor POP" diff --git a/mail_environment/i18n/sl.po b/mail_environment/i18n/sl.po index 7b0594e..bfc333f 100644 --- a/mail_environment/i18n/sl.po +++ b/mail_environment/i18n/sl.po @@ -20,22 +20,11 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "%100==4 ? 2 : 3);\n" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -#, fuzzy -msgid "IMAP Server" -msgstr "POP/IMAP strežnik" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "Local Server" -msgstr "" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_ir_mail_server #, fuzzy @@ -43,12 +32,14 @@ msgid "Mail Server" msgstr "ir.mail_server" #. module: mail_environment -#: selection:fetchmail.server,type:0 -#, fuzzy -msgid "POP Server" -msgstr "POP/IMAP strežnik" - -#. module: mail_environment -#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__type +#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type msgid "Server Type" msgstr "" + +#, fuzzy +#~ msgid "IMAP Server" +#~ msgstr "POP/IMAP strežnik" + +#, fuzzy +#~ msgid "POP Server" +#~ msgstr "POP/IMAP strežnik" diff --git a/mail_environment/i18n/zh_CN.po b/mail_environment/i18n/zh_CN.po index ee795ce..87df47e 100644 --- a/mail_environment/i18n/zh_CN.po +++ b/mail_environment/i18n/zh_CN.po @@ -19,22 +19,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=1; plural=0;\n" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -#, fuzzy -msgid "IMAP Server" -msgstr "POP/IMAP 服务器" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" -#. module: mail_environment -#: selection:fetchmail.server,type:0 -msgid "Local Server" -msgstr "" - #. module: mail_environment #: model:ir.model,name:mail_environment.model_ir_mail_server #, fuzzy @@ -42,12 +31,14 @@ msgid "Mail Server" msgstr "POP/IMAP 服务器" #. module: mail_environment -#: selection:fetchmail.server,type:0 -#, fuzzy -msgid "POP Server" -msgstr "POP/IMAP 服务器" - -#. module: mail_environment -#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__type +#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type msgid "Server Type" msgstr "" + +#, fuzzy +#~ msgid "IMAP Server" +#~ msgstr "POP/IMAP 服务器" + +#, fuzzy +#~ msgid "POP Server" +#~ msgstr "POP/IMAP 服务器" diff --git a/mail_environment/models/fetchmail_server.py b/mail_environment/models/fetchmail_server.py index c2020f0..fbe30fe 100644 --- a/mail_environment/models/fetchmail_server.py +++ b/mail_environment/models/fetchmail_server.py @@ -2,12 +2,14 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) import operator + from odoo import api, fields, models class FetchmailServer(models.Model): """Incoming POP/IMAP mail server account""" - _name = 'fetchmail.server' + + _name = "fetchmail.server" _inherit = ["fetchmail.server", "server.env.mixin"] @property @@ -26,7 +28,7 @@ class FetchmailServer(models.Model): mail_fields.update(base_fields) return mail_fields - server_type = fields.Selection(search='_search_server_type') + server_type = fields.Selection(search="_search_server_type") @api.model def _server_env_global_section_name(self): @@ -34,19 +36,19 @@ class FetchmailServer(models.Model): Can be customized in your model """ - return 'incoming_mail' + return "incoming_mail" @api.model def _search_type(self, oper, value): operators = { - '=': operator.eq, - '!=': operator.ne, - 'in': operator.contains, - 'not in': lambda a, b: not operator.contains(a, b), + "=": operator.eq, + "!=": operator.ne, + "in": operator.contains, + "not in": lambda a, b: not operator.contains(a, b), } if oper not in operators: - return [('id', 'in', [])] + return [("id", "in", [])] servers = self.search([]).filtered( lambda s: operators[oper](value, s.server_type) ) - return [('id', 'in', servers.ids)] + return [("id", "in", servers.ids)] diff --git a/mail_environment/models/ir_mail_server.py b/mail_environment/models/ir_mail_server.py index 7f3c7af..984cce4 100644 --- a/mail_environment/models/ir_mail_server.py +++ b/mail_environment/models/ir_mail_server.py @@ -27,4 +27,4 @@ class IrMailServer(models.Model): Can be customized in your model """ - return 'outgoing_mail' + return "outgoing_mail" diff --git a/mail_environment/static/description/index.html b/mail_environment/static/description/index.html index 5ef4e10..4848f32 100644 --- a/mail_environment/static/description/index.html +++ b/mail_environment/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/server-env Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/server-env Translate me on Weblate Try me on Runbot

This module allows to configure the incoming and outgoing mail servers using the server_environment mechanism: you can then have different mail servers for the production and the test environment.

@@ -450,7 +450,7 @@ runbot.

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.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -479,7 +479,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/server-env project on GitHub.

+

This module is part of the OCA/server-env project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.