[FIX] Fixed page view showing wrong binary field value when field value not set.
authorchirag patel <cpa@tinyerp.com>
Mon, 18 Feb 2013 13:21:05 +0000 (18:51 +0530)
committerchirag patel <cpa@tinyerp.com>
Mon, 18 Feb 2013 13:21:05 +0000 (18:51 +0530)
bzr revid: cpa@tinyerp.com-20130218132105-6f8ie0sau1akg0m0

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);