From bda451ab31c19c52eb72c16eae2471d39860a8d3 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 16 Mar 2016 09:53:31 +0100 Subject: [FIX] *: adapt addons to views refactoring of previous commit --- addons/document/static/src/js/document.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/document/static') diff --git a/addons/document/static/src/js/document.js b/addons/document/static/src/js/document.js index 9448a93adb9..05885839469 100644 --- a/addons/document/static/src/js/document.js +++ b/addons/document/static/src/js/document.js @@ -9,7 +9,8 @@ var _t = core._t; Sidebar.include({ init : function(){ this._super.apply(this, arguments); - if (this.getParent().view_type == "form"){ + var view = this.getParent(); + if (view.fields_view && view.fields_view.type === "form") { this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), }); this.items.files = []; } -- cgit v1.2.3