[FIX] alteration of image field without actually changing the image URL
UI allows changing corner even though corners are not saved... bzr revid: xmo@openerp.com-20131202111720-oabkjado7n1jrt66
This commit is contained in:
parent
505e191e7e
commit
52b1ac6a3e
|
@ -232,10 +232,10 @@ class Image(orm.AbstractModel):
|
|||
|
||||
url_object = urlparse.urlsplit(url)
|
||||
query = dict(urlparse.parse_qsl(url_object.query))
|
||||
if url_object.path == '/website/image' and query['model'] == 'ir.attachment':
|
||||
attachment = self.pool['ir.attachment'].browse(
|
||||
if url_object.path == '/website/image':
|
||||
item = self.pool[query['model']].browse(
|
||||
cr, uid, int(query['id']), context=context)
|
||||
return attachment.datas
|
||||
return item[query['field']]
|
||||
|
||||
if self.local_url_re.match(url_object.path):
|
||||
return self.load_local_url(url)
|
||||
|
|
Loading…
Reference in New Issue