diff --git a/.eslintrc.yml b/.eslintrc.yml index 9429bc688aab4993eae460767368f65089afa323..0b382039586ae1303994e343dfca336fe46b0bdd 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -4,7 +4,7 @@ env: # See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449 parserOptions: - ecmaVersion: 2019 + ecmaVersion: 2022 overrides: - files: @@ -22,6 +22,7 @@ globals: odoo: readonly openerp: readonly owl: readonly + luxon: 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 diff --git a/.gitignore b/.gitignore index 9c283fd41f6cc3330653f1d90a820b85e23caf65..c9f42387ef7051b2a868a9361f4f3cb6d562d4ed 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__/ *.py[cod] /.venv /.pytest_cache +/.ruff_cache # C extensions *.so @@ -23,6 +24,16 @@ var/ .installed.cfg *.egg *.eggs +.copier-answers.yml + +# Debian packages +*.deb + +# Redhat packages +*.rpm + +# MacOS packages +*.dmg # Installer logs pip-log.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c575299fc05d609e25260193f2b663be50d0fd31..f58f2c6608a042bb13f2c7559889e33bf3f46733 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,12 @@ exclude: | /static/(src/)?lib/| # Repos using Sphinx to generate docs don't need prettying ^docs/_templates/.*\.html$| + # Don't bother non-technical authors with formatting issues in docs + readme/.*\.(rst|md)$| + # Ignore build and dist directories in addons + /build/|/dist/| + # Ignore test files in addons + /tests/samples/.*| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: @@ -31,29 +37,34 @@ repos: name: en.po files cannot exist entry: found a en.po file language: fail - files: '[a-zA-Z0-9_]*/i18n/en\.po$' + files: + '[a-zA-Z0-9_]*/i18n/en\.po$' + # - repo: https://github.com/sbidoul/whool + # rev: v0.5 + # hooks: + # - id: whool-init - repo: https://github.com/oca/maintainer-tools - rev: 4cd2b852214dead80822e93e6749b16f2785b2fe + rev: d5fab7ee87fceee858a3d01048c78a548974d935 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons - id: oca-fix-manifest-website args: ["https://le-filament.com"] - - repo: https://github.com/myint/autoflake - rev: v1.6.1 - hooks: - - id: autoflake + - id: oca-gen-addon-readme 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: 22.8.0 + - --addons-dir=. + - --branch=17.0 + - --org-name=lefilament + - --repo-name=template_module + - --if-source-changed + - --keep-source-digest + - --convert-fragments-to-markdown + # - id: oca-gen-external-dependencies + - repo: https://github.com/OCA/odoo-pre-commit-hooks + rev: v0.0.25 hooks: - - id: black + - id: oca-checks-odoo-module + - id: oca-checks-po - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.7.1 hooks: @@ -95,27 +106,14 @@ repos: - id: check-xml - id: mixed-line-ending args: ["--fix=lf"] - - repo: https://github.com/asottile/pyupgrade - rev: v2.38.2 - hooks: - - id: pyupgrade - args: ["--keep-percent-format"] - - repo: https://github.com/PyCQA/isort - rev: 5.10.1 - hooks: - - id: isort - name: isort except __init__.py - args: - - --settings=. - exclude: /__init__\.py$ - - repo: https://gitlab.com/PyCQA/flake8 - rev: 3.9.2 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.3 hooks: - - id: flake8 - name: flake8 - additional_dependencies: ["flake8-bugbear==21.9.2"] + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format - repo: https://github.com/OCA/pylint-odoo - rev: 7.0.2 + rev: v9.0.4 hooks: - id: pylint_odoo name: pylint with optional checks diff --git a/.pylintrc b/.pylintrc index 71c476d4f10ac08a7333729b93705c9573d240d5..4fb9ba5362fb402b42c1a587d56b28ed71e8f933 100644 --- a/.pylintrc +++ b/.pylintrc @@ -5,12 +5,12 @@ load-plugins=pylint_odoo score=n [ODOOLINT] -readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" -manifest_required_authors=Le Filament -manifest_required_keys=license -manifest_deprecated_keys=description,active -license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 -valid_odoo_versions=16.0 +readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" +manifest-required-authors=Le Filament +manifest-required-keys=license +manifest-deprecated-keys=description,active +license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 +valid-odoo-versions=17.0 [MESSAGES CONTROL] disable=all diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index ed2c2171ffe63ac191e30ed0759c4b6211ad5f15..42885e9b5eb0cde47fa65d308683c29504934143 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -4,12 +4,12 @@ load-plugins=pylint_odoo score=n [ODOOLINT] -readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" -manifest_required_authors=Le Filament -manifest_required_keys=license -manifest_deprecated_keys=description,active -license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 -valid_odoo_versions=16.0 +readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" +manifest-required-authors=Le Filament +manifest-required-keys=license +manifest-deprecated-keys=description,active +license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 +valid-odoo-versions=17.0 [MESSAGES CONTROL] disable=all diff --git a/.ruff.toml b/.ruff.toml new file mode 100644 index 0000000000000000000000000000000000000000..0240c75f6a4ae4550f3473ad0a5faaef022bf6c7 --- /dev/null +++ b/.ruff.toml @@ -0,0 +1,30 @@ + +target-version = "py310" +fix = true + +[lint] +extend-select = [ + "B", + "C90", + "E501", # line too long (default 88) + "I", # isort + "UP", # pyupgrade +] +exclude = ["setup/*"] + +[format] +exclude = ["setup/*"] + +[per-file-ignores] +"__init__.py" = ["F401", "I001"] # ignore unused and unsorted imports in __init__.py +"__manifest__.py" = ["B018"] # useless expression + +[isort] +section-order = ["future", "standard-library", "third-party", "odoo", "odoo-addons", "first-party", "local-folder"] + +[isort.sections] +"odoo" = ["odoo"] +"odoo-addons" = ["odoo.addons"] + +[mccabe] +max-complexity = 16 diff --git a/README.rst b/README.rst index 9841b49ce522d71e94c766e40c31169cf5ef5a0f..5401f71340e423155237f386794c192cc1c0b8cc 100644 --- a/README.rst +++ b/README.rst @@ -11,8 +11,7 @@ This module depends upon *account* module. This module provides: -* Updated account invoice form view to add a confirmation popup befor validation -* Updated account invoice tree view to display untaxed amount +* Updated account invoice form view to add a confirmation popup before validation Credits diff --git a/__manifest__.py b/__manifest__.py index 5190b3c35c4080a6f1277a54241f8b494fc766d3..db4e55b612cb6e8f69de3cd6c63b099bb5e708fc 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Le Filament - Account", - "summary": "Generic Account Invoice views update by Le Filament", - "version": "16.0.1.0.0", + "summary": "Confirm account move validation", + "version": "17.0.1.0.0", "license": "AGPL-3", "author": "Le Filament", "category": "Accounting/Accounting", diff --git a/i18n/fr.po b/i18n/fr.po index 17ddd652fa6d6f5a8b4a4a862f3cfbe197291b98..e6d0e7ffa478042dc4b59db3f5138d42e0696c75 100644 --- a/i18n/fr.po +++ b/i18n/fr.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-11-10 08:27+0000\n" "PO-Revision-Date: 2022-11-10 08:27+0000\n"