mirror of
https://github.com/brain-tec/account_ebics.git
synced 2025-03-28 14:35:58 +00:00
update ci
This commit is contained in:
parent
3ffa0fc2e2
commit
05c4ef5c43
@ -1,14 +1,12 @@
|
||||
# Do NOT update manually; changes here will be overwritten by Copier
|
||||
_commit: v1.2
|
||||
_src_path: https://picasso.noviat.com/ci/addons-repo-template.git
|
||||
ci_exclude_modules: account_asset
|
||||
ci_image: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
|
||||
customer_slug: Noviat_Generic
|
||||
odoo_enterprise: 1
|
||||
_commit: v4.6
|
||||
_src_path: git@github.com:Noviat-CI/addons-repo-template.git
|
||||
ci_disable_autoinstall_modules: account_asset
|
||||
odoo_test_flavor: Both
|
||||
odoo_version: 16.0
|
||||
org_name: Noviat
|
||||
org_slug: Noviat
|
||||
rebel_module_groups: []
|
||||
repo_name: Modules dedicated to manage the EBICS protocol
|
||||
repo_slug: accounting-ebics
|
||||
repo_website: https://www.noviat.com/
|
||||
repo_slug: account_ebics
|
||||
repo_type: customer
|
||||
|
||||
|
@ -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
|
||||
|
45
.github/workflows/pre-commit.yml
vendored
Normal file
45
.github/workflows/pre-commit.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
name: pre-commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "16.0*"
|
||||
push:
|
||||
branches:
|
||||
- "16.0"
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Get python version
|
||||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
- name: Install pre-commit
|
||||
run: pip install pre-commit
|
||||
- name: Run pre-commit
|
||||
run: pre-commit run --all-files --show-diff-on-failure --color=always
|
||||
env:
|
||||
# Consider valid a PR that changes README fragments but doesn't
|
||||
# change the README.rst file itself. It's not really a problem
|
||||
# because the bot will update it anyway after merge. This way, we
|
||||
# lower the barrier for functional contributors that want to fix the
|
||||
# readme fragments, while still letting developers get README
|
||||
# auto-generated (which also helps functionals when using runboat).
|
||||
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
|
||||
SKIP: oca-gen-addon-readme
|
||||
- name: Check that all files generated by pre-commit are in git
|
||||
run: |
|
||||
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
|
||||
if [ "$newfiles" != "" ] ; then
|
||||
echo "Please check-in the following files:"
|
||||
echo "$newfiles"
|
||||
exit 1
|
||||
fi
|
123
.github/workflows/test.yml
vendored
Normal file
123
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
name: tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "16.0*"
|
||||
push:
|
||||
branches:
|
||||
- "16.0"
|
||||
|
||||
jobs:
|
||||
unreleased-deps:
|
||||
runs-on: ubuntu-latest
|
||||
name: Detect unreleased dependencies
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: |
|
||||
for reqfile in requirements.txt test-requirements.txt ; do
|
||||
if [ -f ${reqfile} ] ; then
|
||||
result=0
|
||||
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
|
||||
grep "^[^#].*/" ${reqfile} || result=$?
|
||||
if [ $result -eq 0 ] ; then
|
||||
echo "Unreleased dependencies found in ${reqfile}."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
container: ${{ matrix.container }}
|
||||
name: ${{ matrix.name }}
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- container: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
|
||||
name: test with Odoo Community
|
||||
odoo_enterprise : 0
|
||||
exclude_modules : "account_asset"
|
||||
exclude: "account_ebics_batch_payment,account_ebics_oe"
|
||||
- container: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
|
||||
name: test with Odoo Enterprise
|
||||
odoo_enterprise : 1
|
||||
exclude_modules : "account_asset"
|
||||
makepot: true
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:12.0
|
||||
env:
|
||||
POSTGRES_USER: odoo
|
||||
POSTGRES_PASSWORD: odoo
|
||||
POSTGRES_DB: odoo
|
||||
ports:
|
||||
- 5432:5432
|
||||
env:
|
||||
INSTALL_ADDONS_DIR: "/tmp/addons-merged"
|
||||
ADDITIONAL_ADDONS_DIR: "/tmp/additional-addons"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Add Noviat CI Tools to PATH
|
||||
run: |
|
||||
git clone https://${{ secrets.PRIVATE_TOKEN }}@github.com/Noviat-CI/noviat-ci-tools.git /opt/noviat-ci-tools
|
||||
echo "/opt/noviat-ci-tools" >> $GITHUB_PATH
|
||||
- name: Clone Odoo Enterprise
|
||||
if: ${{ matrix.odoo_enterprise == 1 }}
|
||||
run : |
|
||||
git clone https://${{ secrets.PRIVATE_TOKEN }}@github.com/odoo/enterprise.git --depth 1 -b 16.0 /opt/enterprise
|
||||
- name: Clone Noviat Dependencies
|
||||
env:
|
||||
PRIVATE_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
|
||||
run: clone_oca_dependencies_by_noviat
|
||||
- name: Create addons path
|
||||
run: |
|
||||
mkdir -p ${{ env.INSTALL_ADDONS_DIR }}/setup
|
||||
find $(realpath $ADDONS_DIR) $(realpath ${{ env.ADDITIONAL_ADDONS_DIR }}) -name __manifest__.py -exec sh -c 'ln -s "$(dirname "$0")" "${{ env.INSTALL_ADDONS_DIR }}"' {} \;
|
||||
find $(realpath $ADDONS_DIR) $(realpath ${{ env.ADDITIONAL_ADDONS_DIR }}) -iwholename '*/setup/*/setup.py' -exec sh -c 'ln -s "$(dirname "$0")" "${{ env.INSTALL_ADDONS_DIR }}/setup"' {} \;
|
||||
if [ -n ${{ matrix.exclude}} ]
|
||||
then
|
||||
remove_excluded_modules ${{ env.INSTALL_ADDONS_DIR }} ${{ matrix.exclude }}
|
||||
fi
|
||||
- name: Update addons path with enterprise
|
||||
if: ${{ matrix.odoo_enterprise == 1 }}
|
||||
run: |
|
||||
echo "ADDONS_PATH=/opt/odoo/addons,/opt/enterprise,${{ env.INSTALL_ADDONS_DIR }}" >> $GITHUB_ENV
|
||||
- name: Update addons path without enterprise
|
||||
if: ${{ matrix.odoo_enterprise == 0 }}
|
||||
run: |
|
||||
echo "ADDONS_PATH=/opt/odoo/addons,${{ env.INSTALL_ADDONS_DIR }}" >> $GITHUB_ENV
|
||||
- name: Add addons to EXCLUDE PATH
|
||||
if: ${{ matrix.EXCLUDE_MODULES }}
|
||||
run: |
|
||||
echo "server_wide_modules = web,module_change_auto_install" >> ${ODOO_RC}
|
||||
echo "modules_auto_install_disabled = ${{ matrix.EXCLUDE_MODULES }}" >> ${ODOO_RC}
|
||||
- name: Install addons and dependencies
|
||||
run: |
|
||||
(ADDONS_PATH=${ADDONS_PATH} ADDONS_DIR=${INSTALL_ADDONS_DIR} oca_install_addons)
|
||||
- name: Initialize test db
|
||||
run: oca_init_test_database
|
||||
- name: Run tests
|
||||
run: oca_run_tests
|
||||
- name: Generate coverage files
|
||||
run: |
|
||||
coverage report -m
|
||||
coverage xml -o coverage.xml
|
||||
- name: Code Coverage Summary Report
|
||||
uses: irongut/CodeCoverageSummary@v1.3.0
|
||||
with:
|
||||
filename: 'coverage.xml'
|
||||
badge: true
|
||||
format: 'markdown'
|
||||
output: 'both'
|
||||
hide_complexity: true
|
||||
- name: Write to Job Summary
|
||||
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
|
||||
- name: Update .pot files
|
||||
run: noviat_export_and_push_pot https://x-access-token:${{ secrets.PRIVATE_TOKEN }}@github.com/${{ github.repository }}
|
||||
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' }}
|
14
.gitignore
vendored
14
.gitignore
vendored
@ -3,6 +3,7 @@ __pycache__/
|
||||
*.py[cod]
|
||||
/.venv
|
||||
/.pytest_cache
|
||||
/.ruff_cache
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
@ -24,6 +25,19 @@ var/
|
||||
*.egg
|
||||
*.eggs
|
||||
|
||||
# Windows installers
|
||||
*.msi
|
||||
|
||||
# Debian packages
|
||||
*.deb
|
||||
|
||||
# Redhat packages
|
||||
*.rpm
|
||||
|
||||
# MacOS packages
|
||||
*.dmg
|
||||
*.pkg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
@ -1,13 +0,0 @@
|
||||
include:
|
||||
- project: "ci/gitlabci-odoo"
|
||||
ref: main
|
||||
file: "/odoo-tests.template.yml"
|
||||
|
||||
variables:
|
||||
ODOO_CI_IMAGE: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
|
||||
VERSION: "16.0"
|
||||
ODOO_BRANCH: "16.0"
|
||||
ENTERPRISE: "1"
|
||||
ODOO_PRECOMMIT: "1"
|
||||
ODOO_TEST: "1"
|
||||
EXCLUDE_MODULES: "account_asset"
|
@ -5,17 +5,21 @@ exclude: |
|
||||
# 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$|^.github/|
|
||||
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
|
||||
# Maybe reactivate this when all README files include prettier ignore tags?
|
||||
^README\.md$|
|
||||
# Library files can have extraneous formatting (even minimized)
|
||||
/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.*)
|
||||
# Exclude the TODO folders
|
||||
/TODO/
|
||||
default_language_version:
|
||||
python: python3
|
||||
node: "16.17.0"
|
||||
@ -35,46 +39,49 @@ repos:
|
||||
language: fail
|
||||
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
|
||||
- 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://www.noviat.com/"]
|
||||
- repo: https://github.com/myint/autoflake
|
||||
rev: v1.6.1
|
||||
- id: oca-gen-addons-table
|
||||
- repo: https://github.com/OCA/odoo-pre-commit-hooks
|
||||
rev: v0.0.25
|
||||
hooks:
|
||||
- id: autoflake
|
||||
- id: oca-checks-odoo-module
|
||||
- id: oca-checks-po
|
||||
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
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v2.7.1
|
||||
- --disable=po-pretty-format
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: prettier
|
||||
name: prettier (with plugin-xml)
|
||||
entry: prettier
|
||||
args:
|
||||
- --write
|
||||
- --list-different
|
||||
- --ignore-unknown
|
||||
types: [text]
|
||||
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
|
||||
language: node
|
||||
additional_dependencies:
|
||||
- "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: v8.24.0
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: eslint
|
||||
verbose: true
|
||||
name: eslint
|
||||
entry: eslint
|
||||
args:
|
||||
- --color
|
||||
- --fix
|
||||
verbose: true
|
||||
types: [javascript]
|
||||
language: node
|
||||
additional_dependencies:
|
||||
- "eslint@8.24.0"
|
||||
- "eslint-plugin-jsdoc@"
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
@ -97,37 +104,14 @@ repos:
|
||||
- id: check-xml
|
||||
- id: mixed-line-ending
|
||||
args: ["--fix=lf"]
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.38.2
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.1.3
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: ["--keep-percent-format"]
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.12.0
|
||||
hooks:
|
||||
- id: isort
|
||||
name: isort except __init__.py
|
||||
args:
|
||||
- --settings=.
|
||||
exclude: /__init__\.py$
|
||||
- repo: https://github.com/acsone/setuptools-odoo
|
||||
rev: 3.1.8
|
||||
hooks:
|
||||
- id: setuptools-odoo-make-default
|
||||
- id: setuptools-odoo-get-requirements
|
||||
args:
|
||||
- --output
|
||||
- requirements.txt
|
||||
- --header
|
||||
- "# generated from manifests external_dependencies"
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 3.9.2
|
||||
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: v8.0.19
|
||||
hooks:
|
||||
- id: pylint_odoo
|
||||
name: pylint with optional checks
|
||||
|
16
.pylintrc
16
.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=Noviat
|
||||
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=Noviat
|
||||
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
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=all
|
||||
@ -41,7 +41,7 @@ enable=anomalous-backslash-in-string,
|
||||
license-allowed,
|
||||
manifest-author-string,
|
||||
manifest-deprecated-key,
|
||||
manifest-required-author,
|
||||
# manifest-required-author,
|
||||
manifest-required-key,
|
||||
manifest-version-format,
|
||||
method-compute,
|
||||
@ -108,7 +108,7 @@ enable=anomalous-backslash-in-string,
|
||||
invalid-commit,
|
||||
missing-manifest-dependency,
|
||||
missing-newline-extrafiles,
|
||||
missing-readme,
|
||||
# missing-readme,
|
||||
no-utf8-coding-comment,
|
||||
odoo-addons-relative-import,
|
||||
old-api7-method-defined,
|
||||
|
@ -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=Noviat
|
||||
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=Noviat
|
||||
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
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=all
|
||||
@ -33,7 +33,7 @@ enable=anomalous-backslash-in-string,
|
||||
license-allowed,
|
||||
manifest-author-string,
|
||||
manifest-deprecated-key,
|
||||
manifest-required-author,
|
||||
# manifest-required-author,
|
||||
manifest-required-key,
|
||||
manifest-version-format,
|
||||
method-compute,
|
||||
|
31
.ruff.toml
Normal file
31
.ruff.toml
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
target-version = "py310"
|
||||
fix = true
|
||||
|
||||
[lint]
|
||||
extend-select = [
|
||||
"B",
|
||||
"C90",
|
||||
"E501", # line too long (default 88)
|
||||
"I", # isort
|
||||
"UP", # pyupgrade
|
||||
]
|
||||
extend-safe-fixes = ["UP008"]
|
||||
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
|
15
README.md
15
README.md
@ -1,5 +1,5 @@
|
||||
[](https://picasso.noviat.com/Noviat/Noviat_Generic/accounting-ebics/-/commits/16.0)
|
||||
[](https://picasso.noviat.com/Noviat/Noviat_Generic/accounting-ebics/-/commits/16.0)
|
||||
[](https://github.com/Noviat/account_ebics/actions/workflows/pre-commit.yml?query=branch%3A16.0)
|
||||
[](https://github.com/Noviat/account_ebics/actions/workflows/test.yml?query=branch%3A16.0)
|
||||
|
||||
<!-- /!\ do not modify above this line -->
|
||||
|
||||
@ -11,7 +11,16 @@
|
||||
|
||||
[//]: # (addons)
|
||||
|
||||
This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.
|
||||
Available addons
|
||||
----------------
|
||||
addon | version | maintainers | summary
|
||||
--- | --- | --- | ---
|
||||
[account_ebics](account_ebics/) | 16.0.2.0.0 | | EBICS banking protocol
|
||||
[account_ebics_batch](account_ebics_batch/) | 16.0.1.0.1 | | EBICS Files automated import and processing
|
||||
[account_ebics_batch_payment](account_ebics_batch_payment/) | 16.0.1.0.2 | | Upload Batch Payment via EBICS
|
||||
[account_ebics_oca_statement_import](account_ebics_oca_statement_import/) | 16.0.1.0.3 | | Use OCA Bank Statement Import with account_ebics
|
||||
[account_ebics_oe](account_ebics_oe/) | 16.0.1.0.0 | | Deploy account_ebics module on Odoo Enterprise
|
||||
[account_ebics_payment_order](account_ebics_payment_order/) | 16.0.1.1.2 | | Upload Payment Order via EBICS
|
||||
|
||||
[//]: # (end addons)
|
||||
|
||||
|
@ -8,7 +8,6 @@ from openupgradelib import openupgrade # pylint: disable=W7936
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
|
||||
_ebics_config_upgrade(env, version)
|
||||
_noupdate_changes(env, version)
|
||||
|
||||
|
@ -27,9 +27,7 @@ def _update_file_format(cr, ff):
|
||||
"""
|
||||
SELECT res_id FROM ir_model_data
|
||||
WHERE module='account_ebics' AND name='{}'
|
||||
""".format(
|
||||
ff["xml_id_name"]
|
||||
)
|
||||
""".format(ff["xml_id_name"])
|
||||
)
|
||||
res = cr.fetchone()
|
||||
if res:
|
||||
|
@ -57,9 +57,7 @@ def _update_file_format(cr, ff):
|
||||
"""
|
||||
SELECT id, res_id FROM ir_model_data
|
||||
WHERE module='account_ebics' AND name='{}'
|
||||
""".format(
|
||||
ff["old_xml_id_name"]
|
||||
)
|
||||
""".format(ff["old_xml_id_name"])
|
||||
)
|
||||
res = cr.fetchone()
|
||||
if res:
|
||||
@ -67,15 +65,11 @@ def _update_file_format(cr, ff):
|
||||
UPDATE ir_model_data
|
||||
SET name='{new_xml_id_name}'
|
||||
WHERE id={xml_id};
|
||||
""".format(
|
||||
new_xml_id_name=ff["new_xml_id_name"], xml_id=res[0]
|
||||
)
|
||||
""".format(new_xml_id_name=ff["new_xml_id_name"], xml_id=res[0])
|
||||
if ff.get("new_name"):
|
||||
query += """
|
||||
UPDATE ebics_file_format
|
||||
SET name='{new_name}'
|
||||
WHERE id={ff_id};
|
||||
""".format(
|
||||
new_name=ff["new_name"], ff_id=res[1]
|
||||
)
|
||||
""".format(new_name=ff["new_name"], ff_id=res[1])
|
||||
cr.execute(query) # pylint: disable=E8103
|
||||
|
@ -172,7 +172,7 @@ class EbicsConfig(models.Model):
|
||||
ok = False
|
||||
if not ok:
|
||||
raise UserError(
|
||||
_(
|
||||
_( # pylint: disable=W8120
|
||||
"Order Number should comply with the following pattern:"
|
||||
"\n[A-Z]{1}[A-Z0-9]{3}"
|
||||
)
|
||||
|
@ -171,8 +171,8 @@ class EbicsFile(models.Model):
|
||||
if raise_if_not_found:
|
||||
raise UserError(
|
||||
_(
|
||||
"The module to process the '%(ebics_format)s' format is not installed "
|
||||
"on your system. "
|
||||
"The module to process the '%(ebics_format)s' format is "
|
||||
"not installed on your system. "
|
||||
"\nPlease install module '%(module)s'",
|
||||
ebics_format=self.format_id.name,
|
||||
module=module,
|
||||
@ -567,7 +567,7 @@ class EbicsFile(models.Model):
|
||||
"054": "Ntfctn",
|
||||
}
|
||||
camt_tag = variant_tags[camt_variant]
|
||||
stmts = root[0].findall("ns:{}".format(camt_tag), ns)
|
||||
stmts = root[0].findall(f"ns:{camt_tag}", ns)
|
||||
for i, stmt in enumerate(stmts):
|
||||
acc_number = sanitize_account_number(
|
||||
stmt.xpath(
|
||||
@ -590,7 +590,7 @@ class EbicsFile(models.Model):
|
||||
|
||||
root_new = deepcopy(root)
|
||||
entries = False
|
||||
for j, el in enumerate(root_new[0].findall("ns:{}".format(camt_tag), ns)):
|
||||
for j, el in enumerate(root_new[0].findall(f"ns:{camt_tag}", ns)):
|
||||
if j != i:
|
||||
el.getparent().remove(el)
|
||||
else:
|
||||
|
@ -437,7 +437,7 @@ class EbicsUserID(models.Model):
|
||||
err_msg = _("EBICS version mismatch.") + "\n"
|
||||
err_msg += _("Versions supported by your bank:")
|
||||
for k in supported_versions:
|
||||
err_msg += "\n{}: {} ".format(k, supported_versions[k])
|
||||
err_msg += f"\n{k}: {supported_versions[k]} "
|
||||
raise UserError(err_msg)
|
||||
if ebics_version == "H003":
|
||||
bank._order_number = self.ebics_config_id._get_order_number()
|
||||
@ -464,13 +464,13 @@ class EbicsUserID(models.Model):
|
||||
e = exc_info()
|
||||
error = _("EBICS Functional Error:")
|
||||
error += "\n"
|
||||
error += "{} (code: {})".format(e[1].message, e[1].code)
|
||||
error += f"{e[1].message} (code: {e[1].code})"
|
||||
raise UserError(error) from err
|
||||
except EbicsTechnicalError as err:
|
||||
e = exc_info()
|
||||
error = _("EBICS Technical Error:")
|
||||
error += "\n"
|
||||
error += "{} (code: {})".format(e[1].message, e[1].code)
|
||||
error += f"{e[1].message} (code: {e[1].code})"
|
||||
raise UserError(error) from err
|
||||
|
||||
# Send the public authentication and encryption keys to the bank.
|
||||
@ -549,7 +549,7 @@ class EbicsUserID(models.Model):
|
||||
e = exc_info()
|
||||
error = _("EBICS Functional Error:")
|
||||
error += "\n"
|
||||
error += "{} (code: {})".format(e[1].message, e[1].code)
|
||||
error += f"{e[1].message} (code: {e[1].code})"
|
||||
raise UserError(error) from err
|
||||
except Exception as err:
|
||||
exctype, value = exc_info()[:2]
|
||||
|
@ -276,7 +276,7 @@ class EbicsXfer(models.TransientModel):
|
||||
order_type=df.order_type,
|
||||
)
|
||||
self.note += "\n"
|
||||
self.note += "{} (code: {})".format(e[1].message, e[1].code)
|
||||
self.note += f"{e[1].message} (code: {e[1].code})"
|
||||
except EbicsTechnicalError:
|
||||
err_cnt += 1
|
||||
e = exc_info()
|
||||
@ -288,7 +288,7 @@ class EbicsXfer(models.TransientModel):
|
||||
order_type=df.order_type,
|
||||
)
|
||||
self.note += "\n"
|
||||
self.note += "{} (code: {})".format(e[1].message, e[1].code)
|
||||
self.note += f"{e[1].message} (code: {e[1].code})"
|
||||
except EbicsVerificationError:
|
||||
err_cnt += 1
|
||||
self.note += "\n"
|
||||
@ -358,7 +358,7 @@ class EbicsXfer(models.TransientModel):
|
||||
self.ensure_one()
|
||||
module = __name__.split("addons.")[1].split(".")[0]
|
||||
act = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"{}.ebics_file_action_download".format(module)
|
||||
f"{module}.ebics_file_action_download"
|
||||
)
|
||||
act["domain"] = [("id", "in", self._context["ebics_file_ids"])]
|
||||
return act
|
||||
@ -433,13 +433,13 @@ class EbicsXfer(models.TransientModel):
|
||||
self.note += "\n"
|
||||
self.note += _("EBICS Functional Error:")
|
||||
self.note += "\n"
|
||||
self.note += "{} (code: {})".format(e[1].message, e[1].code)
|
||||
self.note += f"{e[1].message} (code: {e[1].code})"
|
||||
except EbicsTechnicalError:
|
||||
e = exc_info()
|
||||
self.note += "\n"
|
||||
self.note += _("EBICS Technical Error:")
|
||||
self.note += "\n"
|
||||
self.note += "{} (code: {})".format(e[1].message, e[1].code)
|
||||
self.note += f"{e[1].message} (code: {e[1].code})"
|
||||
except EbicsVerificationError:
|
||||
self.note += "\n"
|
||||
self.note += _("EBICS Verification Error:")
|
||||
|
10
oca_dependencies.txt
Normal file
10
oca_dependencies.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# See https://github.com/OCA/maintainer-quality-tools/blob/master/travis/clone_oca_dependencies
|
||||
# The expected format for oca_dependencies.txt:
|
||||
# * comment lines start with # and are ignored
|
||||
# * a dependency line contains:
|
||||
# - the name of the OCA project
|
||||
# - (optional) the URL to the git repository (defaulting to the OCA repository)
|
||||
# - (optional) the name of the branch to use (defaulting to ${VERSION}). It is
|
||||
# required if you want to select a commit SHA in the next parameter.
|
||||
# - (optional) the commit SHA1 to use. If you set this option you MUST specify
|
||||
# the branch
|
@ -1 +1,3 @@
|
||||
odoo-addon-module_change_auto_install
|
||||
openupgradelib
|
||||
cryptography<37
|
||||
|
Loading…
x
Reference in New Issue
Block a user