İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2200 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Oca 23
3938
2
Nis 23
2944
0
Oca 20
3279
Sales quotation Çözüldü
2
Mar 24
2637
2
Ara 23
3010