Bhumi Thakkar (Open ERP) has proposed merging lp:~openerp-dev/openerp-web/trunk-bug-1054111-bth into lp:openerp-web.
Requested reviews: OpenERP R&D Web Team (openerp-dev-web) Related bugs: Bug #1054111 in OpenERP Web: "Empty binary fields will show the latest shown filename of the latest non empty binary field" https://bugs.launchpad.net/openerp-web/+bug/1054111 For more details, see: https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-1054111-bth/+merge/142062 Hello, In page view,Empty binary fields will show the latest shown filename of the latest non empty binary field. To reproduce: 1. Knowledge -> Documents -> Documents 2. Create record and enter name and do not enter or select nay file and save it. 3. Open records in Page view and in latest added record file name is displayed. Observed: In latest added record filename is shown eventhough not added file in that record. Expected: If file is not added then name dhould not displayed. If value is not there passed blank('') in text. Thanks. -- https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-1054111-bth/+merge/142062 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openerp-web/trunk-bug-1054111-bth.
=== modified file 'addons/web/static/src/js/view_form.js' --- addons/web/static/src/js/view_form.js 2012-12-21 14:02:36 +0000 +++ addons/web/static/src/js/view_form.js 2013-01-07 06:49:21 +0000 @@ -4947,12 +4947,13 @@ this.$el.find('input').eq(0).val(show_value); } else { this.$el.find('a').show(!!this.get('value')); + var show_value = ''; if (this.get('value')) { - var show_value = _t("Download") + show_value = _t("Download") if (this.view) show_value += " " + (this.view.datarecord[this.node.attrs.filename] || ''); - this.$el.find('a').text(show_value); } + this.$el.find('a').text(show_value); } }, on_file_uploaded_and_valid: function(size, name, content_type, file_base64) {
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp