Browse Source

Merge pull request #5 from hbrunn/6.1_flake8

[FIX] flake8
pull/11/head
Yannick Vaucher 11 years ago
parent
commit
2a47a37e02
  1. 16
      .coveragerc
  2. 56
      .gitignore
  3. 19
      .travis.yml
  4. 8
      README
  5. 12
      README.md
  6. 7
      hide_duplicate_button/__openerp__.py
  7. 1
      web_ckeditor4/__init__.py
  8. 108
      web_ckeditor4/__openerp__.py
  9. 22
      web_export_view/__openerp__.py
  10. 6
      web_export_view/controllers.py
  11. 1
      web_import_models_with_inherits/model/basemodel.py
  12. 1
      web_print_from_browser/__init__.py
  13. 16
      web_widget_classes/__openerp__.py

16
.coveragerc

@ -0,0 +1,16 @@
# Config file .coveragerc
[report]
include =
*/OCA/web/*
omit =
*/tests/*
*__init__.py
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about null context checking
if context is None:

56
.gitignore

@ -0,0 +1,56 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
.Python
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml
# Translations
*.mo
# Pycharm
.idea
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# Rope
.ropeproject
# Sphinx documentation
docs/_build/
# Backup files
*~
*.swp

19
.travis.yml

@ -0,0 +1,19 @@
language: python
python:
- "2.7"
virtualenv:
system_site_packages: true
install:
- git clone https://github.com/gurneyalex/maintainer-quality-tools.git $HOME/maintainer-quality-tools
- export PATH=$HOME/maintainer-quality-tools/travis:$PATH
- travis_install_nightly 6.1
- pip install coveralls flake8
script:
- travis_run_flake8
- travis_run_tests 6.1
after_success:
coveralls

8
README

@ -1,8 +0,0 @@
This project aim to deal with modules related to the webclient of OpenERP. You'll find modules that:
- Add facilities to the UI
- Ease the import/export features
- Add tabs
- ...

12
README.md

@ -0,0 +1,12 @@
[![Build Status](https://travis-ci.org/OCA/web.svg?branch=6.1)](https://travis-ci.org/OCA/web)
[![Coverage Status](https://coveralls.io/repos/OCA/web/badge.png?branch=6.1)](https://coveralls.io/r/OCA/web?branch=6.1)
Web addons for Odoo
===================
This project aims to deal with modules related to the webclient of Odoo. You'll find modules that:
- Add facilities to the UI
- Add widgets
- Ease the import/export features
- Generally add clientside functionality

7
hide_duplicate_button/__openerp__.py

@ -23,7 +23,9 @@
'name': 'Hide duplicate button', 'name': 'Hide duplicate button',
'version': '0.1', 'version': '0.1',
'category': 'Web', 'category': 'Web',
'description': """As 'duplicate' button often produce inconveniences when modules don't correctly handle the 'copy' methods, this module allow to hide 'duplicate' button for every form view""",
'description': """As 'duplicate' button often produce inconveniences when
modules don't correctly handle the 'copy' methods, this module allow to hide
'duplicate' button for every form view""",
'author': 'Agile Business Group', 'author': 'Agile Business Group',
'website': 'http://www.agilebg.com', 'website': 'http://www.agilebg.com',
'license': 'AGPL-3', 'license': 'AGPL-3',
@ -35,8 +37,7 @@
'demo_xml': [], 'demo_xml': [],
'active': False, 'active': False,
'installable': True, 'installable': True,
'css' : [
'css': [
"static/css/duplicate_button.css", "static/css/duplicate_button.css",
], ],
} }

1
web_ckeditor4/__init__.py

@ -19,4 +19,3 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################

108
web_ckeditor4/__openerp__.py

@ -51,60 +51,60 @@
#cd trunk #cd trunk
#git checkout remotes/origin/release/4.1.x #git checkout remotes/origin/release/4.1.x
#and uncomment the lines below #and uncomment the lines below
# 'static/lib/trunk/ckeditor.js',
# 'static/lib/trunk/core/event.js',
# 'static/lib/trunk/core/editor_basic.js',
# 'static/lib/trunk/core/env.js',
# 'static/lib/trunk/core/ckeditor_basic.js',
# 'static/lib/trunk/core/dom.js',
# 'static/lib/trunk/core/tools.js',
# 'static/lib/trunk/core/dtd.js',
# 'static/lib/trunk/core/dom/event.js',
# 'static/lib/trunk/core/dom/domobject.js',
# 'static/lib/trunk/core/dom/node.js',
# 'static/lib/trunk/core/dom/window.js',
# 'static/lib/trunk/core/dom/document.js',
# 'static/lib/trunk/core/dom/nodelist.js',
# 'static/lib/trunk/core/dom/element.js',
# 'static/lib/trunk/core/dom/documentfragment.js',
# 'static/lib/trunk/core/dom/walker.js',
# 'static/lib/trunk/core/dom/range.js',
# 'static/lib/trunk/core/dom/iterator.js',
# 'static/lib/trunk/core/command.js',
# 'static/lib/trunk/core/ckeditor_base.js',
# 'static/lib/trunk/core/config.js',
# 'static/lib/trunk/core/filter.js',
# 'static/lib/trunk/core/focusmanager.js',
# 'static/lib/trunk/core/keystrokehandler.js',
# 'static/lib/trunk/core/lang.js',
# 'static/lib/trunk/core/scriptloader.js',
# 'static/lib/trunk/core/resourcemanager.js',
# 'static/lib/trunk/core/plugins.js',
# 'static/lib/trunk/core/ui.js',
# 'static/lib/trunk/core/editor.js',
# 'static/lib/trunk/core/htmlparser.js',
# 'static/lib/trunk/core/htmlparser/basicwriter.js',
# 'static/lib/trunk/core/htmlparser/node.js',
# 'static/lib/trunk/core/htmlparser/comment.js',
# 'static/lib/trunk/core/htmlparser/text.js',
# 'static/lib/trunk/core/htmlparser/cdata.js',
# 'static/lib/trunk/core/htmlparser/fragment.js',
# 'static/lib/trunk/core/htmlparser/filter.js',
# 'static/lib/trunk/core/htmldataprocessor.js',
# 'static/lib/trunk/core/htmlparser/element.js',
# 'static/lib/trunk/core/template.js',
# 'static/lib/trunk/core/ckeditor.js',
# 'static/lib/trunk/core/creators/inline.js',
# 'static/lib/trunk/core/creators/themedui.js',
# 'static/lib/trunk/core/editable.js',
# 'static/lib/trunk/core/selection.js',
# 'static/lib/trunk/core/style.js',
# 'static/lib/trunk/core/dom/comment.js',
# 'static/lib/trunk/core/dom/elementpath.js',
# 'static/lib/trunk/core/dom/text.js',
# 'static/lib/trunk/core/dom/rangelist.js',
# 'static/lib/trunk/core/skin.js',
# 'static/lib/trunk/core/_bootstrap.js',
#'static/lib/trunk/ckeditor.js',
#'static/lib/trunk/core/event.js',
#'static/lib/trunk/core/editor_basic.js',
#'static/lib/trunk/core/env.js',
#'static/lib/trunk/core/ckeditor_basic.js',
#'static/lib/trunk/core/dom.js',
#'static/lib/trunk/core/tools.js',
#'static/lib/trunk/core/dtd.js',
#'static/lib/trunk/core/dom/event.js',
#'static/lib/trunk/core/dom/domobject.js',
#'static/lib/trunk/core/dom/node.js',
#'static/lib/trunk/core/dom/window.js',
#'static/lib/trunk/core/dom/document.js',
#'static/lib/trunk/core/dom/nodelist.js',
#'static/lib/trunk/core/dom/element.js',
#'static/lib/trunk/core/dom/documentfragment.js',
#'static/lib/trunk/core/dom/walker.js',
#'static/lib/trunk/core/dom/range.js',
#'static/lib/trunk/core/dom/iterator.js',
#'static/lib/trunk/core/command.js',
#'static/lib/trunk/core/ckeditor_base.js',
#'static/lib/trunk/core/config.js',
#'static/lib/trunk/core/filter.js',
#'static/lib/trunk/core/focusmanager.js',
#'static/lib/trunk/core/keystrokehandler.js',
#'static/lib/trunk/core/lang.js',
#'static/lib/trunk/core/scriptloader.js',
#'static/lib/trunk/core/resourcemanager.js',
#'static/lib/trunk/core/plugins.js',
#'static/lib/trunk/core/ui.js',
#'static/lib/trunk/core/editor.js',
#'static/lib/trunk/core/htmlparser.js',
#'static/lib/trunk/core/htmlparser/basicwriter.js',
#'static/lib/trunk/core/htmlparser/node.js',
#'static/lib/trunk/core/htmlparser/comment.js',
#'static/lib/trunk/core/htmlparser/text.js',
#'static/lib/trunk/core/htmlparser/cdata.js',
#'static/lib/trunk/core/htmlparser/fragment.js',
#'static/lib/trunk/core/htmlparser/filter.js',
#'static/lib/trunk/core/htmldataprocessor.js',
#'static/lib/trunk/core/htmlparser/element.js',
#'static/lib/trunk/core/template.js',
#'static/lib/trunk/core/ckeditor.js',
#'static/lib/trunk/core/creators/inline.js',
#'static/lib/trunk/core/creators/themedui.js',
#'static/lib/trunk/core/editable.js',
#'static/lib/trunk/core/selection.js',
#'static/lib/trunk/core/style.js',
#'static/lib/trunk/core/dom/comment.js',
#'static/lib/trunk/core/dom/elementpath.js',
#'static/lib/trunk/core/dom/text.js',
#'static/lib/trunk/core/dom/rangelist.js',
#'static/lib/trunk/core/skin.js',
#'static/lib/trunk/core/_bootstrap.js',
#end of ckeditor debug #end of ckeditor debug
'static/src/js/web_ckeditor4.js', 'static/src/js/web_ckeditor4.js',
], ],

22
web_export_view/__openerp__.py

@ -28,20 +28,29 @@
WEB EXPORT VIEW WEB EXPORT VIEW
=============== ===============
One of the best OpenERPs features is exporting custom data to CSV/XLS. You can do it by clicking on the export link in the sidebar. The export action allows use to configure what to be exported by selecting fields, etc, and allows you to save your export as a template so that you can export it once again without having to configure it again.
One of the best OpenERPs features is exporting custom data to CSV/XLS. You can
do it by clicking on the export link in the sidebar. The export action allows
use to configure what to be exported by selecting fields, etc, and allows you
to save your export as a template so that you can export it once again without
having to configure it again.
That feature is as great and advanced as limited for an everyday-customer-experience. A lot of customers want simply to export the tree view they are looking to.
That feature is as great and advanced as limited for an
everyday-customer-experience. A lot of customers want simply to export the tree
view they are looking to.
If you miss this feature as us, probably youll find an answer into our web_export_view module.
If you miss this feature as us, probably youll find an answer into our
web_export_view module.
After you installed it, youll find an additional link Export current view right below the Export one. By clicking on it youll get a XLS file contains the same data of the tree view you are looking at, headers included.
After you installed it, youll find an additional link Export current view
right below the Export one. By clicking on it youll get a XLS file contains
the same data of the tree view you are looking at, headers included.
""", """,
'author': 'Agile Business Group', 'author': 'Agile Business Group',
'website': 'http://www.agilebg.com', 'website': 'http://www.agilebg.com',
'license': 'AGPL-3', 'license': 'AGPL-3',
'depends': ['web'], 'depends': ['web'],
'external_dependencies' : {
'python' : ['xlwt'],
'external_dependencies': {
'python': ['xlwt'],
}, },
'data': [], 'data': [],
'active': False, 'active': False,
@ -50,4 +59,3 @@ After you installed it, you’ll find an additional link ‘Export current view
'static/js/web_advanced_export.js', 'static/js/web_advanced_export.js',
], ],
} }

6
web_export_view/controllers.py

@ -75,9 +75,9 @@ class ExcelExportView(ExcelExport):
@openerpweb.httprequest @openerpweb.httprequest
def index(self, req, data, token): def index(self, req, data, token):
data = json.loads(data) data = json.loads(data)
model = data.get('model',[])
columns_headers = data.get('headers',[])
rows = data.get('rows',[])
model = data.get('model', [])
columns_headers = data.get('headers', [])
rows = data.get('rows', [])
context = req.session.eval_context(req.context) context = req.session.eval_context(req.context)
lang = context.get('lang', 'en_US') lang = context.get('lang', 'en_US')

1
web_import_models_with_inherits/model/basemodel.py

@ -20,6 +20,7 @@
############################################################################## ##############################################################################
from openerp.osv.orm import BaseModel from openerp.osv.orm import BaseModel
def get_fields_inherits(self, cr, uid, context=None): def get_fields_inherits(self, cr, uid, context=None):
""" """
Pass the values of the _inherits dictionary Pass the values of the _inherits dictionary

1
web_print_from_browser/__init__.py

@ -19,4 +19,3 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################

16
web_widget_classes/__openerp__.py

@ -19,9 +19,9 @@
# #
############################################################################## ##############################################################################
{ {
"name" : "CSS classes for widgets",
"version" : "1.0",
"author" : "Therp BV",
"name": "CSS classes for widgets",
"version": "1.0",
"author": "Therp BV",
"complexity": "normal", "complexity": "normal",
"description": """ "description": """
For simple UI changes, having classes attached to widgets giving For simple UI changes, having classes attached to widgets giving
@ -38,11 +38,11 @@
will be enough. will be enough.
""", """,
"category" : "Dependency",
"depends" : [
"category": "Dependency",
"depends": [
'web', 'web',
], ],
"data" : [
"data": [
], ],
"js": [ "js": [
], ],
@ -53,7 +53,7 @@
], ],
"auto_install": False, "auto_install": False,
"installable": True, "installable": True,
"external_dependencies" : {
'python' : [],
"external_dependencies": {
'python': [],
}, },
} }
Loading…
Cancel
Save