summaryrefslogtreecommitdiff
path: root/addons/document/static/src/js/document.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2014-09-04 17:51:42 +0200
committerChristophe Simonis <chs@odoo.com>2014-09-04 17:51:42 +0200
commit9363bc9182b3eb70980b3a80e3ea2d4809f44840 (patch)
treee30c6c89fb35ca558e904abb33070ba3a807ec40 /addons/document/static/src/js/document.js
parent05683f05b535cab94f9e01dae1f4701428c38020 (diff)
parent3d80dc2bbfcda08e787159d2711ac0dc56f81ad6 (diff)
[MERGE] forward port of branch saas-3 up to 3d80dc2
Diffstat (limited to 'addons/document/static/src/js/document.js')
-rw-r--r--addons/document/static/src/js/document.js6
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.