From cbe2dbb672a6c55d86f2e515f9d1cdfee426ef80 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Sun, 6 Jul 2014 16:44:26 +0200 Subject: [MERGE] new v8 api by rco A squashed merge is required as the conversion of the apiculture branch from bzr to git was not correctly done. The git history contains irrelevant blobs and commits. This branch brings a lot of changes and fixes, too many to list exhaustively. - New orm api, objects are now used instead of ids - Environements to encapsulates cr uid context while maintaining backward compatibility - Field compute attribute is a new object oriented way to define function fields - Shared browse record cache - New onchange protocol - Optional copy flag on fields - Documentation update - Dead code cleanup - Lots of fixes --- addons/fetchmail/fetchmail.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'addons/fetchmail') 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') -- cgit v1.2.3