diff --git a/addons/mail/controllers/discuss.py b/addons/mail/controllers/discuss.py index 85a09d93910..24f6b85b4f2 100644 --- a/addons/mail/controllers/discuss.py +++ b/addons/mail/controllers/discuss.py @@ -183,7 +183,7 @@ class DiscussController(http.Controller): raise NotFound() return request.env['ir.binary']._get_image_stream_from( - attachment_sudo, width=width, height=height + attachment_sudo, width=int(width), height=int(height) ).get_response(as_attachment=kwargs.get('download')) # -------------------------------------------------------------------------- diff --git a/addons/web/controllers/binary.py b/addons/web/controllers/binary.py index b547d55110f..2b2cfb2095e 100644 --- a/addons/web/controllers/binary.py +++ b/addons/web/controllers/binary.py @@ -142,7 +142,7 @@ class Binary(http.Controller): width, height = image_guess_size_from_field_name(field) record = request.env.ref('web.image_placeholder').sudo() stream = request.env['ir.binary']._get_image_stream_from( - record, 'raw', width=width, height=height, crop=crop, + record, 'raw', width=int(width), height=int(height), crop=crop, ) send_file_kwargs = {'as_attachment': download} diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py index 279337ac379..1ab6fb563fa 100644 --- a/addons/website_slides/controllers/main.py +++ b/addons/website_slides/controllers/main.py @@ -820,7 +820,7 @@ class WebsiteSlides(WebsiteProfile): raise werkzeug.exceptions.NotFound() return request.env['ir.binary']._get_image_stream_from( - slide, field, width=width, height=int(height), crop=int(crop) + slide, field, width=int(width), height=int(height), crop=int(crop) ).get_response() # SLIDE.SLIDE UTILS