diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 168470e2ed745631aefb772a4a864cf1de76d3cb..c575299fc05d609e25260193f2b663be50d0fd31 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ exclude: | (LICENSE.*|COPYING.*) default_language_version: python: python3 - node: "14.18.0" + node: "16.17.0" repos: - repo: local hooks: @@ -27,15 +27,20 @@ repos: entry: found forbidden files; remove them language: fail files: "\\.rej$" + - id: en-po-files + name: en.po files cannot exist + entry: found a en.po file + language: fail + files: '[a-zA-Z0-9_]*/i18n/en\.po$' - repo: https://github.com/oca/maintainer-tools - rev: dfba427ba03900b69e0a7f2c65890dc48921d36a + rev: 4cd2b852214dead80822e93e6749b16f2785b2fe 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.4 + rev: v1.6.1 hooks: - id: autoflake args: @@ -46,22 +51,22 @@ repos: - --remove-duplicate-keys - --remove-unused-variables - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 22.8.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.4.1 + rev: v2.7.1 hooks: - id: prettier name: prettier (with plugin-xml) additional_dependencies: - - "prettier@2.4.1" - - "@prettier/plugin-xml@1.1.0" + - "prettier@2.7.1" + - "@prettier/plugin-xml@2.2.0" args: - --plugin=@prettier/plugin-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: v7.32.0 + rev: v8.24.0 hooks: - id: eslint verbose: true @@ -69,7 +74,7 @@ repos: - --color - --fix - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.3.0 hooks: - id: trailing-whitespace # exclude autogenerated files @@ -91,12 +96,12 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/asottile/pyupgrade - rev: v2.29.0 + rev: v2.38.2 hooks: - id: pyupgrade args: ["--keep-percent-format"] - repo: https://github.com/PyCQA/isort - rev: 5.9.3 + rev: 5.10.1 hooks: - id: isort name: isort except __init__.py diff --git a/.pylintrc b/.pylintrc index d431ca78d44080ba32c20c6991c2655f2ab6423b..71c476d4f10ac08a7333729b93705c9573d240d5 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,3 +1,5 @@ + + [MASTER] load-plugins=pylint_odoo score=n @@ -8,7 +10,7 @@ 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=15.0 +valid_odoo_versions=16.0 [MESSAGES CONTROL] disable=all @@ -96,6 +98,7 @@ enable=anomalous-backslash-in-string, xml-attribute-translatable, xml-deprecated-qweb-directive, xml-deprecated-tree-attribute, + external-request-timeout, # messages that do not cause the lint step to fail consider-merging-classes-inherited, create-user-wo-reset-password, diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 189c548631665bef116fc4d0df3b986f9727df31..ed2c2171ffe63ac191e30ed0759c4b6211ad5f15 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -1,3 +1,4 @@ + [MASTER] load-plugins=pylint_odoo score=n @@ -8,7 +9,7 @@ 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=15.0 +valid_odoo_versions=16.0 [MESSAGES CONTROL] disable=all @@ -88,7 +89,8 @@ enable=anomalous-backslash-in-string, website-manifest-key-not-valid-uri, xml-attribute-translatable, xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute + xml-deprecated-tree-attribute, + external-request-timeout [REPORTS] msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} diff --git a/README.rst b/README.rst index 924c591ee795e45f2a0cac5efe4503e20da0d02b..21d2517f19f19c67a218df3b23fd2a90b093d19a 100644 --- a/README.rst +++ b/README.rst @@ -33,6 +33,10 @@ Il est important de configurer : * le ou les journaux à exporter * la société associée à cet export +Points à améliorer +================== +* Configuration multi-société (droits d'accès et chargement données initiales) + Credits ======= diff --git a/__manifest__.py b/__manifest__.py index afd4ea88f252a9685e63335bb107d0ecfd5cb503..76e418fea7abfbc5246d980c335805eddbbffb04 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -2,7 +2,7 @@ "name": "Export Journal Tool", "summary": "Export des journaux", "author": "Le Filament", - "version": "15.0.0.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "category": "Accounting/Accounting", "depends": ["account"], diff --git a/controllers/main.py b/controllers/main.py index d5b38b2475e1c6342d6a7cd6bcc4fbf85b3ec3d8..b748ace762aee74f37161fdfe21a3af6f49ecb4d 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -10,7 +10,7 @@ from odoo.http import request from odoo.tools.misc import xlwt from odoo.tools.safe_eval import safe_eval -from odoo.addons.web.controllers.main import content_disposition, serialize_exception +from odoo.addons.web.controllers.main import content_disposition class JournalDatasExport(http.Controller): @@ -18,7 +18,6 @@ class JournalDatasExport(http.Controller): # Routes # ------------------------------------------------------ @http.route("/web/export_journal/", type="http", auth="user") - @serialize_exception def export_journal( self, export_format, export, export_type, date_start, date_end, **kwargs ): @@ -40,7 +39,7 @@ class JournalDatasExport(http.Controller): ("journal_id", "in", export_id.journal_ids.ids), ("company_id", "=", export_id.company_id.id), ("move_id.state", "=", "posted"), - ("display_type", "=", False), + ("display_type", "not in", ("line_section", "line_note")), ] if export_type == "empty": domain += [("date_export", "=", False)] diff --git a/wizard/export_journal_wizard_view.xml b/wizard/export_journal_wizard_view.xml index 8136b04840305234a178e6a872e269d2d0334a62..11cf2b5d2f0a6c0c8343bec99cfb40909deb8658 100644 --- a/wizard/export_journal_wizard_view.xml +++ b/wizard/export_journal_wizard_view.xml @@ -60,7 +60,7 @@ id="menu_data_export" action="data_export_action" name="Export Journal" - parent="account.menu_finance_entries_accounting_journals" + parent="account.menu_finance_entries_accounting_miscellaneous" sequence="90" /> </odoo>