[FIX] Serve ir.attachment with SUPERUSER_ID
We are not supposed to have a user id here bzr revid: fme@openerp.com-20140326184022-1hulv7t5y6vuvr9y
This commit is contained in:
parent
a0bbbf75c3
commit
b7fbef1241
|
@ -102,7 +102,7 @@ class ir_http(orm.AbstractModel):
|
|||
|
||||
def _serve_attachment(self):
|
||||
domain = [('type', '=', 'binary'), ('url', '=', request.httprequest.path)]
|
||||
attach = self.pool['ir.attachment'].search_read(request.cr, request.uid, domain, ['__last_update', 'datas', 'mimetype'], context=request.context)
|
||||
attach = self.pool['ir.attachment'].search_read(request.cr, openerp.SUPERUSER_ID, domain, ['__last_update', 'datas', 'mimetype'], context=request.context)
|
||||
if attach:
|
||||
wdate = attach[0]['__last_update']
|
||||
datas = attach[0]['datas']
|
||||
|
|
Loading…
Reference in New Issue