From 5d416152174d740aaa4b4e86a98f4dbd421ac541 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 8 Aug 2012 11:15:32 +0200 Subject: [FIX] fixed problems with images in kanban o2m bzr revid: nicolas.vanhoren@openerp.com-20120808091532-zjnvgpx33nkwj1z8 --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index c3f941305d5..8276a1b219c 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -4606,7 +4606,7 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({ }, render_value: function() { var url; - if (this.get('value') && this.get('value').substr(0, 10).indexOf(' ') == -1) { + if (this.get('value') && ! /^\d+(\.\d*)? \w+$/.test(this.get('value'))) { url = 'data:image/png;base64,' + this.get('value'); } else if (this.get('value')) { url = '/web/binary/image?session_id=' + this.session.session_id + '&model=' + -- cgit v1.2.3