diff --git a/web_listview_show_advanced_search/README.rst b/web_listview_show_advanced_search/README.rst new file mode 100644 index 00000000..1102c98d --- /dev/null +++ b/web_listview_show_advanced_search/README.rst @@ -0,0 +1,50 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License + +Web Show Advanced Search by default on list view +================================================ + +This module always shows the advanced search by default on list view. + +Installation +============ + +To install this module, you need to: + + * Go to Settings / Local Modules + * Search by module name "Web Show Advanced Search by default on list view" or by module technical name "*web_listview_show_advanced_search*" + * Click install button + +Known issues +============ + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. + + +Credits +======= + +Contributors +------------ + +* Jacques-Etienne Baudoux (BCIM sprl) + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/web_listview_show_advanced_search/__init__.py b/web_listview_show_advanced_search/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/web_listview_show_advanced_search/__openerp__.py b/web_listview_show_advanced_search/__openerp__.py new file mode 100644 index 00000000..3080f59d --- /dev/null +++ b/web_listview_show_advanced_search/__openerp__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 BCIM +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{ + 'name': 'Web Show Advanced Search by default on list view', + 'version': '1.0', + 'author': "BCIM,Odoo Community Association (OCA)", + 'license': 'AGPL-3', + 'category': 'Web', + 'depends': [ + 'web', + ], + 'data': [ + 'views/webclient_templates.xml', + ], + 'installable': True, +} diff --git a/web_listview_show_advanced_search/static/description/icon.png b/web_listview_show_advanced_search/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/web_listview_show_advanced_search/static/description/icon.png differ diff --git a/web_listview_show_advanced_search/static/src/js/web_listview_show_advanced_search.js b/web_listview_show_advanced_search/static/src/js/web_listview_show_advanced_search.js new file mode 100644 index 00000000..828129a3 --- /dev/null +++ b/web_listview_show_advanced_search/static/src/js/web_listview_show_advanced_search.js @@ -0,0 +1,36 @@ +//############################################################################# +// +// Copyright (C) 2015 BCIM sprl () +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +//############################################################################# +openerp.web_listview_show_advanced_search = function (instance) { + + instance.web.SearchView.include({ + start: function () { + var self = this; + res = this._super.apply(this, arguments); + if (this.view_manager) { + this.view_manager.on('switch_mode', this, function (e) { + if (e === 'list') { + self.drawer.$el.show(); + } + }); + } + return res; + } + }); + +} diff --git a/web_listview_show_advanced_search/views/webclient_templates.xml b/web_listview_show_advanced_search/views/webclient_templates.xml new file mode 100644 index 00000000..80e7230f --- /dev/null +++ b/web_listview_show_advanced_search/views/webclient_templates.xml @@ -0,0 +1,10 @@ + + + + + +