Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

How to make image field width & height fixed?

Avatar
odoo
Avatar
Discard
1 Answer
0
Avatar
odoo
Best Answer

Hi!

You can use the following code to resize image in your code (please adapt it as you need) :

from odoo import tools
@api.model
def create(self, vals):
tools.image_resize_images(vals, sizes={'image': (250, 150)})

Best regards!

1 Comment
Avatar
Discard
Avatar
odoo
-

how can i fixed product details but image should be work as scrolling in odoo website?