Purnendu Singh (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-module_image_on_form-psi into lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-module_image_on_form-psi/+merge/108305

Hello,

Improve the code so it will check the field type of icon and if it is character 
it will set the URL path accordingly.

Thanks,
Purnendu Singh
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-module_image_on_form-psi/+merge/108305
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-module_image_on_form-psi.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js	2012-05-31 16:06:12 +0000
+++ addons/web/static/src/js/view_form.js	2012-06-01 08:39:21 +0000
@@ -4061,7 +4061,10 @@
     },
     render_value: function() {
         var url;
-        if (this.get('value') && this.get('value').substr(0, 10).indexOf(' ') == -1) {
+        if (this.get('value') && this.field.type == 'char') {
+        	url = this.get('value');
+        }
+        else if (this.get('value') && this.get('value').substr(0, 10).indexOf(' ') == -1) {
             url = 'data:image/png;base64,' + this.get('value');
         } else if (this.get('value')) {
             url = '/web/binary/image?session_id=' + this.session.session_id + '&model=' +

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to