#css #xml #odoo #qweb
#css #xml #odoo #qweb
Вопрос:
<"span t-if="o.image is not NoneType" t-field="o.image" t-options-widget="amp;quot;imageamp;quot;">
Я пытался использовать style="max-height:115px"
, но это не работает
Я смог изменить размер, используя максимальную высоту <"img src="blah.blah">
, но не с этим двоичным файлом.
я добавил случайные кавычки, чтобы позволить коду отображаться здесь
Ответ №1:
Определите style
или class
внутри t-options
, вы можете найти примеры в модуле оплаты:
<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' }" />