Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to validate the image dimension in odoo 9?

Sebin Siby
on 7/28/16, 3:50 AM 189 views


I have a binary field for Image in my module and I want to force the user to upload an image that is 800x350. If the image they upload is not exactly that size, then a warning is to be raised. How can I achieve this in Odoo 9?

I saw the Image class in Pillow and tried the following but it didn't worked it shows the error "unicode object has no attribute size"

I have to process the image as binary not as a file....

from PIL import Image

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 7/28/16, 3:50 AM
Seen: 189 times
Last updated: 9/6/16, 9:48 AM