[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:
Xavier Morel 2013-12-02 12:17:20 +01:00
parent 505e191e7e
commit 52b1ac6a3e
1 changed files with 3 additions and 3 deletions

View File

@ -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)