diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-09-04 17:46:51 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-09-04 17:46:51 +0200 |
| commit | 3d80dc2bbfcda08e787159d2711ac0dc56f81ad6 (patch) | |
| tree | 2878a3ea6daf5798290323c98763ae680c93177b /addons/document/static/src/js | |
| parent | a587e1bc17de78def9319c7bfbbd8ac871b51722 (diff) | |
| parent | 59b76ee92701a28032822f6f3a45b7939255bb02 (diff) | |
[MERGE] forward port of branch 7.0 up to 59b76ee
Diffstat (limited to 'addons/document/static/src/js')
| -rw-r--r-- | addons/document/static/src/js/document.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/document/static/src/js/document.js b/addons/document/static/src/js/document.js index e4bce2da76e..5b353d5b0dd 100644 --- a/addons/document/static/src/js/document.js +++ b/addons/document/static/src/js/document.js @@ -3,8 +3,10 @@ openerp.document = function (instance) { instance.web.Sidebar.include({ init : function(){ this._super.apply(this, arguments); - this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), }); - this.items['files'] = []; + if (this.getParent().view_type == "form"){ + this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), }); + this.items['files'] = []; + } }, on_attachments_loaded: function(attachments) { //to display number in name if more then one attachment which has same name. |
