diff options
Diffstat (limited to 'addons/fetchmail/fetchmail.py')
| -rw-r--r-- | addons/fetchmail/fetchmail.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index b4cac75b4a4..55ac185a0cb 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -52,7 +52,7 @@ class fetchmail_server(osv.osv): 'state':fields.selection([ ('draft', 'Not Confirmed'), ('done', 'Confirmed'), - ], 'Status', select=True, readonly=True), + ], 'Status', select=True, readonly=True, copy=False), 'server' : fields.char('Server Name', readonly=True, help="Hostname or IP of the mail server", states={'draft':[('readonly', False)]}), 'port' : fields.integer('Port', readonly=True, states={'draft':[('readonly', False)]}), 'type':fields.selection([ @@ -179,8 +179,7 @@ openerp_mailgate: "|/path/to/openerp-mailgate.py --host=localhost -u %(uid)d -p def fetch_mail(self, cr, uid, ids, context=None): """WARNING: meant for cron usage only - will commit() after each email!""" - if context is None: - context = {} + context = dict(context or {}) context['fetchmail_cron_running'] = True mail_thread = self.pool.get('mail.thread') action_pool = self.pool.get('ir.actions.server') |
