How to print images in Custom QWeb reports in Odoo?

后端 未结 4 1943
孤街浪徒
孤街浪徒 2021-01-15 13:15

I would like to display images which are uploaded by users in my custom Qweb reports.

Which is the best way to do that?

4条回答
  •  醉话见心
    2021-01-15 13:36

    For someone who lands here from Google... For dynamic images from the database, one can use

    
    

    ...where o.image_field_name is a dynamic field from the database/model. I prefer the tag over a for images.

    To show a static image, use plain HTML.

    Alternate Text
    

    Note: alternate text attribute in an image does not add value in PDF reports. They don't show up when the image is missing, as in HTML.

提交回复
热议问题