تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3550 أدوات العرض

Hi,


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
image=Image.open(filepath)
image.size
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أكتوبر 22
5648
4
أكتوبر 21
21089
1
أكتوبر 21
4472
2
مايو 19
6299
2
مايو 19
8968