Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
2204 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Jan. 23
3941
2
Apr. 23
2949
0
Jan. 20
3284
2
März 24
2653
2
Dez. 23
3015