如何在odoo中仅使用xml代码调整二进制(64)图像的大小?(最大高度)



<"span t-if="o.image is not NoneType" t-field="o.image" t-options-widget="&quot;image&quot;">

我试过使用style="max-height:115px",但不起作用

我可以在<"img src="blah.blah">上使用最大高度来调整大小,但不能使用此二进制文件。

我添加了随机引号以允许代码显示在这里

t-options中定义styleclass,您可以在支付模块中找到示例:

<span t-field="tx.acquirer_id.image_128" t-att-title="tx.acquirer_id.name"  
role="img" t-att-aria-label="tx.acquirer_id.name" 
t-options='{"widget": "image", "style":"max-width: 60px; display: inline-block"}'/>

和网站销售模块:

<div t-if="product_variant" t-field="product_variant.image_128" 
t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded shadow o_alternative_product o_image_64_max' }" />

最新更新