コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2197 ビュー

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.

アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
2
1月 23
3936
2
4月 23
2942
0
1月 20
3273
2
3月 24
2627
2
12月 23
3007