Browse Source

[ADD] web_listview_show_advanced_search

pull/244/head
Jacques-Etienne Baudoux 9 years ago
parent
commit
0c8b5fc30b
  1. 50
      web_listview_show_advanced_search/README.rst
  2. 0
      web_listview_show_advanced_search/__init__.py
  3. 35
      web_listview_show_advanced_search/__openerp__.py
  4. BIN
      web_listview_show_advanced_search/static/description/icon.png
  5. 36
      web_listview_show_advanced_search/static/src/js/web_listview_show_advanced_search.js
  6. 10
      web_listview_show_advanced_search/views/webclient_templates.xml

50
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 <https://github.com/OCA/web/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 <https://github.com/OCA/web/issues/new?body=module:%20web_listview_show_advanced_search%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Jacques-Etienne Baudoux <je@bcim.be> (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.

0
web_listview_show_advanced_search/__init__.py

35
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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'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,
}

BIN
web_listview_show_advanced_search/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

36
web_listview_show_advanced_search/static/src/js/web_listview_show_advanced_search.js

@ -0,0 +1,36 @@
//#############################################################################
//
// Copyright (C) 2015 BCIM sprl (<http://www.bcim.be>)
//
// 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 <http://www.gnu.org/licenses/>.
//
//#############################################################################
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;
}
});
}

10
web_listview_show_advanced_search/views/webclient_templates.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<template id="assets_backend" name="web_listview_show_advanced_search" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_listview_show_advanced_search/static/src/js/web_listview_show_advanced_search.js"></script>
</xpath>
</template>
</data>
</openerp>
Loading…
Cancel
Save