openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #14712
[Bug 1039764] Re: error when fetching email with attachment
*** This bug is a duplicate of bug 1031694 ***
https://bugs.launchpad.net/bugs/1031694
** This bug has been marked a duplicate of bug 1031694
Incoming Mail with attachment error
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1039764
Title:
error when fetching email with attachment
Status in OpenERP Addons (modules):
New
Bug description:
This is on 6.1 branch :
- Configure an incoming mail server on IMAP.
- in the created object type, choose 'mail thread'
- send an email with attachment to this email address
- try to fetch mail
I get the traceback below.
It works well with a simple e-mail without attachment.
I've checked other similar bugs but they are not related (6.0 version or duplicate name).
I could fix the situation by creating a model inherited from mail.thread, and by just adding a 'name' field.
I'm not sure the issue is in the fetchmail module or in the orm.
2012-08-21 21:25:09,226 22491 INFO ? fetchmail: start checking for new emails on imap server OVH
2012-08-21 21:25:09,604 22491 ERROR ? fetchmail: Failed to fetch mail from imap server OVH
Traceback (most recent call last):
File ".../openerp-6.1-20120731-121108/openerp/addons/fetchmail/fetchmail.py", line 196, in fetch_mail
context=context)
File ".../openerp-6.1-20120731-121108/openerp/addons/mail/mail_thread.py", line 387, in message_process
res_id = create_record(msg)
File ".../openerp-6.1-20120731-121108/openerp/addons/mail/mail_thread.py", line 361, in create_record
context=context)
File ".../openerp-6.1-20120731-121108/openerp/addons/mail/mail_thread.py", line 134, in message_new
self.message_append_dict(cr, uid, [res_id], msg_dict, context=context)
File ".../openerp-6.1-20120731-121108/openerp/addons/mail/mail_thread.py", line 305, in message_append_dict
context = context)
File ".../openerp-6.1-20120731-121108/openerp/addons/mail/mail_thread.py", line 224, in message_append
to_attach.append(ir_attachment.create(cr, uid, data_attach, context=context))
File ".../openerp-6.1-20120731-121108/openerp/addons/base/ir/ir_attachment.py", line 117, in create
return super(ir_attachment, self).create(cr, uid, values, context)
File ".../openerp-6.1-20120731-121108/openerp/osv/orm.py", line 4239, in create
self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
File ".../openerp-6.1-20120731-121108/openerp/osv/orm.py", line 4388, in _store_set_values
result = self._columns[f].get(cr, self, ids, f, SUPERUSER_ID, context=context)
File ".../openerp-6.1-20120731-121108/openerp/osv/fields.py", line 1129, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File ".../openerp-6.1-20120731-121108/openerp/addons/base/ir/ir_attachment.py", line 130, in _name_get_resname
res = model_pool.name_get(cr,uid,[res_id],context)
File ".../openerp-6.1-20120731-121108/openerp/osv/orm.py", line 2262, in name_get
[self._rec_name], context, load='_classic_write')]
KeyError: 'name'
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1039764/+subscriptions
References