[FIX] website: avoid using werkzeug API only present in 0.9+

bzr revid: odo@openerp.com-20140424131415-ot0r5062wndvuicr
This commit is contained in:
Olivier Dony
2014-04-24 15:14:15 +02:00
parent c16780df83
commit 3ad6d69b21
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -393,7 +393,7 @@ class Website(openerp.addons.web.controllers.main.Home):
# record provides a pre-resized version of the base field, use that
# directly
if record.get(presized):
response.set_data(data)
response.data = data
return response
fit = int(max_width), int(max_height)
@@ -401,7 +401,7 @@ class Website(openerp.addons.web.controllers.main.Home):
max_w, max_h = fit
if w < max_w and h < max_h:
response.set_data(data)
response.data = data
else:
image.thumbnail(fit, Image.ANTIALIAS)
image.save(response.stream, image.format)
+1 -1
View File
@@ -121,7 +121,7 @@ class ir_http(orm.AbstractModel):
return response
response.mimetype = attach[0]['mimetype']
response.set_data(datas.decode('base64'))
response.data = datas.decode('base64')
return response
def _handle_exception(self, exception=None, code=500):