تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2208 أدوات العرض

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
يناير 23
3950
2
أبريل 23
2957
0
يناير 20
3292
Sales quotation تم الحل
2
مارس 24
2679
2
ديسمبر 23
3024