summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2018-03-15 16:20:23 +0100
committerMartin Geubelle <mge@odoo.com>2018-03-28 14:02:00 +0200
commit6676c3b18973e0dbe78f24941acf64d28c6e37d1 (patch)
tree075c88b38209ce44cd44b2e3d84dfbef92203322 /addons/web/static/src/xml
parent98ee15977a3d9d84d41a98b8d74cf3a7f7b96b78 (diff)
[IMP] web: override size attributes in image widget
Size attributes (e.g. `max-width`) are sometimes set in css (i.e. with classes, see `oe_avatar`). They must however be overriden if they are specified on the widget. Example: <field name="image" widget="image" class="oe_avatar" options="{'size': [180, 180]}"/> The `max-width: 90px` set on oe_avatar must be overriden in this case. Note that the attribute `img_width` and `img_height` have been depreciated as `width` and `height` are fulfilling the exact same purpose.
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/base.xml4
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index cc046a2bb89..be992c8f38a 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -885,9 +885,7 @@
<img class="img img-responsive"
t-att-src='url'
t-att-border="widget.readonly ? 0 : 1"
- t-att-name="widget.name"
- t-att-width="widget.nodeOptions.size ? widget.nodeOptions.size[0] : widget.attrs.img_width || widget.attrs.width"
- t-att-height="widget.nodeOptions.size ? widget.nodeOptions.size[1] : widget.attrs.img_height || widget.attrs.height"/>
+ t-att-name="widget.name"/>
</t>
<t t-name="FieldBinaryFile">
<a t-if="widget.mode === 'readonly'" href="javascript:void(0)" class="o_form_uri"/>