Merge PR #529 into 13.0

Signed-off-by sbidoul
pull/528/head
OCA-git-bot 2021-07-27 13:52:45 +00:00
commit 9f2d78d5b7
23 changed files with 179 additions and 81 deletions

View File

@ -0,0 +1,24 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.1.5
_src_path: git+https://github.com/OCA/oca-addons-repo-template
dependency_installation_mode: PIP
generate_requirements_txt: true
include_wkhtmltopdf: true
odoo_version: 13.0
rebel_module_groups: []
repo_description: 'This repository hosts alternative reporting engines to the ones
included on Odoo core (RML, QWeb and Webkit).
The convention is to use a suffix to each module to indicate that it''s for using
with that report engine (for example, account_invoice_report_birt or sale_order_report_pentaho).
It can contain also another utilities directly involved with reports (like merge/split
utils, checkers, signing tools and so on).'
repo_name: OCA alternative reporting engines and reporting utilities for Odoo
repo_slug: reporting-engine
travis_apt_packages:
- swig
- libreoffice
travis_apt_sources: []

View File

@ -1,5 +1,6 @@
env:
browser: true
es6: true
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
parserOptions:
@ -14,7 +15,7 @@ globals:
moment: readonly
odoo: readonly
openerp: readonly
Promise: readonly
owl: readonly
# Styling is handled by Prettier, so we only need to enable AST rules;
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890

View File

@ -1,5 +1,5 @@
[flake8]
max-line-length = 80
max-line-length = 88
max-complexity = 16
# B = bugbear
# B9 = bugbear opinionated (incl line length)
@ -8,3 +8,5 @@ select = C,E,F,W,B,B9
# E501: flake8 line length (covered by bugbear B950)
# W503: line break before binary operator (black behaviour)
ignore = E203,E501,W503
per-file-ignores=
__init__.py:F401

View File

@ -0,0 +1,13 @@
name: pre-commit
on:
pull_request:
push:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0

19
.gitignore vendored
View File

@ -1,6 +1,8 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
/.venv
/.pytest_cache
# C extensions
*.so
@ -21,6 +23,7 @@ var/
*.egg-info/
.installed.cfg
*.egg
*.eggs
# Installer logs
pip-log.txt
@ -40,6 +43,19 @@ coverage.xml
# Pycharm
.idea
# Eclipse
.settings
# Visual Studio cache/options directory
.vs/
.vscode
# OSX Files
.DS_Store
# Django stuff:
*.log
# Mr Developer
.mr.developer.cfg
.project
@ -54,3 +70,6 @@ docs/_build/
# Backup files
*~
*.swp
# OCA rules
!static/lib/

View File

@ -10,4 +10,4 @@ known_odoo=odoo
known_odoo_addons=odoo.addons
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
default_section=THIRDPARTY
known_third_party=setuptools
ensure_newline_before_comments = True

View File

@ -1,7 +1,11 @@
exclude: |
(?x)
# NOT INSTALLABLE ADDONS
# END NOT INSTALLABLE ADDONS
# Files and folders generated by bots, to avoid loops
^setup/|/static/description/index\.html$|
# We don't want to mess with tool-generated files
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|
# Maybe reactivate this when all README files include prettier ignore tags?
^README\.md$|
# Library files can have extraneous formatting (even minimized)
@ -14,25 +18,47 @@ default_language_version:
python: python3
node: "14.13.0"
repos:
- repo: local
hooks:
# These files are most likely copier diff rejection junks; if found,
# review them manually, fix the problem (if needed) and remove them
- id: forbidden-files
name: forbidden files
entry: found forbidden files; remove them
language: fail
files: "\\.rej$"
- repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
args: ["https://github.com/OCA/reporting-engine"]
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
- repo: https://github.com/prettier/pre-commit
rev: "v1.19.1"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v1.19.1
hooks:
- id: prettier
# TODO Avoid awebdeveloper/pre-commit-prettier if possible
# HACK https://github.com/prettier/prettier/issues/7407
- repo: https://github.com/awebdeveloper/pre-commit-prettier
rev: v0.0.1
hooks:
- id: prettier
name: prettier xml plugin
name: prettier (with plugin-xml)
entry: prettier --write --list-different
additional_dependencies:
- "prettier@1.19.1"
- "@prettier/plugin-xml@0.7.2"
files: \.xml$
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v6.8.0
hooks:
@ -63,34 +89,11 @@ repos:
- id: check-xml
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
name: flake8 except __init__.py
exclude: /__init__\.py$
additional_dependencies: ["flake8-bugbear==19.8.0"]
- id: flake8
name: flake8 only __init__.py
args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py
files: /__init__\.py$
additional_dependencies: ["flake8-bugbear==19.8.0"]
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.5.3
hooks:
- id: pylint
name: pylint with optional checks
args: ["--rcfile=.pylintrc", "--exit-zero"]
verbose: true
additional_dependencies: ["pylint-odoo==3.5.0"]
- id: pylint
name: pylint with mandatory checks
args: ["--rcfile=.pylintrc-mandatory"]
additional_dependencies: ["pylint-odoo==3.5.0"]
- repo: https://github.com/asottile/pyupgrade
rev: v1.26.2
hooks:
- id: pyupgrade
args: ["--keep-percent-format"]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
@ -101,3 +104,25 @@ repos:
rev: 2.5.2
hooks:
- id: setuptools-odoo-make-default
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==19.8.0"]
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.5.3
hooks:
- id: pylint
name: pylint with optional checks
args:
- --rcfile=.pylintrc
- --exit-zero
verbose: true
additional_dependencies: &pylint_deps
- pylint-odoo==3.5.0
- id: pylint
name: pylint with mandatory checks
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps

