7.0/trunk : Attachment on compose message throws error!
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Invalid
|
Medium
|
OpenERP's Framework R&D | ||
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP's Framework R&D |
Bug Description
1.
Compose a new message, add an attachment to the message, click send. (even on a brand new database).
2.
Stack trace below.
3.
Expected it to send.
4.
ubuntu server side, chrome client side.
5.
7.0-20130421-
------------
Server Traceback (most recent call last):
File "/usr/lib/
return openerp.
File "/usr/lib/
result = ExportService.
File "/usr/lib/
res = fn(db, uid, *params)
File "/usr/lib/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/
return f(self, dbname, *args, **kwargs)
File "/usr/lib/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/lib/
return super(mail_
File "/usr/lib/
return super(mail_
File "/usr/lib/
return super(mail_
File "/usr/lib/
msg_id = active_
File "/usr/lib/
ir_
File "/usr/lib/
self.check(cr, uid, ids, 'write', context=context, values=vals)
File "/usr/lib/
mids = self.pool.
AttributeError: 'NoneType' object has no attribute 'exists'
Related branches
- Thibault Delavallée (OpenERP) (community): Approve
- Stefan Rijnhart (Opener) (community): Approve
- Dhruti Shastri(OpenERP) (community): Needs Resubmitting
- Naresh(OpenERP): Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedopenerp/addons/base/ir/ir_attachment.py (+1/-1)
- OpenERP Core Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedmail/mail_thread.py (+1/-1)
- Mohammed Shekha(Open ERP) (community): Needs Resubmitting
- Thibault Delavallée (OpenERP): Pending requested
-
Diff: 25 lines (+6/-2)1 file modifiedmail/static/src/js/mail.js (+6/-2)
In ir_attachment.py line 205 or thereabout, if I change it to this, I do not get a trace, but I'm not sure it is meant to behave like this:
ima = self.pool. get('ir. model.access' )
continue get(model) .exists( cr, uid, mids)
ima. check(cr, uid, model, mode)
for model, mids in res_ids.items():
if not model:
# ignore attachments that are not attached to a resource anymore when checking access rights
# (resource was deleted but attachment was not)
mids = self.pool.
where I added just the part to continue if the model is false.