diff options
| author | rha@tinyerp.com <> | 2011-01-07 12:02:58 +0530 |
|---|---|---|
| committer | rha@tinyerp.com <> | 2011-01-07 12:02:58 +0530 |
| commit | 496e491f4e9be433f1c5629c4ecc259041e2e5d2 (patch) | |
| tree | 699b7b9cc5e0de931fb49c364f051707e058b439 /addons/fetchmail/fetchmail.py | |
| parent | bc8fe779879b79ff5d07e4b33b707b91a49262a3 (diff) | |
| parent | b61007cb7d68bcaa38f3cbaf0eac168dfbb6fc41 (diff) | |
[MERGE]: Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: rha@tinyerp.com-20110107063258-nou8nqzwefq6xf2y
Diffstat (limited to 'addons/fetchmail/fetchmail.py')
| -rw-r--r-- | addons/fetchmail/fetchmail.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 772771db915..a1209492490 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -84,9 +84,11 @@ class email_server(osv.osv): def check_model(self, cr, uid, ids, context = None): if context is None: context = {} - current_rec = self.read(cr, uid, ids, context)[0] + current_rec = self.read(cr, uid, ids, context) if current_rec: - model = self.pool.get(current_rec.get('object_id')[1]) + current_rec = current_rec[0] + model_name = self.pool.get('ir.model').browse(cr, uid, current_rec.get('object_id')[0]).model + model = self.pool.get(model_name) if hasattr(model, 'message_new'): return True return False |