View File

@ -5,4 +5,4 @@ printWidth: 88
proseWrap: always
semi: true
trailingComma: "es5"
xmlWhitespaceSensitivity: "ignore"
xmlWhitespaceSensitivity: "strict"

View File

@ -46,8 +46,6 @@ enable=anomalous-backslash-in-string,
method-inverse,
method-required-super,
method-search,
missing-import-error,
missing-manifest-dependency,
openerp-exception-warning,
pointless-statement,
pointless-string-statement,
@ -73,6 +71,7 @@ enable=anomalous-backslash-in-string,
deprecated-module,
file-not-used,
invalid-commit,
missing-manifest-dependency,
missing-newline-extrafiles,
missing-readme,
no-utf8-coding-comment,
@ -82,6 +81,7 @@ enable=anomalous-backslash-in-string,
too-complex,
unnecessary-utf8-coding-comment
[REPORTS]
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
output-format=colorized

View File

@ -39,8 +39,6 @@ enable=anomalous-backslash-in-string,
method-inverse,
method-required-super,
method-search,
missing-import-error,
missing-manifest-dependency,
openerp-exception-warning,
pointless-statement,
pointless-string-statement,

View File

@ -12,36 +12,30 @@ addons:
apt:
packages:
- expect-dev # provides unbuffer utility
- libreoffice
- "swig"
- "libreoffice"
stages:
- linting
- test
jobs:
include:
- stage: linting
name: "pre-commit"
before_install:
install: pip install pre-commit
script: pre-commit run --all --show-diff-on-failure --verbose --color always
after_success:
- stage: test
env:
- TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1"
- TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1"
- stage: test
env:
- TESTS="1" ODOO_REPO="OCA/OCB"
- TESTS=1 ODOO_REPO="OCA/OCB"
env:
global:
- VERSION="13.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
- WKHTMLTOPDF_VERSION="0.12.5"
- MQT_DEP=PIP
install:
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git
${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- export WKHTMLTOPDF_VERSION=0.12.4
- travis_install_nightly
script:

10
CONTRIBUTING.md 100644
View File

@ -0,0 +1,10 @@
# OCA Guidelines
Please follow the official guide from the
[OCA Guidelines page](https://odoo-community.org/page/contributing).
## Project Specific Guidelines
<!-- /!\ do not modify above this line -->
This project does not have specific coding guidelines.

View File

@ -1,4 +1,4 @@
GNU AFFERO GENERAL PUBLIC LICENSE
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
@ -633,8 +633,8 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author>
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
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,

View File

@ -1,27 +1,40 @@
[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat/143/13.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-reporting-engine-143)
[![Build Status](https://travis-ci.org/OCA/reporting-engine.svg?branch=13.0)](https://travis-ci.org/OCA/reporting-engine)
[![Coverage Status](https://img.shields.io/coveralls/OCA/reporting-engine.svg)](https://coveralls.io/r/OCA/reporting-engine?branch=13.0)
[![Build Status](https://travis-ci.com/OCA/reporting-engine.svg?branch=13.0)](https://travis-ci.com/OCA/reporting-engine)
[![codecov](https://codecov.io/gh/OCA/reporting-engine/branch/13.0/graph/badge.svg)](https://codecov.io/gh/OCA/reporting-engine)
[![Translation Status](https://translation.odoo-community.org/widgets/reporting-engine-13-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/reporting-engine-13-0/?utm_source=widget)
OCA alternative reporting engines and reporting utilities for Odoo
==================================================================
<!-- /!\ do not modify above this line -->
This repository hosts alternative reporting engines to the ones included on Odoo core (RML, QWeb and Webkit). It is complemented with the ones that host the reports theirself:
# OCA alternative reporting engines and reporting utilities for Odoo
https://github.com/OCA/account-financial-reporting
https://github.com/OCA/purchase-reporting
https://github.com/OCA/sale-reporting
...
This repository hosts alternative reporting engines to the ones included on Odoo core (RML, QWeb and Webkit).
The convention is to use a suffix to each module to indicate that it's for using with that report engine (for example, account_invoice_report_birt or sale_order_report_pentaho).
It can contain also another utilities directly involved with reports (like merge/split utils, checkers, signing tools and so on).
<!-- /!\ do not modify below this line -->
<!-- prettier-ignore-start -->
[//]: # (addons)
This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.
[//]: # (end addons)
<!-- prettier-ignore-end -->
## Licenses
This repository is licensed under [AGPL-3.0](LICENSE).
However, each module can have a totally different license, as long as they adhere to OCA
policy. Consult each module's `__manifest__.py` file, which contains a `license` key
that explains its license.
----
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.
https://odoo-community.org/
OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit
organization whose mission is to support the collaborative development of Odoo features
and promote its widespread use.

View File

@ -5,7 +5,7 @@
"name": "Key Performance Indicator",
"version": "13.0.1.0.0",
"author": "Savoir-faire Linux,Odoo Community Association (OCA)",
"website": "http://www.savoirfairelinux.com",
"website": "https://github.com/OCA/reporting-engine",
"license": "AGPL-3",
"category": "Report",
"depends": ["base_external_dbsource"],

View File

@ -4,11 +4,10 @@
"name": "Base report csv",
"summary": "Base module to create csv report",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"website": "https://github.com/oca/reporting-engine",
"website": "https://github.com/OCA/reporting-engine",
"category": "Reporting",
"version": "13.0.1.0.1",
"license": "AGPL-3",
"external_dependencies": {"python": ["csv"]},
"depends": ["base", "web"],
"data": ["views/webclient_templates.xml"],
"demo": ["demo/report.xml"],

View File

@ -6,7 +6,7 @@
"summary": "Add possibility to easily modify the global report layout",
"version": "13.0.1.0.0",
"category": "Reporting",
"website": "http://github.com/OCA/reporting-engine",
"website": "https://github.com/OCA/reporting-engine",
"author": "Camptocamp, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["web", "base"],

View File

@ -8,7 +8,7 @@
"category": "Reporting",
"license": "AGPL-3",
"author": "XCG Consulting," "ACSONE SA/NV," "Odoo Community Association (OCA)",
"website": "http://odoo.consulting/",
"website": "https://github.com/OCA/reporting-engine",
"depends": ["web"],
"external_dependencies": {"python": ["py3o.template", "py3o.formats", "PyPDF2"]},
"data": [

View File

@ -6,7 +6,7 @@
"version": "13.0.1.0.0",
"author": "Agile Business Group, Odoo Community Association (OCA)",
"category": "Tools",
"website": "https://github.com/oca/reporting-engine",
"website": "https://github.com/OCA/reporting-engine",
"license": "AGPL-3",
"application": False,
"installable": True,

View File

@ -10,7 +10,7 @@
and check minimal length
""",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"website": "https://github.com/oca/reporting-engine",
"website": "https://github.com/OCA/reporting-engine",
"category": "Technical Settings",
"depends": ["web"],
"demo": ["demo/test_report_field_length.xml"],

View File

@ -7,7 +7,7 @@
"license": "AGPL-3",
"category": "Technical Settings",
"summary": "Add watermarks to your QWEB PDF reports",
"website": "https://github.com/oca/reporting-engine",
"website": "https://github.com/OCA/reporting-engine",
"depends": ["web"],
"data": [
"demo/report.xml",

View File

@ -8,7 +8,7 @@
"summary": "Sign Qweb PDFs usign a PKCS#12 certificate",
"version": "13.0.1.0.0",
"category": "Reporting",
"website": "https://github.com/oca/reporting-engine",
"website": "https://github.com/OCA/reporting-engine",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,

View File

@ -4,7 +4,7 @@
"name": "Base report xlsx",
"summary": "Base module to create xlsx report",
"author": "ACSONE SA/NV," "Creu Blanca," "Odoo Community Association (OCA)",
"website": "https://github.com/oca/reporting-engine",
"website": "https://github.com/OCA/reporting-engine",
"category": "Reporting",
"version": "13.0.1.0.3",
"development_status": "Production/Stable",