odoo image字段显示
website.image_url(blog_post, 'pic_id')
image_1920字段与其字,这样设计直是妙呀
class ImageMixin(models.AbstractModel):
_name = 'image.mixin'
_description = "Image Mixin"
# all image fields are base64 encoded and PIL-supported
image_1920 = fields.Image("Image", max_width=1920, max_height=1920)
# resized fields stored (as attachment) for performance
image_1024 = fields.Image("Image 1024", related="image_1920", max_width=1024, max_height=1024, store=True)
image_512 = fields.Image("Image 512", related="image_1920", max_width=512, max_height=512, store=True)
image_256 = fields.Image("Image 256", related="image_1920", max_width=256, max_height=256, store=True)
image_128 = fields.Image("Image 128"