diff options
| author | jam-openerp <jam@tinyerp.com> | 2010-12-29 14:28:50 +0530 |
|---|---|---|
| committer | jam-openerp <jam@tinyerp.com> | 2010-12-29 14:28:50 +0530 |
| commit | 283ccb7cb7ea08bb1d97be53d34ef86e1c2ca3d1 (patch) | |
| tree | 5e4461435eaea37121c599e6f5af97927a7cc8f4 /addons/fetchmail/fetchmail.py | |
| parent | 1634cb448ab0689814a7c1add18cef5c41cc000f (diff) | |
| parent | d13abf368f7e68aeb7bf2a58ad9a5e6b47eb3385 (diff) | |
[MERGE]with lp:~openerp-dev/openobject-addons/trunk-dev-addons1
bzr revid: jam@tinyerp.com-20101228103052-mnkvkeate2efuc7p
bzr revid: jam@tinyerp.com-20101229045310-ls49g99b96smes9s
bzr revid: jam@tinyerp.com-20101229085850-eg8k31drdh0dpg0b
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 |
