[MERGE] OPW 586299: web: really hide readonly binary field when switching between...
authorXavier ALT <xal@openerp.com>
Thu, 28 Feb 2013 10:58:08 +0000 (11:58 +0100)
committerXavier ALT <xal@openerp.com>
Thu, 28 Feb 2013 10:58:08 +0000 (11:58 +0100)
bzr revid: xal@openerp.com-20130228105808-h1q2ayhzd19007qi

addons/web/static/src/js/view_page.js

index c266e5d..1a2e3b9 100644 (file)
@@ -263,7 +263,7 @@ openerp.web.page = function (openerp) {
         },
         set_value: function(value) {
             this._super.apply(this, arguments);
-            this.$element.find('a').show(!!value);
+            this.$element.find('a').toggle(!!value);
             if (value) {
                 var show_value = _t("Download") + " " + (this.view.datarecord[this.node.attrs.filename] || '');
                 this.$element.find('a').text(show_value);