summaryrefslogtreecommitdiff
path: root/addons/fetchmail/models/fetchmail.py
diff options
context:
space:
mode:
authorPrakash Prajapati <ppr@odoo.com>2019-04-30 05:56:19 +0000
committerMartin Geubelle <mge@odoo.com>2019-05-16 09:32:22 +0000
commitc33afb6d556176883efec496e818f3058b412933 (patch)
tree7e72c727cfd5f69ee788ccf0f9776508cc435225 /addons/fetchmail/models/fetchmail.py
parent5ec4121383eed17fd5fb8e08cf88aa04c5e82d37 (diff)
[IMP] fetchmail: local incoming mail server UI and default script
The purpose of this commit is to clean the user interface of local incoming mail server and also update the script field default value and configuration as per new script (from openerp_mailgate to odoo-mailgate). task-1891157 closes odoo/odoo#33072 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Diffstat (limited to 'addons/fetchmail/models/fetchmail.py')
-rw-r--r--addons/fetchmail/models/fetchmail.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/addons/fetchmail/models/fetchmail.py b/addons/fetchmail/models/fetchmail.py
index 62334f45562..bda31375d81 100644
--- a/addons/fetchmail/models/fetchmail.py
+++ b/addons/fetchmail/models/fetchmail.py
@@ -53,7 +53,7 @@ class FetchmailServer(models.Model):
priority = fields.Integer(string='Server Priority', readonly=True, states={'draft': [('readonly', False)]}, help="Defines the order of processing, lower values mean higher priority", default=5)
message_ids = fields.One2many('mail.mail', 'fetchmail_server_id', string='Messages', readonly=True)
configuration = fields.Text('Configuration', readonly=True)
- script = fields.Char(readonly=True, default='/mail/static/scripts/openerp_mailgate.py')
+ script = fields.Char(readonly=True, default='/mail/static/scripts/odoo-mailgate.py')
@api.onchange('server_type', 'is_ssl', 'object_id')
def onchange_server_type(self):
@@ -70,14 +70,12 @@ class FetchmailServer(models.Model):
'uid': self.env.uid,
'model': self.object_id.model if self.object_id else 'MODELNAME'
}
- self.configuration = """
- Use the below script with the following command line options with your Mail Transport Agent (MTA)
- openerp_mailgate.py --host=HOSTNAME --port=PORT -u %(uid)d -p PASSWORD -d %(dbname)s
- Example configuration for the postfix mta running locally:
- /etc/postfix/virtual_aliases:
- @youdomain openerp_mailgate@localhost
- /etc/aliases:
- openerp_mailgate: "|/path/to/openerp-mailgate.py --host=localhost -u %(uid)d -p PASSWORD -d %(dbname)s"
+ self.configuration = """Use the below script with the following command line options with your Mail Transport Agent (MTA)
+odoo-mailgate.py --host=HOSTNAME --port=PORT -u %(uid)d -p PASSWORD -d %(dbname)s
+Example configuration for the postfix mta running locally:
+/etc/postfix/virtual_aliases: @youdomain odoo_mailgate@localhost
+/etc/aliases:
+odoo_mailgate: "|/path/to/odoo-mailgate.py --host=localhost -u %(uid)d -p PASSWORD -d %(dbname)s"
""" % conf
@api.model