ADD module web_export_usability
This commit is contained in:
5
web_export_usability/__init__.py
Normal file
5
web_export_usability/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# coding: utf-8
|
||||
# © 2017 David BEAL @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import controllers
|
||||
29
web_export_usability/__openerp__.py
Normal file
29
web_export_usability/__openerp__.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# coding: utf-8
|
||||
# © 2017 David BEAL @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
'name': 'Web Export Usability',
|
||||
'version': '8.0.0.1.0',
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'category': 'web',
|
||||
'description': """
|
||||
Override of the module web for export features:
|
||||
|
||||
- set default export format to Excel
|
||||
|
||||
|
||||
Roadmap:
|
||||
|
||||
- set default export type to 'Export all data'
|
||||
|
||||
""",
|
||||
'depends': ['web'],
|
||||
'data': [
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": ['xlwt'],
|
||||
},
|
||||
'demo': [],
|
||||
'installable': True,
|
||||
}
|
||||
5
web_export_usability/controllers/__init__.py
Normal file
5
web_export_usability/controllers/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# coding: utf-8
|
||||
# © 2017 David BEAL @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import export
|
||||
24
web_export_usability/controllers/export.py
Normal file
24
web_export_usability/controllers/export.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# coding: utf-8
|
||||
# © 2017 David BEAL @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp import http
|
||||
from openerp.addons.web.controllers.main import Export
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Export_(Export):
|
||||
|
||||
@http.route('/web/export/formats', type='json', auth="user")
|
||||
def formats(self):
|
||||
""" Returns all valid export formats
|
||||
|
||||
:returns: for each export format, a pair of identifier
|
||||
and printable name
|
||||
:rtype: [(str, str)]
|
||||
"""
|
||||
response = super(Export_, self).formats()
|
||||
# put xls, before csv
|
||||
return [response[1], response[0]]
|
||||
BIN
web_export_usability/static/description/icon.png
Normal file
BIN
web_export_usability/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Reference in New Issue
Block a user