Browse Source
Merge pull request #140 from hbrunn/8.0-web_dashboard_open_action
Merge pull request #140 from hbrunn/8.0-web_dashboard_open_action
[ADD] web_dashboard_open_actionpull/178/head
Markus Schneider
10 years ago
8 changed files with 173 additions and 0 deletions
-
39web_dashboard_open_action/README.rst
-
20web_dashboard_open_action/__init__.py
-
45web_dashboard_open_action/__openerp__.py
-
BINweb_dashboard_open_action/static/description/icon.png
-
7web_dashboard_open_action/static/src/css/web_dashboard_open_action.css
-
44web_dashboard_open_action/static/src/js/web_dashboard_open_action.js
-
7web_dashboard_open_action/static/src/xml/web_dashboard_open_action.xml
-
11web_dashboard_open_action/views/templates.xml
@ -0,0 +1,39 @@ |
|||
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. |
|||
|
|||
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_dashboard_open_action%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
|||
|
|||
|
|||
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,Odoo Community Association (OCA)", |
|||
"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': [], |
|||
}, |
|||
} |
After Width: 128 | Height: 128 | Size: 9.2 KiB |
@ -0,0 +1,7 @@ |
|||
.openerp .oe_dashboard .oe_action span.oe_web_dashboard_open_action:before |
|||
{ |
|||
font-size: 10px; |
|||
margin-left: 4px; |
|||
position: relative; |
|||
top: -1px; |
|||
} |
@ -0,0 +1,44 @@ |
|||
//-*- 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); |
|||
action.context_string = action_attrs.context; |
|||
action.context = instance.web.pyeval.eval( |
|||
'context', action_attrs.context || {}); |
|||
action.domain_string = action_attrs.domain; |
|||
action.domain = instance.web.pyeval.eval( |
|||
'domain', action_attrs.domain || [], action_attrs.context); |
|||
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 fa fa-arrows-alt" /> |
|||
</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> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue