Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3708 มุมมอง

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
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Pivot view does not display in odoo 8 แก้ไขแล้ว
1
ต.ค. 22
5779
4
ต.ค. 21
21224
1
ต.ค. 21
4649
2
พ.ค. 19
6435
How to apply char input field mask? แก้ไขแล้ว
2
พ.ค. 19
9130