From 0f364e1acd876183e5957db99e73d6869b684d08 Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Mon, 20 Aug 2012 16:10:55 +0530 Subject: [PATCH] [IMP] removed Import action if create = false bzr revid: jam@tinyerp.com-20120820104055-mgw4y5csa31poa33 --- addons/web/static/src/js/view_list.js | 6 +++++- addons/web/static/src/xml/base.xml | 12 +++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index fa6f48b37fa..bf8ee05d925 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -351,8 +351,12 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi if (!this.sidebar && this.options.$sidebar) { this.sidebar = new instance.web.Sidebar(this); this.sidebar.appendTo(this.options.$sidebar); + if (self._is_action_enabled('create')){ + this.sidebar.add_items('other', [ + { label: _t("Import"), callback: this.on_sidebar_import } + ]); + } this.sidebar.add_items('other', [ - { label: _t("Import"), callback: this.on_sidebar_import }, { label: _t("Export"), callback: this.on_sidebar_export } ]); if (self._is_action_enabled('delete')){ diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 2d86b40f44f..61a1a834d0d 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -671,14 +671,12 @@
- - - - + + - or Import + or Import