[11.0][MIG] mail_environment

This commit is contained in:
Simone Orsi 2017-11-29 16:51:05 +01:00 committed by Guewen Baconnier
parent 518446179c
commit aad7dcec81
7 changed files with 19 additions and 23 deletions

View File

@ -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 `[incoming_mail.resource_name]` where "resource_name" is the name of
the server. the server.
Exemple of config file :: Example of config file ::
[outgoing_mail] [outgoing_mail]
smtp_host = smtp.myserver.com smtp_host = smtp.myserver.com
@ -81,7 +81,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues Bugs are tracked on `GitHub Issues
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please <https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first, 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 Credits
======= =======

View File

@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import models from . import models

View File

@ -1,19 +1,19 @@
# -*- coding: utf-8 -*- # Copyright 2012-2018 Camptocamp SA
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{ {
'name': 'Mail configuration with server_environment', 'name': 'Mail configuration with server_environment',
'version': '10.0.1.0.0', 'version': '11.0.1.0.0',
'category': 'Tools', 'category': 'Tools',
'summary': 'Configure mail servers with server_environment_files', 'summary': 'Configure mail servers with server_environment_files',
'author': "Camptocamp,Odoo Community Association (OCA)", 'author': "Camptocamp, Odoo Community Association (OCA)",
'license': 'AGPL-3', 'license': 'AGPL-3',
'website': 'http://odoo-community.org', 'website': 'https://github.com/OCA/server-env',
'depends': ['fetchmail', 'depends': [
'server_environment', 'fetchmail',
], 'server_environment',
'data': ['views/fetchmail_server_views.xml', ],
], 'data': [
'installable': True, 'views/fetchmail_server_views.xml',
],
} }

View File

@ -1,3 +1,2 @@
# -*- coding: utf-8 -*-
from . import ir_mail_server from . import ir_mail_server
from . import fetchmail_server from . import fetchmail_server

View File

@ -1,10 +1,8 @@
# -*- coding: utf-8 -*- # Copyright 2012-2018 Camptocamp SA
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
import operator import operator
from odoo import api, fields, models from odoo import api, fields, models
from odoo.addons.server_environment import serv_config from odoo.addons.server_environment import serv_config
@ -52,7 +50,7 @@ class FetchmailServer(models.Model):
if serv_config.has_section(custom_section_name): if serv_config.has_section(custom_section_name):
config_vals.update(serv_config.items(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): if config_vals.get(key):
config_vals[key] = to_type(config_vals[key]) config_vals[key] = to_type(config_vals[key])

View File

@ -1,9 +1,7 @@
# -*- coding: utf-8 -*- # Copyright 2012-2018 Camptocamp SA
# Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api, fields, models from odoo import api, fields, models
from odoo.addons.server_environment import serv_config from odoo.addons.server_environment import serv_config

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<record model="ir.ui.view" id="inherit_fetchmail">
<record id="inherit_fetchmail" model="ir.ui.view">
<field name="model">fetchmail.server</field> <field name="model">fetchmail.server</field>
<field name="inherit_id" ref="fetchmail.view_email_server_form"/> <field name="inherit_id" ref="fetchmail.view_email_server_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
@ -18,4 +19,5 @@
</field> </field>
</field> </field>
</record> </record>
</odoo> </odoo>