forked from Techsystech/web
[ADD] web_dashboard_open_action
parent
ee954bbf32
commit
f2b070828e
|
@ -0,0 +1,30 @@
|
|||
Open a dashboard's action
|
||||
=========================
|
||||
|
||||
This module adds a button to open a dashboard's action in the usual view, thus enabling filtering and any other actions you can apply on the resulting records. Basically, this is the inverso to `Add to dashboard`.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
After installation, a dashboard has a `Maximize`-button that loads the dashboard's action in a normal view.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Holger Brunn <hbrunn@therp.nl>
|
||||
|
||||
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,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# This module copyright (C) 2015 Therp BV <http://therp.nl>.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
|
@ -0,0 +1,45 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# This module copyright (C) 2015 Therp BV <http://therp.nl>.
|
||||
#
|
||||
# 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": "Open a dashboard's action",
|
||||
"version": "1.0",
|
||||
"author": "Therp BV",
|
||||
"license": "AGPL-3",
|
||||
"category": "Hidden",
|
||||
"summary": "Adds a button to open a dashboard in full mode",
|
||||
"depends": [
|
||||
'board',
|
||||
],
|
||||
"data": [
|
||||
'views/templates.xml',
|
||||
],
|
||||
"qweb": [
|
||||
'static/src/xml/web_dashboard_open_action.xml',
|
||||
],
|
||||
"test": [
|
||||
],
|
||||
"auto_install": False,
|
||||
"installable": True,
|
||||
"application": False,
|
||||
"external_dependencies": {
|
||||
'python': [],
|
||||
},
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
|
@ -0,0 +1,4 @@
|
|||
.openerp .oe_dashboard .oe_action span.oe_web_dashboard_open_action
|
||||
{
|
||||
margin-right: .2em;
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
//-*- coding: utf-8 -*-
|
||||
//############################################################################
|
||||
//
|
||||
// OpenERP, Open Source Management Solution
|
||||
// This module copyright (C) 2015 Therp BV <http://therp.nl>.
|
||||
//
|
||||
// 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_dashboard_open_action = function(instance)
|
||||
{
|
||||
instance.web.form.DashBoard.include({
|
||||
on_load_action: function(result, index, action_attrs)
|
||||
{
|
||||
var self = this, action = _.extend({flags: {}}, result);
|
||||
jQuery('#' + this.view.element_id + '_action_' + index)
|
||||
.parent()
|
||||
.find('.oe_web_dashboard_open_action')
|
||||
.click(function()
|
||||
{
|
||||
self.do_action(action);
|
||||
});
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
});
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<templates>
|
||||
<t t-extend="DashBoard.action">
|
||||
<t t-jquery="span.oe_minimize" t-operation="after">
|
||||
<span class="oe_icon oe_web_dashboard_open_action">&square;</span>
|
||||
</t>
|
||||
</t>
|
||||
</templates>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="assets_backend" name="web_dashboard_open_action assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/web_dashboard_open_action/static/src/js/web_dashboard_open_action.js"></script>
|
||||
<link rel="stylesheet" href="/web_dashboard_open_action/static/src/css/web_dashboard_open_action.css"/>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue