diff options
| author | JAM(OpenERP) <> | 2010-12-28 16:20:18 +0530 |
|---|---|---|
| committer | Sbh (OpenERP) <sbh@tinyerp.com> | 2010-12-28 16:20:18 +0530 |
| commit | acacf36ebb8dd7f2d736e19cbfc70ed22b867fdc (patch) | |
| tree | 05806dbe8a3007ac7224b6ed4133b59a61d9d9e6 /addons | |
| parent | a35f4c079a3c3101f41b55a05b2122b25af33993 (diff) | |
[Fix] fetchmail: fix Fetchmail Services
lp bug: https://launchpad.net/bugs/694936 fixed
bzr revid: sbh@tinyerp.com-20101228105018-yp98e3xyrsgxu08g
Diffstat (limited to 'addons')
| -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 |
