Skip to Content
Menú
This question has been flagged
1 Respondre
2189 Vistes

I am making a quotation report in the Odoo (v15) sales module which has a table with the products that the customer wants to buy. One of the columns is the image of the requested product, however not all the products have the image with the same size causing that sometimes the rows have different sizes as seen in the following image that shows a part of the table in the report: 


To try to solve the problem and that all images have a maximum height and width of 80px I made the following modification in the code of that column: 


But the result in the report is this:

 


I need a solution with the xml code that adjusts the images that exceed 80px in width and length to those measures without cutting the images.

Avatar
Descartar
Best Answer

Hi,

Please try by arranging the image span inside a div and provide the style for the div as,.image-div {

    width: 200px; 

    height: 200px; 

    overflow: hidden; 

}


And also provide the below style for the span.image-div span{   width: 100%;     height: auto;

    object-fit: cover;}

Try with the above styles and check whether it meets your requirement


Hope it helps

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de gen. 23
3932
2
d’abr. 23
2940
0
de gen. 20
3260
2
de març 24
2528
2
de des. 23
3003