summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-03-23 16:04:48 +0100
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-03-23 16:04:48 +0100
commit2a9cde48c863880a06770ae0cce74e8995dec4e8 (patch)
tree3ca0c21026efb2a1ff64afe4fab8eca293d28581 /addons/web/static/src/xml
parentd4ec427f0168d57777b61fec4c941ea874ffcc02 (diff)
[imp] default value for "value" in the fields
bzr revid: nicolas.vanhoren@openerp.com-20120323150448-om2trotjpbee5j9o
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/base.xml20
1 files changed, 12 insertions, 8 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index a6704ad659b..809ed991cd9 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1116,14 +1116,8 @@
<t t-name="FieldBinaryImage">
<table t-attf-class="oe_form_field_#{widget.type}" cellpadding="0" cellspacing="0" border="0">
<tr>
- <td align="center">
- <img t-att-src='_s + "/web/static/src/img/placeholder.png"' class="oe-binary-image"
- t-att-border="widget.readonly ? 0 : 1"
- t-att-name="widget.name"
- t-attf-class="field_#{widget.type}"
- t-att-width="widget.node.attrs.img_width || widget.node.attrs.width"
- t-att-height="widget.node.attrs.img_height || widget.node.attrs.height"
- />
+ <td class="oe_form_field-binary-image-placeholder" align="center">
+
</td>
</tr>
<tr>
@@ -1161,6 +1155,16 @@
</tr>
</table>
</t>
+<t t-name="FieldBinaryImage-img">
+ <img t-att-src='url' class="oe-binary-image"
+ t-att-border="widget.readonly ? 0 : 1"
+ t-att-name="widget.name"
+ t-attf-class="field_#{widget.type}"
+ t-att-width="widget.node.attrs.img_width || widget.node.attrs.width"
+ t-att-height="widget.node.attrs.img_height || widget.node.attrs.height"
+ t-att-style="'max-width: ' + (widget.$element.width() > 60 ? widget.$element.width() : 60) + 'px'"
+ />
+</t>
<t t-name="FieldBinaryFile">
<t t-if="!widget.get('effective_readonly')">
<table t-attf-class="oe_form_field_#{widget.type}" cellpadding="0" cellspacing="0" border="0">