Compare commits
merge into: OCA:11.0
OCA:10.0
OCA:11.0
OCA:12.0
OCA:12.0_PR200
OCA:12.0_PR215
OCA:12.0_bank_statement_import_test
OCA:12.0_fix_qonto_2022_date
OCA:7.0
OCA:8.0
OCA:9.0
pull from: OCA:12.0_fix_qonto_2022_date
OCA:10.0
OCA:11.0
OCA:12.0
OCA:12.0_PR200
OCA:12.0_PR215
OCA:12.0_bank_statement_import_test
OCA:12.0_fix_qonto_2022_date
OCA:7.0
OCA:8.0
OCA:9.0
No commits in common. '11.0' and '12.0_fix_qonto_2022_date' have entirely different histories.
11.0
...
12.0_fix_q
406 changed files with 25849 additions and 3600 deletions
-
19.copier-answers.yml
-
20.editorconfig
-
11.flake8
-
37.github/workflows/pre-commit.yml
-
69.github/workflows/stale.yml
-
69.github/workflows/test.yml
-
19.gitignore
-
59.pre-commit-config.yaml
-
156.pylintrc
-
68.pylintrc-mandatory
-
40.travis.yml
-
12LICENSE
-
64README.md
-
91account_bank_statement_clear_partner/README.rst
-
3account_bank_statement_clear_partner/__init__.py
-
18account_bank_statement_clear_partner/__manifest__.py
-
25account_bank_statement_clear_partner/i18n/account_bank_statement_clear_partner.pot
-
27account_bank_statement_clear_partner/i18n/nl.po
-
3account_bank_statement_clear_partner/models/__init__.py
-
13account_bank_statement_clear_partner/models/account_bank_statement.py
-
0account_bank_statement_clear_partner/readme/CONFIGURE.rst
-
5account_bank_statement_clear_partner/readme/CONTRIBUTORS.rst
-
2account_bank_statement_clear_partner/readme/DESCRIPTION.rst
-
9account_bank_statement_clear_partner/readme/USAGE.rst
-
0account_bank_statement_clear_partner/static/description/icon.png
-
436account_bank_statement_clear_partner/static/description/index.html
-
3account_bank_statement_clear_partner/tests/__init__.py
-
83account_bank_statement_clear_partner/tests/test_account_bank_statement_clear_patner.py
-
15account_bank_statement_clear_partner/views/account_bank_statement_views.xml
-
86account_bank_statement_import_bypass_check/README.rst
-
1account_bank_statement_import_bypass_check/__init__.py
-
21account_bank_statement_import_bypass_check/__manifest__.py
-
35account_bank_statement_import_bypass_check/i18n/account_bank_statement_import_bypass_check.pot
-
37account_bank_statement_import_bypass_check/i18n/fr.po
-
3account_bank_statement_import_bypass_check/readme/CONTRIBUTORS.rst
-
1account_bank_statement_import_bypass_check/readme/DESCRIPTION.rst
-
7account_bank_statement_import_bypass_check/readme/USAGE.rst
-
BINaccount_bank_statement_import_bypass_check/static/description/icon.png
-
435account_bank_statement_import_bypass_check/static/description/index.html
-
1account_bank_statement_import_bypass_check/wizard/__init__.py
-
56account_bank_statement_import_bypass_check/wizard/account_bank_statement_import.py
-
24account_bank_statement_import_bypass_check/wizard/account_bank_statement_import_view.xml
-
61account_bank_statement_import_camt_oca/README.rst
-
2account_bank_statement_import_camt_oca/__init__.py
-
8account_bank_statement_import_camt_oca/__manifest__.py
-
33account_bank_statement_import_camt_oca/i18n/account_bank_statement_import_camt_oca.pot
-
33account_bank_statement_import_camt_oca/i18n/de.po
-
36account_bank_statement_import_camt_oca/i18n/es.po
-
36account_bank_statement_import_camt_oca/i18n/fa.po
-
33account_bank_statement_import_camt_oca/i18n/fi.po
-
33account_bank_statement_import_camt_oca/i18n/fr.po
-
33account_bank_statement_import_camt_oca/i18n/fr_CH.po
-
33account_bank_statement_import_camt_oca/i18n/gl.po
-
44account_bank_statement_import_camt_oca/i18n/hr.po
-
33account_bank_statement_import_camt_oca/i18n/lt_LT.po
-
33account_bank_statement_import_camt_oca/i18n/nb_NO.po
-
43account_bank_statement_import_camt_oca/i18n/nl.po
-
33account_bank_statement_import_camt_oca/i18n/pt_BR.po
-
33account_bank_statement_import_camt_oca/i18n/pt_PT.po
-
33account_bank_statement_import_camt_oca/i18n/sl.po
-
3account_bank_statement_import_camt_oca/models/__init__.py
-
6account_bank_statement_import_camt_oca/models/account_bank_statement_import.py
-
14account_bank_statement_import_camt_oca/models/account_journal.py
-
18account_bank_statement_import_camt_oca/models/parser.py
-
5account_bank_statement_import_camt_oca/readme/CONTRIBUTORS.rst
-
1account_bank_statement_import_camt_oca/readme/DESCRIPTION.rst
-
423account_bank_statement_import_camt_oca/static/description/index.html
-
3account_bank_statement_import_camt_oca/tests/__init__.py
-
45account_bank_statement_import_camt_oca/tests/test_import_bank_statement.py
-
36account_bank_statement_import_move_line/README.rst
-
6account_bank_statement_import_move_line/__manifest__.py
-
54account_bank_statement_import_move_line/i18n/account_bank_statement_import_move_line.pot
-
52account_bank_statement_import_move_line/i18n/de.po
-
52account_bank_statement_import_move_line/i18n/es.po
-
52account_bank_statement_import_move_line/i18n/fr.po
-
59account_bank_statement_import_move_line/i18n/hr.po
-
103account_bank_statement_import_move_line/i18n/nl.po
-
52account_bank_statement_import_move_line/i18n/pt_BR.po
-
52account_bank_statement_import_move_line/i18n/pt_PT.po
-
52account_bank_statement_import_move_line/i18n/sl.po
-
3account_bank_statement_import_move_line/models/account_move_line.py
-
5account_bank_statement_import_move_line/readme/CONFIGURE.rst
-
5account_bank_statement_import_move_line/readme/CONTRIBUTORS.rst
-
50account_bank_statement_import_move_line/static/description/index.html
-
8account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py
-
3account_bank_statement_import_move_line/views/account_bank_statement_view.xml
-
33account_bank_statement_import_move_line/wizards/account_statement_line_create.py
-
2account_bank_statement_import_move_line/wizards/account_statement_line_create_view.xml
-
55account_bank_statement_import_mt940_base/README.rst
-
1account_bank_statement_import_mt940_base/__init__.py
-
14account_bank_statement_import_mt940_base/__manifest__.py
-
14account_bank_statement_import_mt940_base/i18n/account_bank_statement_import_mt940_base.pot
-
310account_bank_statement_import_mt940_base/mt940.py
-
61account_bank_statement_import_mt940_base/test_files/test-ing.940
-
29account_bank_statement_import_mt940_base/test_files/test-rabo.swi
-
78account_bank_statement_import_mt940_base/test_files/test-sns.940
-
11account_bank_statement_import_mt940_base/test_files/test-wrong-file.940
-
1account_bank_statement_import_mt940_base/tests/__init__.py
-
239account_bank_statement_import_mt940_base/tests/test_import_bank_statement.py
-
1account_bank_statement_import_ofx/README.rst
@ -0,0 +1,19 @@ |
|||||
|
# Do NOT update manually; changes here will be overwritten by Copier |
||||
|
_commit: v1.7.0 |
||||
|
_src_path: git+https://github.com/oca/oca-addons-repo-template |
||||
|
ci: GitHub |
||||
|
dependency_installation_mode: PIP |
||||
|
generate_requirements_txt: true |
||||
|
include_wkhtmltopdf: false |
||||
|
odoo_version: 12.0 |
||||
|
org_name: Odoo Community Association (OCA) |
||||
|
org_slug: OCA |
||||
|
rebel_module_groups: [] |
||||
|
repo_description: This repository hosts additionnal parsers and import features for |
||||
|
bank statements. |
||||
|
repo_name: OCA bank statement import modules for Odoo |
||||
|
repo_slug: bank-statement-import |
||||
|
repo_website: https://github.com/OCA/bank-statement-import |
||||
|
travis_apt_packages: [] |
||||
|
travis_apt_sources: [] |
||||
|
|
@ -0,0 +1,20 @@ |
|||||
|
# Configuration for known file extensions |
||||
|
[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}] |
||||
|
charset = utf-8 |
||||
|
end_of_line = lf |
||||
|
indent_size = 4 |
||||
|
indent_style = space |
||||
|
insert_final_newline = true |
||||
|
trim_trailing_whitespace = true |
||||
|
|
||||
|
[*.{json,yml,yaml,rst,md}] |
||||
|
indent_size = 2 |
||||
|
|
||||
|
# Do not configure editor for libs and autogenerated content |
||||
|
[{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}] |
||||
|
charset = unset |
||||
|
end_of_line = unset |
||||
|
indent_size = unset |
||||
|
indent_style = unset |
||||
|
insert_final_newline = false |
||||
|
trim_trailing_whitespace = false |
@ -0,0 +1,11 @@ |
|||||
|
[flake8] |
||||
|
# E123,E133,E226,E241,E242 are ignored by default by pep8 and flake8 |
||||
|
# F811 is legal in odoo 8 when we implement 2 interfaces for a method |
||||
|
# F601 pylint support this case with expected tests |
||||
|
# W503 changed by W504 and OCA prefers allow both |
||||
|
# E203: whitespace before ':' (black behaviour and not pep8 compliant) |
||||
|
ignore = E123,E133,E226,E241,E242,F811,F601,W503,W504,E203 |
||||
|
max-line-length = 88 |
||||
|
per-file-ignores= |
||||
|
__init__.py:F401 |
||||
|
|
@ -0,0 +1,37 @@ |
|||||
|
name: pre-commit |
||||
|
|
||||
|
on: |
||||
|
pull_request: |
||||
|
branches: |
||||
|
- "12.0*" |
||||
|
push: |
||||
|
branches: |
||||
|
- "12.0" |
||||
|
- "12.0-ocabot-*" |
||||
|
|
||||
|
jobs: |
||||
|
pre-commit: |
||||
|
runs-on: ubuntu-latest |
||||
|
steps: |
||||
|
- uses: actions/checkout@v2 |
||||
|
- uses: actions/setup-python@v2 |
||||
|
with: |
||||
|
python-version: "3.6" |
||||
|
- name: Get python version |
||||
|
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV |
||||
|
- uses: actions/cache@v1 |
||||
|
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 |
||||
|
- 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 |
@ -0,0 +1,69 @@ |
|||||
|
name: Mark stale issues and pull requests |
||||
|
|
||||
|
on: |
||||
|
schedule: |
||||
|
- cron: "0 12 * * 0" |
||||
|
|
||||
|
jobs: |
||||
|
stale: |
||||
|
runs-on: ubuntu-latest |
||||
|
steps: |
||||
|
- name: Stale PRs and issues policy |
||||
|
uses: actions/stale@v4 |
||||
|
with: |
||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }} |
||||
|
# General settings. |
||||
|
ascending: true |
||||
|
remove-stale-when-updated: true |
||||
|
# Pull Requests settings. |
||||
|
# 120+30 day stale policy for PRs |
||||
|
# * Except PRs marked as "no stale" |
||||
|
days-before-pr-stale: 120 |
||||
|
days-before-pr-close: 30 |
||||
|
exempt-pr-labels: "no stale" |
||||
|
stale-pr-label: "stale" |
||||
|
stale-pr-message: > |
||||
|
There hasn't been any activity on this pull request in the past 4 months, so |
||||
|
it has been marked as stale and it will be closed automatically if no |
||||
|
further activity occurs in the next 30 days. |
||||
|
|
||||
|
If you want this PR to never become stale, please ask a PSC member to apply |
||||
|
the "no stale" label. |
||||
|
# Issues settings. |
||||
|
# 180+30 day stale policy for open issues |
||||
|
# * Except Issues marked as "no stale" |
||||
|
days-before-issue-stale: 180 |
||||
|
days-before-issue-close: 30 |
||||
|
exempt-issue-labels: "no stale,needs more information" |
||||
|
stale-issue-label: "stale" |
||||
|
stale-issue-message: > |
||||
|
There hasn't been any activity on this issue in the past 6 months, so it has |
||||
|
been marked as stale and it will be closed automatically if no further |
||||
|
activity occurs in the next 30 days. |
||||
|
|
||||
|
If you want this issue to never become stale, please ask a PSC member to |
||||
|
apply the "no stale" label. |
||||
|
|
||||
|
# 15+30 day stale policy for issues pending more information |
||||
|
# * Issues that are pending more information |
||||
|
# * Except Issues marked as "no stale" |
||||
|
- name: Needs more information stale issues policy |
||||
|
uses: actions/stale@v4 |
||||
|
with: |
||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }} |
||||
|
ascending: true |
||||
|
only-labels: "needs more information" |
||||
|
exempt-issue-labels: "no stale" |
||||
|
days-before-stale: 15 |
||||
|
days-before-close: 30 |
||||
|
days-before-pr-stale: -1 |
||||
|
days-before-pr-close: -1 |
||||
|
remove-stale-when-updated: true |
||||
|
stale-issue-label: "stale" |
||||
|
stale-issue-message: > |
||||
|
This issue needs more information and there hasn't been any activity |
||||
|
recently, so it has been marked as stale and it will be closed automatically |
||||
|
if no further activity occurs in the next 30 days. |
||||
|
|
||||
|
If you think this is a mistake, please ask a PSC member to remove the "needs |
||||
|
more information" label. |
@ -0,0 +1,69 @@ |
|||||
|
name: tests |
||||
|
|
||||
|
on: |
||||
|
pull_request: |
||||
|
branches: |
||||
|
- "12.0*" |
||||
|
push: |
||||
|
branches: |
||||
|
- "12.0" |
||||
|
- "12.0-ocabot-*" |
||||
|
|
||||
|
jobs: |
||||
|
unreleased-deps: |
||||
|
runs-on: ubuntu-latest |
||||
|
name: Detect unreleased dependencies |
||||
|
steps: |
||||
|
- uses: actions/checkout@v2 |
||||
|
- 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-latest |
||||
|
container: ${{ matrix.container }} |
||||
|
name: ${{ matrix.name }} |
||||
|
strategy: |
||||
|
fail-fast: false |
||||
|
matrix: |
||||
|
include: |
||||
|
- container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest |
||||
|
makepot: "true" |
||||
|
name: test with Odoo |
||||
|
- container: ghcr.io/oca/oca-ci/py3.6-ocb12.0:latest |
||||
|
name: test with OCB |
||||
|
services: |
||||
|
postgres: |
||||
|
image: postgres:9.6 |
||||
|
env: |
||||
|
POSTGRES_USER: odoo |
||||
|
POSTGRES_PASSWORD: odoo |
||||
|
POSTGRES_DB: odoo |
||||
|
ports: |
||||
|
- 5432:5432 |
||||
|
steps: |
||||
|
- uses: actions/checkout@v2 |
||||
|
with: |
||||
|
persist-credentials: false |
||||
|
- name: Install addons and dependencies |
||||
|
run: oca_install_addons |
||||
|
- name: Check licenses |
||||
|
run: manifestoo -d . check-licenses |
||||
|
- name: Check development status |
||||
|
run: manifestoo -d . check-dev-status --default-dev-status=Beta |
||||
|
- name: Initialize test db |
||||
|
run: oca_init_test_database |
||||
|
- name: Run tests |
||||
|
run: oca_run_tests |
||||
|
- uses: codecov/codecov-action@v1 |
||||
|
- name: Update .pot files |
||||
|
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} |
||||
|
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} |
@ -0,0 +1,59 @@ |
|||||
|
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$|^.github/| |
||||
|
# 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$| |
||||
|
# You don't usually want a bot to modify your legal texts |
||||
|
(LICENSE.*|COPYING.*) |
||||
|
default_language_version: |
||||
|
python: python3 |
||||
|
repos: |
||||
|
- 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/bank-statement-import"] |
||||
|
- repo: https://github.com/acsone/setuptools-odoo |
||||
|
rev: 3.0.6 |
||||
|
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/OCA/mirrors-flake8 |
||||
|
rev: v3.4.1 |
||||
|
hooks: |
||||
|
- id: flake8 |
||||
|
name: flake8 excluding __init__.py |
||||
|
exclude: __init__\.py |
||||
|
- 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 |
||||
|
|
@ -0,0 +1,156 @@ |
|||||
|
[MASTER] |
||||
|
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=Odoo Community Association (OCA) |
||||
|
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=12.0 |
||||
|
|
||||
|
[MESSAGES CONTROL] |
||||
|
disable=all |
||||
|
|
||||
|
# Enable message and code: |
||||
|
# anomalous-backslash-in-string - W1401 |
||||
|
# assignment-from-none - W1111 |
||||
|
# dangerous-default-value - W0102 |
||||
|
# duplicate-key - W0109 |
||||
|
# missing-import-error - W7935 |
||||
|
# missing-manifest-dependency - W7936 |
||||
|
# pointless-statement - W0104 |
||||
|
# pointless-string-statement - W0105 |
||||
|
# print-statement - E1601 |
||||
|
# redundant-keyword-arg - E1124 |
||||
|
# reimported - W0404 |
||||
|
# relative-import - W0403 |
||||
|
# return-in-init - E0101 |
||||
|
# rst-syntax-error - E7901 |
||||
|
# too-few-format-args - E1306 |
||||
|
# unreachable - W0101 |
||||
|
|
||||
|
|
||||
|
# This .pylintrc contains optional AND mandatory checks and is meant to be |
||||
|
# loaded in an IDE to have it check everything, in the hope this will make |
||||
|
# optional checks more visible to contributors who otherwise never look at a |
||||
|
# green travis to see optional checks that failed. |
||||
|
# .pylintrc-mandatory containing only mandatory checks is used the pre-commit |
||||
|
# config as a blocking check. |
||||
|
|
||||
|
# Beta message and code: |
||||
|
# api-one-deprecated - W8104 |
||||
|
# api-one-multi-together - W8101 |
||||
|
# attribute-deprecated - W8105 |
||||
|
# class-camelcase - C8104 |
||||
|
# create-user-wo-reset-password - W7905 |
||||
|
# consider-merging-classes-inherited - R7980 |
||||
|
# copy-wo-api-one - W8102 |
||||
|
# dangerous-filter-wo-user - W7901 |
||||
|
# dangerous-view-replace-wo-priority - W7940 |
||||
|
# deprecated-module - W0402 |
||||
|
# duplicate-id-csv - W7906 |
||||
|
# duplicate-xml-fields - W7907 |
||||
|
# duplicate-xml-record-id - W7902 |
||||
|
# file-not-used - W7930 |
||||
|
# incoherent-interpreter-exec-perm - W8201 |
||||
|
# invalid-commit - E8102 |
||||
|
# javascript-lint - W7903 |
||||
|
# manifest-deprecated-key - C8103 |
||||
|
# method-compute - C8108 |
||||
|
# method-inverse - C8110 |
||||
|
# method-required-super - W8106 |
||||
|
# method-search - C8109 |
||||
|
# missing-newline-extrafiles - W7908 |
||||
|
# missing-readme - C7902 |
||||
|
# no-utf8-coding-comment - C8201 |
||||
|
# unnecessary-utf8-coding-comment - C8202 |
||||
|
# odoo-addons-relative-import - W7950 |
||||
|
# old-api7-method-defined - R8110 |
||||
|
# openerp-exception-warning - R8101 |
||||
|
# redundant-modulename-xml - W7909 |
||||
|
# sql-injection - E8103 |
||||
|
# too-complex - C0901 |
||||
|
# translation-field - W8103 |
||||
|
# translation-required - C8107 |
||||
|
# use-vim-comment - W8202 |
||||
|
# wrong-tabs-instead-of-spaces - W7910 |
||||
|
# xml-syntax-error - E7902 |
||||
|
|
||||
|
|
||||
|
enable=anomalous-backslash-in-string, |
||||
|
assignment-from-none, |
||||
|
dangerous-default-value, |
||||
|
development-status-allowed, |
||||
|
duplicate-key, |
||||
|
duplicate-po-message-definition, |
||||
|
missing-import-error, |
||||
|
missing-manifest-dependency, |
||||
|
po-msgstr-variables, |
||||
|
po-syntax-error, |
||||
|
pointless-statement, |
||||
|
pointless-string-statement, |
||||
|
print-used, |
||||
|
redundant-keyword-arg, |
||||
|
reimported, |
||||
|
relative-import, |
||||
|
return-in-init, |
||||
|
rst-syntax-error, |
||||
|
too-few-format-args, |
||||
|
unreachable, |
||||
|
eval-used, |
||||
|
eval-referenced, |
||||
|
license-allowed, |
||||
|
manifest-author-string, |
||||
|
manifest-required-author, |
||||
|
manifest-required-key, |
||||
|
manifest-version-format, |
||||
|
api-one-deprecated, |
||||
|
api-one-multi-together, |
||||
|
attribute-deprecated, |
||||
|
class-camelcase, |
||||
|
create-user-wo-reset-password, |
||||
|
consider-merging-classes-inherited, |
||||
|
copy-wo-api-one, |
||||
|
dangerous-filter-wo-user, |
||||
|
dangerous-view-replace-wo-priority, |
||||
|
deprecated-module, |
||||
|
duplicate-id-csv, |
||||
|
duplicate-po-message-definition, |
||||
|
duplicate-xml-fields, |
||||
|
duplicate-xml-record-id, |
||||
|
file-not-used, |
||||
|
incoherent-interpreter-exec-perm, |
||||
|
invalid-commit, |
||||
|
javascript-lint, |
||||
|
manifest-deprecated-key, |
||||
|
method-compute, |
||||
|
method-inverse, |
||||
|
method-required-super, |
||||
|
method-search, |
||||
|
missing-newline-extrafiles, |
||||
|
missing-readme, |
||||
|
po-msgstr-variables, |
||||
|
po-syntax-error, |
||||
|
no-utf8-coding-comment, |
||||
|
unnecessary-utf8-coding-comment, |
||||
|
odoo-addons-relative-import, |
||||
|
old-api7-method-defined, |
||||
|
openerp-exception-warning, |
||||
|
redefined-builtin, |
||||
|
redundant-modulename-xml, |
||||
|
sql-injection, |
||||
|
too-complex, |
||||
|
translation-field, |
||||
|
translation-required, |
||||
|
use-vim-comment, |
||||
|
wrong-tabs-instead-of-spaces, |
||||
|
xml-syntax-error, |
||||
|
|
||||
|
|
||||
|
[REPORTS] |
||||
|
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} |
||||
|
output-format=colorized |
||||
|
reports=no |
||||
|
|
@ -0,0 +1,68 @@ |
|||||
|
[MASTER] |
||||
|
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=Odoo Community Association (OCA) |
||||
|
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=12.0 |
||||
|
|
||||
|
[MESSAGES CONTROL] |
||||
|
disable=all |
||||
|
|
||||
|
# Enable message and code: |
||||
|
# anomalous-backslash-in-string - W1401 |
||||
|
# assignment-from-none - W1111 |
||||
|
# dangerous-default-value - W0102 |
||||
|
# duplicate-key - W0109 |
||||
|
# missing-import-error - W7935 |
||||
|
# missing-manifest-dependency - W7936 |
||||
|
# pointless-statement - W0104 |
||||
|
# pointless-string-statement - W0105 |
||||
|
# print-statement - E1601 |
||||
|
# redundant-keyword-arg - E1124 |
||||
|
# reimported - W0404 |
||||
|
# relative-import - W0403 |
||||
|
# return-in-init - E0101 |
||||
|
# rst-syntax-error - E7901 |
||||
|
# too-few-format-args - E1306 |
||||
|
# unreachable - W0101 |
||||
|
|
||||
|
|
||||
|
|
||||
|
enable=anomalous-backslash-in-string, |
||||
|
assignment-from-none, |
||||
|
dangerous-default-value, |
||||
|
development-status-allowed, |
||||
|
duplicate-key, |
||||
|
duplicate-po-message-definition, |
||||
|
missing-import-error, |
||||
|
missing-manifest-dependency, |
||||
|
po-msgstr-variables, |
||||
|
po-syntax-error, |
||||
|
pointless-statement, |
||||
|
pointless-string-statement, |
||||
|
print-used, |
||||
|
redundant-keyword-arg, |
||||
|
reimported, |
||||
|
relative-import, |
||||
|
return-in-init, |
||||
|
rst-syntax-error, |
||||
|
too-few-format-args, |
||||
|
unreachable, |
||||
|
eval-used, |
||||
|
eval-referenced, |
||||
|
license-allowed, |
||||
|
manifest-author-string, |
||||
|
manifest-required-author, |
||||
|
manifest-required-key, |
||||
|
manifest-version-format |
||||
|
|
||||
|
[REPORTS] |
||||
|
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} |
||||
|
output-format=colorized |
||||
|
reports=no |
||||
|
|
@ -1,40 +0,0 @@ |
|||||
language: python |
|
||||
|
|
||||
python: |
|
||||
- "3.5" |
|
||||
|
|
||||
sudo: false |
|
||||
cache: pip |
|
||||
|
|
||||
addons: |
|
||||
apt: |
|
||||
packages: |
|
||||
- expect-dev # provides unbuffer utility |
|
||||
- python-lxml # because pip installation is slow |
|
||||
|
|
||||
env: |
|
||||
global: |
|
||||
- VERSION="11.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" |
|
||||
- TRANSIFEX_USER='transbot@odoo-community.org' |
|
||||
- secure: "G39Lpe4r3QDkivRJrcIX+JDsji/zc+wXrcQ0i2X4L66wrOEcG+SU8Lzp57Odyq+Li7lRa0XQ6rxq7+40Lm4EIoumsYbddp2VjgiR0Bkv8xHOQ2hdrODWbl0ZKhWWpzwGkPs90i39fnFKbPd86XjcvYbPmdapQ/vpUO7ht8WxCRM=" |
|
||||
|
|
||||
matrix: |
|
||||
- LINT_CHECK="1" |
|
||||
- TRANSIFEX="1" |
|
||||
- TESTS="1" ODOO_REPO="OCA/OCB" |
|
||||
- TESTS="1" ODOO_REPO="odoo/odoo" |
|
||||
|
|
||||
|
|
||||
install: |
|
||||
- git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools |
|
||||
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} |
|
||||
- pip install git+https://github.com/jseutter/ofxparse.git |
|
||||
- travis_install_nightly |
|
||||
# example: dependency |
|
||||
# - git clone https://github.com/OCA/webkit-tools -b ${VERSION} $HOME/webkit-tools |
|
||||
|
|
||||
script: |
|
||||
- travis_run_tests |
|
||||
|
|
||||
after_success: |
|
||||
- travis_after_tests_success |
|
@ -1,23 +1,55 @@ |
|||||
[![Build Status](https://travis-ci.org/OCA/bank-statement-import.svg?branch=11.0)](https://travis-ci.org/OCA/bank-statement-import) |
|
||||
[![Coverage Status](https://coveralls.io/repos/OCA/bank-statement-import/badge.svg?branch=11.0)](https://coveralls.io/r/OCA/bank-statement-import?branch=11.0) |
|
||||
|
|
||||
OCA bank statement import modules for Odoo |
|
||||
========================================== |
|
||||
|
[![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=12.0) |
||||
|
[![Pre-commit Status](https://github.com/OCA/bank-statement-import/actions/workflows/pre-commit.yml/badge.svg?branch=12.0)](https://github.com/OCA/bank-statement-import/actions/workflows/pre-commit.yml?query=branch%3A12.0) |
||||
|
[![Build Status](https://github.com/OCA/bank-statement-import/actions/workflows/test.yml/badge.svg?branch=12.0)](https://github.com/OCA/bank-statement-import/actions/workflows/test.yml?query=branch%3A12.0) |
||||
|
[![codecov](https://codecov.io/gh/OCA/bank-statement-import/branch/12.0/graph/badge.svg)](https://codecov.io/gh/OCA/bank-statement-import) |
||||
|
[![Translation Status](https://translation.odoo-community.org/widgets/bank-statement-import-12-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/bank-statement-import-12-0/?utm_source=widget) |
||||
|
|
||||
This repository hosts additionnal parsers and import features inspired by v7.0 branch from https://github.com/OCA/bank-payment and https://github.com/OCA/bank-statement-reconcile |
|
||||
|
<!-- /!\ do not modify above this line --> |
||||
|
|
||||
Contributing |
|
||||
------------ |
|
||||
Do you want to contribute? Please read our [contributing guidelines](https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md). |
|
||||
|
# OCA bank statement import modules for Odoo |
||||
|
|
||||
Translation Status |
|
||||
------------------ |
|
||||
[![Transifex Status](https://www.transifex.com/projects/p/OCA-bank-statement-import-11-0/chart/image_png)](https://www.transifex.com/projects/p/OCA-bank-statement-import-11-0) |
|
||||
|
This repository hosts additionnal parsers and import features for bank statements. |
||||
|
|
||||
---- |
|
||||
|
<!-- /!\ do not modify below this line --> |
||||
|
|
||||
|
<!-- prettier-ignore-start --> |
||||
|
|
||||
|
[//]: # (addons) |
||||
|
|
||||
|
Available addons |
||||
|
---------------- |
||||
|
addon | version | maintainers | summary |
||||
|
--- | --- | --- | --- |
||||
|
[account_bank_statement_clear_partner](account_bank_statement_clear_partner/) | 12.0.1.0.0 | | Clear all partners in bank statement lines |
||||
|
[account_bank_statement_import_bypass_check](account_bank_statement_import_bypass_check/) | 12.0.1.0.0 | | Allow possibility to bypass check in Bank statement import |
||||
|
[account_bank_statement_import_camt_oca](account_bank_statement_import_camt_oca/) | 12.0.1.0.1 | | CAMT Format Bank Statements Import |
||||
|
[account_bank_statement_import_move_line](account_bank_statement_import_move_line/) | 12.0.1.0.0 | [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) | Import journal items into bank statement |
||||
|
[account_bank_statement_import_ofx](account_bank_statement_import_ofx/) | 12.0.1.1.0 | | Import OFX Bank Statement |
||||
|
[account_bank_statement_import_online](account_bank_statement_import_online/) | 12.0.2.0.0 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Online bank statements update |
||||
|
[account_bank_statement_import_online_paypal](account_bank_statement_import_online_paypal/) | 12.0.1.1.0 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Online bank statements for PayPal.com |
||||
|
[account_bank_statement_import_online_ponto](account_bank_statement_import_online_ponto/) | 12.0.1.3.0 | | Online Bank Statements: MyPonto.com |
||||
|
[account_bank_statement_import_online_qonto](account_bank_statement_import_online_qonto/) | 12.0.1.0.0 | | Online Bank Statements: Qonto.eu |
||||
|
[account_bank_statement_import_online_transferwise](account_bank_statement_import_online_transferwise/) | 12.0.1.1.0 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Online bank statements for Wise.com (TransferWise.com) |
||||
|
[account_bank_statement_import_paypal](account_bank_statement_import_paypal/) | 12.0.2.2.4 | | Import PayPal CSV files as Bank Statements in Odoo |
||||
|
[account_bank_statement_import_save_file](account_bank_statement_import_save_file/) | 12.0.1.0.0 | | Keep imported bank statements as raw data |
||||
|
[account_bank_statement_import_split](account_bank_statement_import_split/) | 12.0.1.0.1 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Split statements by date during import |
||||
|
[account_bank_statement_import_transfer_move](account_bank_statement_import_transfer_move/) | 12.0.1.0.0 | | Bank Account Transfer Line |
||||
|
[account_bank_statement_import_txt_xlsx](account_bank_statement_import_txt_xlsx/) | 12.0.2.0.6 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Import TXT/CSV or XLSX files as Bank Statements in Odoo |
||||
|
|
||||
|
[//]: # (end addons) |
||||
|
|
||||
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. |
|
||||
|
<!-- prettier-ignore-end --> |
||||
|
|
||||
http://odoo-community.org/ |
|
||||
|
## 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 Odoo Community Association (OCA) |
||||
|
policy. Consult each module's `__manifest__.py` file, which contains a `license` key |
||||
|
that explains its license. |
||||
|
|
||||
|
---- |
||||
|
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. |
@ -0,0 +1,91 @@ |
|||||
|
========================================== |
||||
|
Clear all partners in bank statement lines |
||||
|
========================================== |
||||
|
|
||||
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
!! This file is generated by oca-gen-addon-readme !! |
||||
|
!! changes will be overwritten. !! |
||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
|
||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png |
||||
|
:target: https://odoo-community.org/page/development-status |
||||
|
:alt: Production/Stable |
||||
|
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github |
||||
|
:target: https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_clear_partner |
||||
|
:alt: OCA/bank-statement-import |
||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
||||
|
:target: https://translation.odoo-community.org/projects/bank-statement-import-12-0/bank-statement-import-12-0-account_bank_statement_clear_partner |
||||
|
:alt: Translate me on Weblate |
||||
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png |
||||
|
:target: https://runbot.odoo-community.org/runbot/174/12.0 |
||||
|
:alt: Try me on Runbot |
||||
|
|
||||
|
|badge1| |badge2| |badge3| |badge4| |badge5| |
||||
|
|
||||
|
|
||||
|
This module extends the functionality of `account_bank_statement` to allow you to **Clear all partners in a bank statement lines** where the line hasn't been **reconciled**. |
||||
|
|
||||
|
**Table of contents** |
||||
|
|
||||
|
.. contents:: |
||||
|
:local: |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
|
||||
|
To use this module, you need to: |
||||
|
|
||||
|
#. Enable the **Show Full Accounting Features** option for your user under **Settings** > **Users & Companies** > **Users** |
||||
|
#. Go to **Invoicing** |
||||
|
#. Click on the name of a bank journal (**Bank** in demo data for example) |
||||
|
#. Select a bank statement |
||||
|
#. Press "Clear partners" button located on the header. |
||||
|
#. All the partners in non reconciled lines will be cleared. |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-statement-import/issues>`_. |
||||
|
In case of trouble, please check there if your issue has already been reported. |
||||
|
If you spotted it first, help us smashing it by providing a detailed and welcomed |
||||
|
`feedback <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_bank_statement_clear_partner%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
||||
|
|
||||
|
Do not contact contributors directly about support or help with technical issues. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Authors |
||||
|
~~~~~~~ |
||||
|
|
||||
|
* Tecnativa |
||||
|
|
||||
|
Contributors |
||||
|
~~~~~~~~~~~~ |
||||
|
|
||||
|
|
||||
|
* `Tecnativa <https://www.tecnativa.com>`__: |
||||
|
|
||||
|
* João Marques |
||||
|
* Pedro M. Baeza |
||||
|
|
||||
|
Maintainers |
||||
|
~~~~~~~~~~~ |
||||
|
|
||||
|
This module is maintained by the OCA. |
||||
|
|
||||
|
.. image:: https://odoo-community.org/logo.png |
||||
|
:alt: Odoo Community Association |
||||
|
:target: https://odoo-community.org |
||||
|
|
||||
|
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. |
||||
|
|
||||
|
This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_clear_partner>`_ project on GitHub. |
||||
|
|
||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
@ -0,0 +1,3 @@ |
|||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
from . import models |
@ -0,0 +1,18 @@ |
|||||
|
# Copyright 2020 Tecnativa - João Marques |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
||||
|
{ |
||||
|
"name": "Clear all partners in bank statement lines", |
||||
|
"version": "12.0.1.0.0", |
||||
|
# see https://odoo-community.org/page/development-status |
||||
|
"development_status": "Production/Stable", |
||||
|
"category": "Invoicing Management", |
||||
|
"website": "https://github.com/OCA/bank-statement-import", |
||||
|
"author": "Tecnativa, Odoo Community Association (OCA)", |
||||
|
"license": "AGPL-3", |
||||
|
"depends": [ |
||||
|
'account', |
||||
|
], |
||||
|
"data": [ |
||||
|
"views/account_bank_statement_views.xml" |
||||
|
] |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * account_bank_statement_clear_partner |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 12.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: \n" |
||||
|
|
||||
|
#. module: account_bank_statement_clear_partner |
||||
|
#: model:ir.model,name:account_bank_statement_clear_partner.model_account_bank_statement |
||||
|
msgid "Bank Statement" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: account_bank_statement_clear_partner |
||||
|
#: model_terms:ir.ui.view,arch_db:account_bank_statement_clear_partner.view_bank_statement_form |
||||
|
msgid "Clear partners" |
||||
|
msgstr "" |
||||
|
|
@ -0,0 +1,27 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * account_bank_statement_clear_partner |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 12.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"PO-Revision-Date: 2021-01-20 18:44+0000\n" |
||||
|
"Last-Translator: Bosd <c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>\n" |
||||
|
"Language-Team: none\n" |
||||
|
"Language: nl\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n" |
||||
|
"X-Generator: Weblate 4.3.2\n" |
||||
|
|
||||
|
#. module: account_bank_statement_clear_partner |
||||
|
#: model:ir.model,name:account_bank_statement_clear_partner.model_account_bank_statement |
||||
|
msgid "Bank Statement" |
||||
|
msgstr "Bank afschriften" |
||||
|
|
||||
|
#. module: account_bank_statement_clear_partner |
||||
|
#: model_terms:ir.ui.view,arch_db:account_bank_statement_clear_partner.view_bank_statement_form |
||||
|
msgid "Clear partners" |
||||
|
msgstr "" |
@ -0,0 +1,3 @@ |
|||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
from . import account_bank_statement |
@ -0,0 +1,13 @@ |
|||||
|
# Copyright 2020 Tecnativa - João Marques |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
from odoo import models |
||||
|
|
||||
|
|
||||
|
class AccountBankStatementClearPartner(models.Model): |
||||
|
_inherit = "account.bank.statement" |
||||
|
|
||||
|
def clear_partners(self): |
||||
|
self.mapped("line_ids").filtered( |
||||
|
lambda x: not x.journal_entry_ids and not x.account_id |
||||
|
).write({"partner_id": False}) |
@ -0,0 +1,5 @@ |
|||||
|
|
||||
|
* `Tecnativa <https://www.tecnativa.com>`__: |
||||
|
|
||||
|
* João Marques |
||||
|
* Pedro M. Baeza |
@ -0,0 +1,2 @@ |
|||||
|
|
||||
|
This module extends the functionality of `account_bank_statement` to allow you to **Clear all partners in a bank statement lines** where the line hasn't been **reconciled**. |
@ -0,0 +1,9 @@ |
|||||
|
|
||||
|
To use this module, you need to: |
||||
|
|
||||
|
#. Enable the **Show Full Accounting Features** option for your user under **Settings** > **Users & Companies** > **Users** |
||||
|
#. Go to **Invoicing** |
||||
|
#. Click on the name of a bank journal (**Bank** in demo data for example) |
||||
|
#. Select a bank statement |
||||
|
#. Press "Clear partners" button located on the header. |
||||
|
#. All the partners in non reconciled lines will be cleared. |
Before Width: 128 | Height: 128 | Size: 9.2 KiB After Width: 128 | Height: 128 | Size: 9.2 KiB |
@ -0,0 +1,436 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
||||
|
<head> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
|
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> |
||||
|
<title>Clear all partners in bank statement lines</title> |
||||
|
<style type="text/css"> |
||||
|
|
||||
|
/* |
||||
|
:Author: David Goodger (goodger@python.org) |
||||
|
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $ |
||||
|
:Copyright: This stylesheet has been placed in the public domain. |
||||
|
|
||||
|
Default cascading style sheet for the HTML output of Docutils. |
||||
|
|
||||
|
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to |
||||
|
customize this style sheet. |
||||
|
*/ |
||||
|
|
||||
|
/* used to remove borders from tables and images */ |
||||
|
.borderless, table.borderless td, table.borderless th { |
||||
|
border: 0 } |
||||
|
|
||||
|
table.borderless td, table.borderless th { |
||||
|
/* Override padding for "table.docutils td" with "! important". |
||||
|
The right padding separates the table cells. */ |
||||
|
padding: 0 0.5em 0 0 ! important } |
||||
|
|
||||
|
.first { |
||||
|
/* Override more specific margin styles with "! important". */ |
||||
|
margin-top: 0 ! important } |
||||
|
|
||||
|
.last, .with-subtitle { |
||||
|
margin-bottom: 0 ! important } |
||||
|
|
||||
|
.hidden { |
||||
|
display: none } |
||||
|
|
||||
|
.subscript { |
||||
|
vertical-align: sub; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
.superscript { |
||||
|
vertical-align: super; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
a.toc-backref { |
||||
|
text-decoration: none ; |
||||
|
color: black } |
||||
|
|
||||
|
blockquote.epigraph { |
||||
|
margin: 2em 5em ; } |
||||
|
|
||||
|
dl.docutils dd { |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms |
||||
|
dl.docutils dt { |
||||
|
font-weight: bold } |
||||
|
*/ |
||||
|
|
||||
|
div.abstract { |
||||
|
margin: 2em 5em } |
||||
|
|
||||
|
div.abstract p.topic-title { |
||||
|
font-weight: bold ; |
||||
|
text-align: center } |
||||
|
|
||||
|
div.admonition, div.attention, div.caution, div.danger, div.error, |
||||
|
div.hint, div.important, div.note, div.tip, div.warning { |
||||
|
margin: 2em ; |
||||
|
border: medium outset ; |
||||
|
padding: 1em } |
||||
|
|
||||
|
div.admonition p.admonition-title, div.hint p.admonition-title, |
||||
|
div.important p.admonition-title, div.note p.admonition-title, |
||||
|
div.tip p.admonition-title { |
||||
|
font-weight: bold ; |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
div.attention p.admonition-title, div.caution p.admonition-title, |
||||
|
div.danger p.admonition-title, div.error p.admonition-title, |
||||
|
div.warning p.admonition-title, .code .error { |
||||
|
color: red ; |
||||
|
font-weight: bold ; |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in |
||||
|
compound paragraphs. |
||||
|
div.compound .compound-first, div.compound .compound-middle { |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
div.compound .compound-last, div.compound .compound-middle { |
||||
|
margin-top: 0.5em } |
||||
|
*/ |
||||
|
|
||||
|
div.dedication { |
||||
|
margin: 2em 5em ; |
||||
|
text-align: center ; |
||||
|
font-style: italic } |
||||
|
|
||||
|
div.dedication p.topic-title { |
||||
|
font-weight: bold ; |
||||
|
font-style: normal } |
||||
|
|
||||
|
div.figure { |
||||
|
margin-left: 2em ; |
||||
|
margin-right: 2em } |
||||
|
|
||||
|
div.footer, div.header { |
||||
|
clear: both; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
div.line-block { |
||||
|
display: block ; |
||||
|
margin-top: 1em ; |
||||
|
margin-bottom: 1em } |
||||
|
|
||||
|
div.line-block div.line-block { |
||||
|
margin-top: 0 ; |
||||
|
margin-bottom: 0 ; |
||||
|
margin-left: 1.5em } |
||||
|
|
||||
|
div.sidebar { |
||||
|
margin: 0 0 0.5em 1em ; |
||||
|
border: medium outset ; |
||||
|
padding: 1em ; |
||||
|
background-color: #ffffee ; |
||||
|
width: 40% ; |
||||
|
float: right ; |
||||
|
clear: right } |
||||
|
|
||||
|
div.sidebar p.rubric { |
||||
|
font-family: sans-serif ; |
||||
|
font-size: medium } |
||||
|
|
||||
|
div.system-messages { |
||||
|
margin: 5em } |
||||
|
|
||||
|
div.system-messages h1 { |
||||
|
color: red } |
||||
|
|
||||
|
div.system-message { |
||||
|
border: medium outset ; |
||||
|
padding: 1em } |
||||
|
|
||||
|
div.system-message p.system-message-title { |
||||
|
color: red ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
div.topic { |
||||
|
margin: 2em } |
||||
|
|
||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, |
||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { |
||||
|
margin-top: 0.4em } |
||||
|
|
||||
|
h1.title { |
||||
|
text-align: center } |
||||
|
|
||||
|
h2.subtitle { |
||||
|
text-align: center } |
||||
|
|
||||
|
hr.docutils { |
||||
|
width: 75% } |
||||
|
|
||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left { |
||||
|
clear: left ; |
||||
|
float: left ; |
||||
|
margin-right: 1em } |
||||
|
|
||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right { |
||||
|
clear: right ; |
||||
|
float: right ; |
||||
|
margin-left: 1em } |
||||
|
|
||||
|
img.align-center, .figure.align-center, object.align-center { |
||||
|
display: block; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
|
||||
|
table.align-center { |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
|
||||
|
.align-left { |
||||
|
text-align: left } |
||||
|
|
||||
|
.align-center { |
||||
|
clear: both ; |
||||
|
text-align: center } |
||||
|
|
||||
|
.align-right { |
||||
|
text-align: right } |
||||
|
|
||||
|
/* reset inner alignment in figures */ |
||||
|
div.align-right { |
||||
|
text-align: inherit } |
||||
|
|
||||
|
/* div.align-center * { */ |
||||
|
/* text-align: left } */ |
||||
|
|
||||
|
.align-top { |
||||
|
vertical-align: top } |
||||
|
|
||||
|
.align-middle { |
||||
|
vertical-align: middle } |
||||
|
|
||||
|
.align-bottom { |
||||
|
vertical-align: bottom } |
||||
|
|
||||
|
ol.simple, ul.simple { |
||||
|
margin-bottom: 1em } |
||||
|
|
||||
|
ol.arabic { |
||||
|
list-style: decimal } |
||||
|
|
||||
|
ol.loweralpha { |
||||
|
list-style: lower-alpha } |
||||
|
|
||||
|
ol.upperalpha { |
||||
|
list-style: upper-alpha } |
||||
|
|
||||
|
ol.lowerroman { |
||||
|
list-style: lower-roman } |
||||
|
|
||||
|
ol.upperroman { |
||||
|
list-style: upper-roman } |
||||
|
|
||||
|
p.attribution { |
||||
|
text-align: right ; |
||||
|
margin-left: 50% } |
||||
|
|
||||
|
p.caption { |
||||
|
font-style: italic } |
||||
|
|
||||
|
p.credits { |
||||
|
font-style: italic ; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
p.label { |
||||
|
white-space: nowrap } |
||||
|
|
||||
|
p.rubric { |
||||
|
font-weight: bold ; |
||||
|
font-size: larger ; |
||||
|
color: maroon ; |
||||
|
text-align: center } |
||||
|
|
||||
|
p.sidebar-title { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold ; |
||||
|
font-size: larger } |
||||
|
|
||||
|
p.sidebar-subtitle { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
p.topic-title { |
||||
|
font-weight: bold } |
||||
|
|
||||
|
pre.address { |
||||
|
margin-bottom: 0 ; |
||||
|
margin-top: 0 ; |
||||
|
font: inherit } |
||||
|
|
||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code { |
||||
|
margin-left: 2em ; |
||||
|
margin-right: 2em } |
||||
|
|
||||
|
pre.code .ln { color: grey; } /* line numbers */ |
||||
|
pre.code, code { background-color: #eeeeee } |
||||
|
pre.code .comment, code .comment { color: #5C6576 } |
||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } |
||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 } |
||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 } |
||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1} |
||||
|
pre.code .inserted, code .inserted { background-color: #A3D289} |
||||
|
|
||||
|
span.classifier { |
||||
|
font-family: sans-serif ; |
||||
|
font-style: oblique } |
||||
|
|
||||
|
span.classifier-delimiter { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
span.interpreted { |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
span.option { |
||||
|
white-space: nowrap } |
||||
|
|
||||
|
span.pre { |
||||
|
white-space: pre } |
||||
|
|
||||
|
span.problematic { |
||||
|
color: red } |
||||
|
|
||||
|
span.section-subtitle { |
||||
|
/* font-size relative to parent (h1..h6 element) */ |
||||
|
font-size: 80% } |
||||
|
|
||||
|
table.citation { |
||||
|
border-left: solid 1px gray; |
||||
|
margin-left: 1px } |
||||
|
|
||||
|
table.docinfo { |
||||
|
margin: 2em 4em } |
||||
|
|
||||
|
table.docutils { |
||||
|
margin-top: 0.5em ; |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
table.footnote { |
||||
|
border-left: solid 1px black; |
||||
|
margin-left: 1px } |
||||
|
|
||||
|
table.docutils td, table.docutils th, |
||||
|
table.docinfo td, table.docinfo th { |
||||
|
padding-left: 0.5em ; |
||||
|
padding-right: 0.5em ; |
||||
|
vertical-align: top } |
||||
|
|
||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name { |
||||
|
font-weight: bold ; |
||||
|
text-align: left ; |
||||
|
white-space: nowrap ; |
||||
|
padding-left: 0 } |
||||
|
|
||||
|
/* "booktabs" style (no vertical lines) */ |
||||
|
table.docutils.booktabs { |
||||
|
border: 0px; |
||||
|
border-top: 2px solid; |
||||
|
border-bottom: 2px solid; |
||||
|
border-collapse: collapse; |
||||
|
} |
||||
|
table.docutils.booktabs * { |
||||
|
border: 0px; |
||||
|
} |
||||
|
table.docutils.booktabs th { |
||||
|
border-bottom: thin solid; |
||||
|
text-align: left; |
||||
|
} |
||||
|
|
||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, |
||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { |
||||
|
font-size: 100% } |
||||
|
|
||||
|
ul.auto-toc { |
||||
|
list-style-type: none } |
||||
|
|
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="document" id="clear-all-partners-in-bank-statement-lines"> |
||||
|
<h1 class="title">Clear all partners in bank statement lines</h1> |
||||
|
|
||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
!! This file is generated by oca-gen-addon-readme !! |
||||
|
!! changes will be overwritten. !! |
||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> |
||||
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_clear_partner"><img alt="OCA/bank-statement-import" src="https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-statement-import-12-0/bank-statement-import-12-0-account_bank_statement_clear_partner"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/174/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> |
||||
|
<p>This module extends the functionality of <cite>account_bank_statement</cite> to allow you to <strong>Clear all partners in a bank statement lines</strong> where the line hasn’t been <strong>reconciled</strong>.</p> |
||||
|
<p><strong>Table of contents</strong></p> |
||||
|
<div class="contents local topic" id="contents"> |
||||
|
<ul class="simple"> |
||||
|
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li> |
||||
|
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li> |
||||
|
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul> |
||||
|
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li> |
||||
|
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li> |
||||
|
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="usage"> |
||||
|
<h1><a class="toc-backref" href="#id1">Usage</a></h1> |
||||
|
<p>To use this module, you need to:</p> |
||||
|
<ol class="arabic simple"> |
||||
|
<li>Enable the <strong>Show Full Accounting Features</strong> option for your user under <strong>Settings</strong> > <strong>Users & Companies</strong> > <strong>Users</strong></li> |
||||
|
<li>Go to <strong>Invoicing</strong></li> |
||||
|
<li>Click on the name of a bank journal (<strong>Bank</strong> in demo data for example)</li> |
||||
|
<li>Select a bank statement</li> |
||||
|
<li>Press “Clear partners” button located on the header.</li> |
||||
|
<li>All the partners in non reconciled lines will be cleared.</li> |
||||
|
</ol> |
||||
|
</div> |
||||
|
<div class="section" id="bug-tracker"> |
||||
|
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1> |
||||
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-statement-import/issues">GitHub Issues</a>. |
||||
|
In case of trouble, please check there if your issue has already been reported. |
||||
|
If you spotted it first, help us smashing it by providing a detailed and welcomed |
||||
|
<a class="reference external" href="https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_bank_statement_clear_partner%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> |
||||
|
<p>Do not contact contributors directly about support or help with technical issues.</p> |
||||
|
</div> |
||||
|
<div class="section" id="credits"> |
||||
|
<h1><a class="toc-backref" href="#id3">Credits</a></h1> |
||||
|
<div class="section" id="authors"> |
||||
|
<h2><a class="toc-backref" href="#id4">Authors</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li>Tecnativa</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="contributors"> |
||||
|
<h2><a class="toc-backref" href="#id5">Contributors</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul> |
||||
|
<li>João Marques</li> |
||||
|
<li>Pedro M. Baeza</li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="maintainers"> |
||||
|
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2> |
||||
|
<p>This module is maintained by the OCA.</p> |
||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> |
||||
|
<p>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.</p> |
||||
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_clear_partner">OCA/bank-statement-import</a> project on GitHub.</p> |
||||
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,3 @@ |
|||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0 |
||||
|
|
||||
|
from . import test_account_bank_statement_clear_patner |
@ -0,0 +1,83 @@ |
|||||
|
# Copyright 2020 Tecnativa - João Marques |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0 |
||||
|
|
||||
|
from odoo.tests import common |
||||
|
|
||||
|
|
||||
|
class TestAccountBankStatementClearPartner(common.SavepointCase): |
||||
|
@classmethod |
||||
|
def setUpClass(cls): |
||||
|
super(TestAccountBankStatementClearPartner, cls).setUpClass() |
||||
|
cls.partner_1 = cls.env['res.partner'].create( |
||||
|
{ |
||||
|
"name": "Partner 1", |
||||
|
} |
||||
|
) |
||||
|
cls.partner_2 = cls.env['res.partner'].create( |
||||
|
{ |
||||
|
"name": "Partner 2", |
||||
|
} |
||||
|
) |
||||
|
cls.account_type_1 = cls.env['account.account.type'].create({ |
||||
|
"name": "Test Account Type 1", |
||||
|
"type": "other" |
||||
|
}) |
||||
|
cls.account_1 = cls.env['account.account'].create({ |
||||
|
"name": "Test Account 1", |
||||
|
"code": "AAAAAAAAAAAAAAAA", |
||||
|
"user_type_id": cls.account_type_1.id, |
||||
|
}) |
||||
|
cls.sequence_1 = cls.env['ir.sequence'].create({ |
||||
|
"name": "Test Sequence 1", |
||||
|
}) |
||||
|
cls.journal_1 = cls.env['account.journal'].create({ |
||||
|
"name": "Test Journal 1", |
||||
|
"type": "bank", |
||||
|
"sequence_id": cls.sequence_1.id, |
||||
|
}) |
||||
|
cls.statement_1 = cls.env["account.bank.statement"].create({ |
||||
|
"name": "Test Bank Statement 1", |
||||
|
"journal_id": cls.journal_1.id, |
||||
|
}) |
||||
|
cls.account_move_1 = cls.env["account.move"].create({ |
||||
|
"name": "Test Account Move 1", |
||||
|
"journal_id": cls.journal_1.id, |
||||
|
}) |
||||
|
cls.account_move_line_1 = cls.env["account.move.line"].create({ |
||||
|
"move_id": cls.account_move_1.id, |
||||
|
"account_id": cls.account_1.id, |
||||
|
}) |
||||
|
line_obj = cls.env["account.bank.statement.line"] |
||||
|
cls.st_line_w_partner_not_reconciled = line_obj.create({ |
||||
|
"name": "Test Account Bank Statement 1", |
||||
|
"statement_id": cls.statement_1.id, |
||||
|
"partner_id": cls.partner_1.id, |
||||
|
"journal_entry_ids": False, |
||||
|
"account_id": False, |
||||
|
}) |
||||
|
cls.st_line_wo_partner_not_reconciled = line_obj.create({ |
||||
|
"name": "Test Account Bank Statement 2", |
||||
|
"statement_id": cls.statement_1.id, |
||||
|
"partner_id": False, |
||||
|
"journal_entry_ids": False, |
||||
|
"account_id": False, |
||||
|
}) |
||||
|
cls.st_line_w_partner_reconciled = line_obj.create({ |
||||
|
"name": "Test Account Bank Statement 3", |
||||
|
"statement_id": cls.statement_1.id, |
||||
|
"partner_id": cls.partner_2.id, |
||||
|
}) |
||||
|
cls.account_move_line_1.write({ |
||||
|
"statement_line_id": cls.st_line_w_partner_reconciled.id, |
||||
|
}) |
||||
|
|
||||
|
def test_bank_statements_clear_partner(self): |
||||
|
self.statement_1.clear_partners() |
||||
|
# Confirm statement_line_1 has no parter |
||||
|
self.assertFalse( |
||||
|
self.st_line_w_partner_not_reconciled.partner_id |
||||
|
) |
||||
|
# Confirm statement_line_3 still has partner because it was already reconciled |
||||
|
self.assertTrue( |
||||
|
self.st_line_w_partner_reconciled.partner_id |
||||
|
) |
@ -0,0 +1,15 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- Copyright 2020 Tecnativa - João Marques |
||||
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> |
||||
|
|
||||
|
<odoo> |
||||
|
<record id="view_bank_statement_form" model="ir.ui.view"> |
||||
|
<field name="model">account.bank.statement</field> |
||||
|
<field name="inherit_id" ref="account.view_bank_statement_form"></field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<button name="%(account.action_bank_reconcile_bank_statements)d" position="after"> |
||||
|
<button name="clear_partners" string="Clear partners" type="object" class="oe_highlight" attrs="{'invisible':['|','|',('all_lines_reconciled','=',True),('line_ids','=',[]),('state', '!=', 'open')]}"/> |
||||
|
</button> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,86 @@ |
|||||
|
================================== |
||||
|
Bypass check Bank statement import |
||||
|
================================== |
||||
|
|
||||
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
!! This file is generated by oca-gen-addon-readme !! |
||||
|
!! changes will be overwritten. !! |
||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
|
||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
||||
|
:target: https://odoo-community.org/page/development-status |
||||
|
:alt: Beta |
||||
|
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github |
||||
|
:target: https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_import_bypass_check |
||||
|
:alt: OCA/bank-statement-import |
||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
||||
|
:target: https://translation.odoo-community.org/projects/bank-statement-import-12-0/bank-statement-import-12-0-account_bank_statement_import_bypass_check |
||||
|
:alt: Translate me on Weblate |
||||
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png |
||||
|
:target: https://runbot.odoo-community.org/runbot/174/12.0 |
||||
|
:alt: Try me on Runbot |
||||
|
|
||||
|
|badge1| |badge2| |badge3| |badge4| |badge5| |
||||
|
|
||||
|
This module adds a check button to bypass the check if account of this statement is not the same as the journal. |
||||
|
|
||||
|
**Table of contents** |
||||
|
|
||||
|
.. contents:: |
||||
|
:local: |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
#. Go to Accounting > Dashboard. |
||||
|
#. On one bank click button "Import". |
||||
|
#. Upload on statement file. |
||||
|
#. Click button "Import". |
||||
|
#. If account of this statement is not the same as the journal in your file: |
||||
|
#. You have error message printed in the wizard + the possibility do force the import. |
||||
|
#. You can check the boolean field and retry the import if you want. |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-statement-import/issues>`_. |
||||
|
In case of trouble, please check there if your issue has already been reported. |
||||
|
If you spotted it first, help us smashing it by providing a detailed and welcomed |
||||
|
`feedback <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_bank_statement_import_bypass_check%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
||||
|
|
||||
|
Do not contact contributors directly about support or help with technical issues. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Authors |
||||
|
~~~~~~~ |
||||
|
|
||||
|
* Camptocamp |
||||
|
|
||||
|
Contributors |
||||
|
~~~~~~~~~~~~ |
||||
|
|
||||
|
* `Camptoamp <https://www.camptocamp.com>`_: |
||||
|
|
||||
|
* Thomas Nowicki |
||||
|
|
||||
|
Maintainers |
||||
|
~~~~~~~~~~~ |
||||
|
|
||||
|
This module is maintained by the OCA. |
||||
|
|
||||
|
.. image:: https://odoo-community.org/logo.png |
||||
|
:alt: Odoo Community Association |
||||
|
:target: https://odoo-community.org |
||||
|
|
||||
|
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. |
||||
|
|
||||
|
This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_import_bypass_check>`_ project on GitHub. |
||||
|
|
||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
@ -0,0 +1 @@ |
|||||
|
from . import wizard |
@ -0,0 +1,21 @@ |
|||||
|
# Copyright 2019 Camptocamp SA |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
|
{ |
||||
|
'name': 'Bypass check Bank statement import', |
||||
|
'version': '12.0.1.0.0', |
||||
|
'category': 'Accounting', |
||||
|
'summary': 'Allow possibility to bypass check in Bank statement import', |
||||
|
'author': 'Camptocamp, ' |
||||
|
'Odoo Community Association (OCA)', |
||||
|
'maintainer': 'Camptocamp', |
||||
|
'website': 'https://github.com/OCA/bank-statement-import', |
||||
|
'depends': [ |
||||
|
'account_bank_statement_import', |
||||
|
], |
||||
|
'data': [ |
||||
|
'wizard/account_bank_statement_import_view.xml', |
||||
|
], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * account_bank_statement_import_bypass_check |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 12.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: \n" |
||||
|
|
||||
|
#. module: account_bank_statement_import_bypass_check |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_bypass_check.field_account_bank_statement_import__check_journal |
||||
|
msgid "Check Journal" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: account_bank_statement_import_bypass_check |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_bypass_check.field_account_bank_statement_import__check_message |
||||
|
msgid "Check Message" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: account_bank_statement_import_bypass_check |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_bypass_check.field_account_bank_statement_import__force_journal |
||||
|
msgid "Do you want to force this import ?" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: account_bank_statement_import_bypass_check |
||||
|
#: model:ir.model,name:account_bank_statement_import_bypass_check.model_account_bank_statement_import |
||||
|
msgid "Import Bank Statement" |
||||
|
msgstr "" |
||||
|
|
@ -0,0 +1,37 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * account_bank_statement_import_bypass_check |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 12.0+e\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2019-12-12 10:54+0000\n" |
||||
|
"PO-Revision-Date: 2019-12-12 10:54+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"Language: \n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: \n" |
||||
|
|
||||
|
#. module: account_bank_statement_import_bypass_check |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_bypass_check.field_account_bank_statement_import__check_journal |
||||
|
msgid "Check Journal" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: account_bank_statement_import_bypass_check |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_bypass_check.field_account_bank_statement_import__check_message |
||||
|
msgid "Check Message" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: account_bank_statement_import_bypass_check |
||||
|
#: model:ir.model.fields,field_description:account_bank_statement_import_bypass_check.field_account_bank_statement_import__force_journal |
||||
|
msgid "Do you want to force this import ?" |
||||
|
msgstr "Voulez-vous forcer cet import ?" |
||||
|
|
||||
|
#. module: account_bank_statement_import_bypass_check |
||||
|
#: model:ir.model,name:account_bank_statement_import_bypass_check.model_account_bank_statement_import |
||||
|
msgid "Import Bank Statement" |
||||
|
msgstr "Import d'un relevé bancaire" |
@ -0,0 +1,3 @@ |
|||||
|
* `Camptoamp <https://www.camptocamp.com>`_: |
||||
|
|
||||
|
* Thomas Nowicki |
@ -0,0 +1 @@ |
|||||
|
This module adds a check button to bypass the check if account of this statement is not the same as the journal. |
@ -0,0 +1,7 @@ |
|||||
|
#. Go to Accounting > Dashboard. |
||||
|
#. On one bank click button "Import". |
||||
|
#. Upload on statement file. |
||||
|
#. Click button "Import". |
||||
|
#. If account of this statement is not the same as the journal in your file: |
||||
|
#. You have error message printed in the wizard + the possibility do force the import. |
||||
|
#. You can check the boolean field and retry the import if you want. |
After Width: 128 | Height: 128 | Size: 9.2 KiB |
@ -0,0 +1,435 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
||||
|
<head> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
|
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> |
||||
|
<title>Bypass check Bank statement import</title> |
||||
|
<style type="text/css"> |
||||
|
|
||||
|
/* |
||||
|
:Author: David Goodger (goodger@python.org) |
||||
|
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $ |
||||
|
:Copyright: This stylesheet has been placed in the public domain. |
||||
|
|
||||
|
Default cascading style sheet for the HTML output of Docutils. |
||||
|
|
||||
|
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to |
||||
|
customize this style sheet. |
||||
|
*/ |
||||
|
|
||||
|
/* used to remove borders from tables and images */ |
||||
|
.borderless, table.borderless td, table.borderless th { |
||||
|
border: 0 } |
||||
|
|
||||
|
table.borderless td, table.borderless th { |
||||
|
/* Override padding for "table.docutils td" with "! important". |
||||
|
The right padding separates the table cells. */ |
||||
|
padding: 0 0.5em 0 0 ! important } |
||||
|
|
||||
|
.first { |
||||
|
/* Override more specific margin styles with "! important". */ |
||||
|
margin-top: 0 ! important } |
||||
|
|
||||
|
.last, .with-subtitle { |
||||
|
margin-bottom: 0 ! important } |
||||
|
|
||||
|
.hidden { |
||||
|
display: none } |
||||
|
|
||||
|
.subscript { |
||||
|
vertical-align: sub; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
.superscript { |
||||
|
vertical-align: super; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
a.toc-backref { |
||||
|
text-decoration: none ; |
||||
|
color: black } |
||||
|
|
||||
|
blockquote.epigraph { |
||||
|
margin: 2em 5em ; } |
||||
|
|
||||
|
dl.docutils dd { |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms |
||||
|
dl.docutils dt { |
||||
|
font-weight: bold } |
||||
|
*/ |
||||
|
|
||||
|
div.abstract { |
||||
|
margin: 2em 5em } |
||||
|
|
||||
|
div.abstract p.topic-title { |
||||
|
font-weight: bold ; |
||||
|
text-align: center } |
||||
|
|
||||
|
div.admonition, div.attention, div.caution, div.danger, div.error, |
||||
|
div.hint, div.important, div.note, div.tip, div.warning { |
||||
|
margin: 2em ; |
||||
|
border: medium outset ; |
||||
|
padding: 1em } |
||||
|
|
||||
|
div.admonition p.admonition-title, div.hint p.admonition-title, |
||||
|
div.important p.admonition-title, div.note p.admonition-title, |
||||
|
div.tip p.admonition-title { |
||||
|
font-weight: bold ; |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
div.attention p.admonition-title, div.caution p.admonition-title, |
||||
|
div.danger p.admonition-title, div.error p.admonition-title, |
||||
|
div.warning p.admonition-title, .code .error { |
||||
|
color: red ; |
||||
|
font-weight: bold ; |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in |
||||
|
compound paragraphs. |
||||
|
div.compound .compound-first, div.compound .compound-middle { |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
div.compound .compound-last, div.compound .compound-middle { |
||||
|
margin-top: 0.5em } |
||||
|
*/ |
||||
|
|
||||
|
div.dedication { |
||||
|
margin: 2em 5em ; |
||||
|
text-align: center ; |
||||
|
font-style: italic } |
||||
|
|
||||
|
div.dedication p.topic-title { |
||||
|
font-weight: bold ; |
||||
|
font-style: normal } |
||||
|
|
||||
|
div.figure { |
||||
|
margin-left: 2em ; |
||||
|
margin-right: 2em } |
||||
|
|
||||
|
div.footer, div.header { |
||||
|
clear: both; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
div.line-block { |
||||
|
display: block ; |
||||
|
margin-top: 1em ; |
||||
|
margin-bottom: 1em } |
||||
|
|
||||
|
div.line-block div.line-block { |
||||
|
margin-top: 0 ; |
||||
|
margin-bottom: 0 ; |
||||
|
margin-left: 1.5em } |
||||
|
|
||||
|
div.sidebar { |
||||
|
margin: 0 0 0.5em 1em ; |
||||
|
border: medium outset ; |
||||
|
padding: 1em ; |
||||
|
background-color: #ffffee ; |
||||
|
width: 40% ; |
||||
|
float: right ; |
||||
|
clear: right } |
||||
|
|
||||
|
div.sidebar p.rubric { |
||||
|
font-family: sans-serif ; |
||||
|
font-size: medium } |
||||
|
|
||||
|
div.system-messages { |
||||
|
margin: 5em } |
||||
|
|
||||
|
div.system-messages h1 { |
||||
|
color: red } |
||||
|
|
||||
|
div.system-message { |
||||
|
border: medium outset ; |
||||
|
padding: 1em } |
||||
|
|
||||
|
div.system-message p.system-message-title { |
||||
|
color: red ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
div.topic { |
||||
|
margin: 2em } |
||||
|
|
||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, |
||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { |
||||
|
margin-top: 0.4em } |
||||
|
|
||||
|
h1.title { |
||||
|
text-align: center } |
||||
|
|
||||
|
h2.subtitle { |
||||
|
text-align: center } |
||||
|
|
||||
|
hr.docutils { |
||||
|
width: 75% } |
||||
|
|
||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left { |
||||
|
clear: left ; |
||||
|
float: left ; |
||||
|
margin-right: 1em } |
||||
|
|
||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right { |
||||
|
clear: right ; |
||||
|
float: right ; |
||||
|
margin-left: 1em } |
||||
|
|
||||
|
img.align-center, .figure.align-center, object.align-center { |
||||
|
display: block; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
|
||||
|
table.align-center { |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
|
||||
|
.align-left { |
||||
|
text-align: left } |
||||
|
|
||||
|
.align-center { |
||||
|
clear: both ; |
||||
|
text-align: center } |
||||
|
|
||||
|
.align-right { |
||||
|
text-align: right } |
||||
|
|
||||
|
/* reset inner alignment in figures */ |
||||
|
div.align-right { |
||||
|
text-align: inherit } |
||||
|
|
||||
|
/* div.align-center * { */ |
||||
|
/* text-align: left } */ |
||||
|
|
||||
|
.align-top { |
||||
|
vertical-align: top } |
||||
|
|
||||
|
.align-middle { |
||||
|
vertical-align: middle } |
||||
|
|
||||
|
.align-bottom { |
||||
|
vertical-align: bottom } |
||||
|
|
||||
|
ol.simple, ul.simple { |
||||
|
margin-bottom: 1em } |
||||
|
|
||||
|
ol.arabic { |
||||
|
list-style: decimal } |
||||
|
|
||||
|
ol.loweralpha { |
||||
|
list-style: lower-alpha } |
||||
|
|
||||
|
ol.upperalpha { |
||||
|
list-style: upper-alpha } |
||||
|
|
||||
|
ol.lowerroman { |
||||
|
list-style: lower-roman } |
||||
|
|
||||
|
ol.upperroman { |
||||
|
list-style: upper-roman } |
||||
|
|
||||
|
p.attribution { |
||||
|
text-align: right ; |
||||
|
margin-left: 50% } |
||||
|
|
||||
|
p.caption { |
||||
|
font-style: italic } |
||||
|
|
||||
|
p.credits { |
||||
|
font-style: italic ; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
p.label { |
||||
|
white-space: nowrap } |
||||
|
|
||||
|
p.rubric { |
||||
|
font-weight: bold ; |
||||
|
font-size: larger ; |
||||
|
color: maroon ; |
||||
|
text-align: center } |
||||
|
|
||||
|
p.sidebar-title { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold ; |
||||
|
font-size: larger } |
||||
|
|
||||
|
p.sidebar-subtitle { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
p.topic-title { |
||||
|
font-weight: bold } |
||||
|
|
||||
|
pre.address { |
||||
|
margin-bottom: 0 ; |
||||
|
margin-top: 0 ; |
||||
|
font: inherit } |
||||
|
|
||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code { |
||||
|
margin-left: 2em ; |
||||
|
margin-right: 2em } |
||||
|
|
||||
|
pre.code .ln { color: grey; } /* line numbers */ |
||||
|
pre.code, code { background-color: #eeeeee } |
||||
|
pre.code .comment, code .comment { color: #5C6576 } |
||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } |
||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 } |
||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 } |
||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1} |
||||
|
pre.code .inserted, code .inserted { background-color: #A3D289} |
||||
|
|
||||
|
span.classifier { |
||||
|
font-family: sans-serif ; |
||||
|
font-style: oblique } |
||||
|
|
||||
|
span.classifier-delimiter { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
span.interpreted { |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
span.option { |
||||
|
white-space: nowrap } |
||||
|
|
||||
|
span.pre { |
||||
|
white-space: pre } |
||||
|
|
||||
|
span.problematic { |
||||
|
color: red } |
||||
|
|
||||
|
span.section-subtitle { |
||||
|
/* font-size relative to parent (h1..h6 element) */ |
||||
|
font-size: 80% } |
||||
|
|
||||
|
table.citation { |
||||
|
border-left: solid 1px gray; |
||||
|
margin-left: 1px } |
||||
|
|
||||
|
table.docinfo { |
||||
|
margin: 2em 4em } |
||||
|
|
||||
|
table.docutils { |
||||
|
margin-top: 0.5em ; |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
table.footnote { |
||||
|
border-left: solid 1px black; |
||||
|
margin-left: 1px } |
||||
|
|
||||
|
table.docutils td, table.docutils th, |
||||
|
table.docinfo td, table.docinfo th { |
||||
|
padding-left: 0.5em ; |
||||
|
padding-right: 0.5em ; |
||||
|
vertical-align: top } |
||||
|
|
||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name { |
||||
|
font-weight: bold ; |
||||
|
text-align: left ; |
||||
|
white-space: nowrap ; |
||||
|
padding-left: 0 } |
||||
|
|
||||
|
/* "booktabs" style (no vertical lines) */ |
||||
|
table.docutils.booktabs { |
||||
|
border: 0px; |
||||
|
border-top: 2px solid; |
||||
|
border-bottom: 2px solid; |
||||
|
border-collapse: collapse; |
||||
|
} |
||||
|
table.docutils.booktabs * { |
||||
|
border: 0px; |
||||
|
} |
||||
|
table.docutils.booktabs th { |
||||
|
border-bottom: thin solid; |
||||
|
text-align: left; |
||||
|
} |
||||
|
|
||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, |
||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { |
||||
|
font-size: 100% } |
||||
|
|
||||
|
ul.auto-toc { |
||||
|
list-style-type: none } |
||||
|
|
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="document" id="bypass-check-bank-statement-import"> |
||||
|
<h1 class="title">Bypass check Bank statement import</h1> |
||||
|
|
||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
!! This file is generated by oca-gen-addon-readme !! |
||||
|
!! changes will be overwritten. !! |
||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> |
||||
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_import_bypass_check"><img alt="OCA/bank-statement-import" src="https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-statement-import-12-0/bank-statement-import-12-0-account_bank_statement_import_bypass_check"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/174/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> |
||||
|
<p>This module adds a check button to bypass the check if account of this statement is not the same as the journal.</p> |
||||
|
<p><strong>Table of contents</strong></p> |
||||
|
<div class="contents local topic" id="contents"> |
||||
|
<ul class="simple"> |
||||
|
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li> |
||||
|
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li> |
||||
|
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul> |
||||
|
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li> |
||||
|
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li> |
||||
|
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="usage"> |
||||
|
<h1><a class="toc-backref" href="#id1">Usage</a></h1> |
||||
|
<ol class="arabic simple"> |
||||
|
<li>Go to Accounting > Dashboard.</li> |
||||
|
<li>On one bank click button “Import”.</li> |
||||
|
<li>Upload on statement file.</li> |
||||
|
<li>Click button “Import”.</li> |
||||
|
<li>If account of this statement is not the same as the journal in your file:</li> |
||||
|
<li>You have error message printed in the wizard + the possibility do force the import.</li> |
||||
|
<li>You can check the boolean field and retry the import if you want.</li> |
||||
|
</ol> |
||||
|
</div> |
||||
|
<div class="section" id="bug-tracker"> |
||||
|
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1> |
||||
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-statement-import/issues">GitHub Issues</a>. |
||||
|
In case of trouble, please check there if your issue has already been reported. |
||||
|
If you spotted it first, help us smashing it by providing a detailed and welcomed |
||||
|
<a class="reference external" href="https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_bank_statement_import_bypass_check%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> |
||||
|
<p>Do not contact contributors directly about support or help with technical issues.</p> |
||||
|
</div> |
||||
|
<div class="section" id="credits"> |
||||
|
<h1><a class="toc-backref" href="#id3">Credits</a></h1> |
||||
|
<div class="section" id="authors"> |
||||
|
<h2><a class="toc-backref" href="#id4">Authors</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li>Camptocamp</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="contributors"> |
||||
|
<h2><a class="toc-backref" href="#id5">Contributors</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li><a class="reference external" href="https://www.camptocamp.com">Camptoamp</a>:<ul> |
||||
|
<li>Thomas Nowicki</li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="maintainers"> |
||||
|
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2> |
||||
|
<p>This module is maintained by the OCA.</p> |
||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> |
||||
|
<p>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.</p> |
||||
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_import_bypass_check">OCA/bank-statement-import</a> project on GitHub.</p> |
||||
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1 @@ |
|||||
|
from . import account_bank_statement_import |
@ -0,0 +1,56 @@ |
|||||
|
# Copyright 2019 Camptocamp SA |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
import base64 |
||||
|
import logging |
||||
|
|
||||
|
from odoo import api, fields, models |
||||
|
from odoo.exceptions import UserError |
||||
|
|
||||
|
_logger = logging.getLogger(__name__) |
||||
|
|
||||
|
|
||||
|
class AccountBankStatementImport(models.TransientModel): |
||||
|
_inherit = "account.bank.statement.import" |
||||
|
|
||||
|
check_journal = fields.Boolean(default=True) |
||||
|
check_message = fields.Char(readonly=True) |
||||
|
force_journal = fields.Boolean( |
||||
|
string="Do you want to force this import ?", default=False |
||||
|
) |
||||
|
|
||||
|
@api.multi |
||||
|
def import_file(self): |
||||
|
""" Override to make the import in 2 step. |
||||
|
|
||||
|
To provide to user possiblity to bypass the journal check. |
||||
|
""" |
||||
|
self.ensure_one() |
||||
|
currency_code, account_number, stmts_vals = self.with_context( |
||||
|
active_id=self.ids[0] |
||||
|
)._parse_file(base64.b64decode(self.data_file)) |
||||
|
if self.check_journal: |
||||
|
try: |
||||
|
self._find_additional_data(currency_code, account_number) |
||||
|
# _find_additional_data() call _check_journal_bank_account() |
||||
|
# so the self.check_journal value can evolve |
||||
|
except UserError as u_error: |
||||
|
if not self.check_journal: |
||||
|
msg = u_error.args[0] |
||||
|
_logger.info(msg) |
||||
|
self.check_message = str(msg) |
||||
|
action = self.env.ref( |
||||
|
"account_bank_statement_import." |
||||
|
"action_account_bank_statement_import" |
||||
|
).read([])[0] |
||||
|
action["res_id"] = self.id |
||||
|
return action |
||||
|
return super().import_file() |
||||
|
|
||||
|
def _check_journal_bank_account(self, journal, account_number): |
||||
|
check = super()._check_journal_bank_account(journal, account_number) |
||||
|
if self.check_journal: |
||||
|
self.check_journal = False |
||||
|
if self.force_journal: |
||||
|
return True |
||||
|
return check |
@ -0,0 +1,24 @@ |
|||||
|
<?xml version="1.0" ?> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="account_bank_statement_import_view" model="ir.ui.view"> |
||||
|
<field name="name">account.bank.statement.import.view</field> |
||||
|
<field name="model">account.bank.statement.import</field> |
||||
|
<field name="inherit_id" ref="account_bank_statement_import.account_bank_statement_import_view"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
|
||||
|
<field name="filename" position="after"> |
||||
|
<field name="check_journal" invisible="1"/> |
||||
|
<group attrs="{'invisible': [('check_journal', '=', True)]}"> |
||||
|
<field name="check_message" |
||||
|
nolabel="1" |
||||
|
colspan="2" |
||||
|
style="color: red;"/> |
||||
|
<field name="force_journal"/> |
||||
|
</group> |
||||
|
</field> |
||||
|
|
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
@ -1,3 +1 @@ |
|||||
# © 2013-2016 Therp BV <http://therp.nl> |
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
||||
from . import models |
from . import models |
@ -1,4 +1,3 @@ |
|||||
# © 2013-2016 Therp BV <http://therp.nl> |
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
||||
from . import parser |
from . import parser |
||||
from . import account_bank_statement_import |
from . import account_bank_statement_import |
||||
|
from . import account_journal |
@ -0,0 +1,14 @@ |
|||||
|
# Copyright 2019 ACSONE SA/NV <thomas.binsfeld@acsone.eu> |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
from odoo import models, _ |
||||
|
|
||||
|
|
||||
|
class AccountJournal(models.Model): |
||||
|
_inherit = "account.journal" |
||||
|
|
||||
|
def _get_bank_statements_available_import_formats(self): |
||||
|
res = super(AccountJournal, self).\ |
||||
|
_get_bank_statements_available_import_formats() |
||||
|
res.extend([_('camt.053.001.02'), _('camt.054.001.02')]) |
||||
|
return res |
@ -0,0 +1,5 @@ |
|||||
|
* Holger Brunn <hbrunn@therp.nl> |
||||
|
* Stefan Rijnhart <srijnhart@therp.nl> |
||||
|
* Ronald Portier <rportier@therp.nl> |
||||
|
* Andrea Stirpe <a.stirpe@onestein.nl> |
||||
|
* Maxence Groine <mgroine@fiefmanage.ch> |
@ -0,0 +1 @@ |
|||||
|
Module to import SEPA CAMT.053 and CAMT.054 Format bank statement files. |
@ -0,0 +1,423 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
||||
|
<head> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
|
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> |
||||
|
<title>CAMT Format Bank Statements Import</title> |
||||
|
<style type="text/css"> |
||||
|
|
||||
|
/* |
||||
|
:Author: David Goodger (goodger@python.org) |
||||
|
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $ |
||||
|
:Copyright: This stylesheet has been placed in the public domain. |
||||
|
|
||||
|
Default cascading style sheet for the HTML output of Docutils. |
||||
|
|
||||
|
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to |
||||
|
customize this style sheet. |
||||
|
*/ |
||||
|
|
||||
|
/* used to remove borders from tables and images */ |
||||
|
.borderless, table.borderless td, table.borderless th { |
||||
|
border: 0 } |
||||
|
|
||||
|
table.borderless td, table.borderless th { |
||||
|
/* Override padding for "table.docutils td" with "! important". |
||||
|
The right padding separates the table cells. */ |
||||
|
padding: 0 0.5em 0 0 ! important } |
||||
|
|
||||
|
.first { |
||||
|
/* Override more specific margin styles with "! important". */ |
||||
|
margin-top: 0 ! important } |
||||
|
|
||||
|
.last, .with-subtitle { |
||||
|
margin-bottom: 0 ! important } |
||||
|
|
||||
|
.hidden { |
||||
|
display: none } |
||||
|
|
||||
|
.subscript { |
||||
|
vertical-align: sub; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
.superscript { |
||||
|
vertical-align: super; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
a.toc-backref { |
||||
|
text-decoration: none ; |
||||
|
color: black } |
||||
|
|
||||
|
blockquote.epigraph { |
||||
|
margin: 2em 5em ; } |
||||
|
|
||||
|
dl.docutils dd { |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms |
||||
|
dl.docutils dt { |
||||
|
font-weight: bold } |
||||
|
*/ |
||||
|
|
||||
|
div.abstract { |
||||
|
margin: 2em 5em } |
||||
|
|
||||
|
div.abstract p.topic-title { |
||||
|
font-weight: bold ; |
||||
|
text-align: center } |
||||
|
|
||||
|
div.admonition, div.attention, div.caution, div.danger, div.error, |
||||
|
div.hint, div.important, div.note, div.tip, div.warning { |
||||
|
margin: 2em ; |
||||
|
border: medium outset ; |
||||
|
padding: 1em } |
||||
|
|
||||
|
div.admonition p.admonition-title, div.hint p.admonition-title, |
||||
|
div.important p.admonition-title, div.note p.admonition-title, |
||||
|
div.tip p.admonition-title { |
||||
|
font-weight: bold ; |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
div.attention p.admonition-title, div.caution p.admonition-title, |
||||
|
div.danger p.admonition-title, div.error p.admonition-title, |
||||
|
div.warning p.admonition-title, .code .error { |
||||
|
color: red ; |
||||
|
font-weight: bold ; |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in |
||||
|
compound paragraphs. |
||||
|
div.compound .compound-first, div.compound .compound-middle { |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
div.compound .compound-last, div.compound .compound-middle { |
||||
|
margin-top: 0.5em } |
||||
|
*/ |
||||
|
|
||||
|
div.dedication { |
||||
|
margin: 2em 5em ; |
||||
|
text-align: center ; |
||||
|
font-style: italic } |
||||
|
|
||||
|
div.dedication p.topic-title { |
||||
|
font-weight: bold ; |
||||
|
font-style: normal } |
||||
|
|
||||
|
div.figure { |
||||
|
margin-left: 2em ; |
||||
|
margin-right: 2em } |
||||
|
|
||||
|
div.footer, div.header { |
||||
|
clear: both; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
div.line-block { |
||||
|
display: block ; |
||||
|
margin-top: 1em ; |
||||
|
margin-bottom: 1em } |
||||
|
|
||||
|
div.line-block div.line-block { |
||||
|
margin-top: 0 ; |
||||
|
margin-bottom: 0 ; |
||||
|
margin-left: 1.5em } |
||||
|
|
||||
|
div.sidebar { |
||||
|
margin: 0 0 0.5em 1em ; |
||||
|
border: medium outset ; |
||||
|
padding: 1em ; |
||||
|
background-color: #ffffee ; |
||||
|
width: 40% ; |
||||
|
float: right ; |
||||
|
clear: right } |
||||
|
|
||||
|
div.sidebar p.rubric { |
||||
|
font-family: sans-serif ; |
||||
|
font-size: medium } |
||||
|
|
||||
|
div.system-messages { |
||||
|
margin: 5em } |
||||
|
|
||||
|
div.system-messages h1 { |
||||
|
color: red } |
||||
|
|
||||
|
div.system-message { |
||||
|
border: medium outset ; |
||||
|
padding: 1em } |
||||
|
|
||||
|
div.system-message p.system-message-title { |
||||
|
color: red ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
div.topic { |
||||
|
margin: 2em } |
||||
|
|
||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, |
||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { |
||||
|
margin-top: 0.4em } |
||||
|
|
||||
|
h1.title { |
||||
|
text-align: center } |
||||
|
|
||||
|
h2.subtitle { |
||||
|
text-align: center } |
||||
|
|
||||
|
hr.docutils { |
||||
|
width: 75% } |
||||
|
|
||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left { |
||||
|
clear: left ; |
||||
|
float: left ; |
||||
|
margin-right: 1em } |
||||
|
|
||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right { |
||||
|
clear: right ; |
||||
|
float: right ; |
||||
|
margin-left: 1em } |
||||
|
|
||||
|
img.align-center, .figure.align-center, object.align-center { |
||||
|
display: block; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
|
||||
|
table.align-center { |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
|
||||
|
.align-left { |
||||
|
text-align: left } |
||||
|
|
||||
|
.align-center { |
||||
|
clear: both ; |
||||
|
text-align: center } |
||||
|
|
||||
|
.align-right { |
||||
|
text-align: right } |
||||
|
|
||||
|
/* reset inner alignment in figures */ |
||||
|
div.align-right { |
||||
|
text-align: inherit } |
||||
|
|
||||
|
/* div.align-center * { */ |
||||
|
/* text-align: left } */ |
||||
|
|
||||
|
.align-top { |
||||
|
vertical-align: top } |
||||
|
|
||||
|
.align-middle { |
||||
|
vertical-align: middle } |
||||
|
|
||||
|
.align-bottom { |
||||
|
vertical-align: bottom } |
||||
|
|
||||
|
ol.simple, ul.simple { |
||||
|
margin-bottom: 1em } |
||||
|
|
||||
|
ol.arabic { |
||||
|
list-style: decimal } |
||||
|
|
||||
|
ol.loweralpha { |
||||
|
list-style: lower-alpha } |
||||
|
|
||||
|
ol.upperalpha { |
||||
|
list-style: upper-alpha } |
||||
|
|
||||
|
ol.lowerroman { |
||||
|
list-style: lower-roman } |
||||
|
|
||||
|
ol.upperroman { |
||||
|
list-style: upper-roman } |
||||
|
|
||||
|
p.attribution { |
||||
|
text-align: right ; |
||||
|
margin-left: 50% } |
||||
|
|
||||
|
p.caption { |
||||
|
font-style: italic } |
||||
|
|
||||
|
p.credits { |
||||
|
font-style: italic ; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
p.label { |
||||
|
white-space: nowrap } |
||||
|
|
||||
|
p.rubric { |
||||
|
font-weight: bold ; |
||||
|
font-size: larger ; |
||||
|
color: maroon ; |
||||
|
text-align: center } |
||||
|
|
||||
|
p.sidebar-title { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold ; |
||||
|
font-size: larger } |
||||
|
|
||||
|
p.sidebar-subtitle { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
p.topic-title { |
||||
|
font-weight: bold } |
||||
|
|
||||
|
pre.address { |
||||
|
margin-bottom: 0 ; |
||||
|
margin-top: 0 ; |
||||
|
font: inherit } |
||||
|
|
||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code { |
||||
|
margin-left: 2em ; |
||||
|
margin-right: 2em } |
||||
|
|
||||
|
pre.code .ln { color: grey; } /* line numbers */ |
||||
|
pre.code, code { background-color: #eeeeee } |
||||
|
pre.code .comment, code .comment { color: #5C6576 } |
||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } |
||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 } |
||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 } |
||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1} |
||||
|
pre.code .inserted, code .inserted { background-color: #A3D289} |
||||
|
|
||||
|
span.classifier { |
||||
|
font-family: sans-serif ; |
||||
|
font-style: oblique } |
||||
|
|
||||
|
span.classifier-delimiter { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
span.interpreted { |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
span.option { |
||||
|
white-space: nowrap } |
||||
|
|
||||
|
span.pre { |
||||
|
white-space: pre } |
||||
|
|
||||
|
span.problematic { |
||||
|
color: red } |
||||
|
|
||||
|
span.section-subtitle { |
||||
|
/* font-size relative to parent (h1..h6 element) */ |
||||
|
font-size: 80% } |
||||
|
|
||||
|
table.citation { |
||||
|
border-left: solid 1px gray; |
||||
|
margin-left: 1px } |
||||
|
|
||||
|
table.docinfo { |
||||
|
margin: 2em 4em } |
||||
|
|
||||
|
table.docutils { |
||||
|
margin-top: 0.5em ; |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
table.footnote { |
||||
|
border-left: solid 1px black; |
||||
|
margin-left: 1px } |
||||
|
|
||||
|
table.docutils td, table.docutils th, |
||||
|
table.docinfo td, table.docinfo th { |
||||
|
padding-left: 0.5em ; |
||||
|
padding-right: 0.5em ; |
||||
|
vertical-align: top } |
||||
|
|
||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name { |
||||
|
font-weight: bold ; |
||||
|
text-align: left ; |
||||
|
white-space: nowrap ; |
||||
|
padding-left: 0 } |
||||
|
|
||||
|
/* "booktabs" style (no vertical lines) */ |
||||
|
table.docutils.booktabs { |
||||
|
border: 0px; |
||||
|
border-top: 2px solid; |
||||
|
border-bottom: 2px solid; |
||||
|
border-collapse: collapse; |
||||
|
} |
||||
|
table.docutils.booktabs * { |
||||
|
border: 0px; |
||||
|
} |
||||
|
table.docutils.booktabs th { |
||||
|
border-bottom: thin solid; |
||||
|
text-align: left; |
||||
|
} |
||||
|
|
||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, |
||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { |
||||
|
font-size: 100% } |
||||
|
|
||||
|
ul.auto-toc { |
||||
|
list-style-type: none } |
||||
|
|
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="document" id="camt-format-bank-statements-import"> |
||||
|
<h1 class="title">CAMT Format Bank Statements Import</h1> |
||||
|
|
||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
!! This file is generated by oca-gen-addon-readme !! |
||||
|
!! changes will be overwritten. !! |
||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> |
||||
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_import_camt_oca"><img alt="OCA/bank-statement-import" src="https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-statement-import-12-0/bank-statement-import-12-0-account_bank_statement_import_camt_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/174/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> |
||||
|
<p>Module to import SEPA CAMT.053 and CAMT.054 Format bank statement files.</p> |
||||
|
<p><strong>Table of contents</strong></p> |
||||
|
<div class="contents local topic" id="contents"> |
||||
|
<ul class="simple"> |
||||
|
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li> |
||||
|
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul> |
||||
|
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li> |
||||
|
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li> |
||||
|
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="bug-tracker"> |
||||
|
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1> |
||||
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-statement-import/issues">GitHub Issues</a>. |
||||
|
In case of trouble, please check there if your issue has already been reported. |
||||
|
If you spotted it first, help us smashing it by providing a detailed and welcomed |
||||
|
<a class="reference external" href="https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_bank_statement_import_camt_oca%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> |
||||
|
<p>Do not contact contributors directly about support or help with technical issues.</p> |
||||
|
</div> |
||||
|
<div class="section" id="credits"> |
||||
|
<h1><a class="toc-backref" href="#id2">Credits</a></h1> |
||||
|
<div class="section" id="authors"> |
||||
|
<h2><a class="toc-backref" href="#id3">Authors</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li>Therp BV</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="contributors"> |
||||
|
<h2><a class="toc-backref" href="#id4">Contributors</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li>Holger Brunn <<a class="reference external" href="mailto:hbrunn@therp.nl">hbrunn@therp.nl</a>></li> |
||||
|
<li>Stefan Rijnhart <<a class="reference external" href="mailto:srijnhart@therp.nl">srijnhart@therp.nl</a>></li> |
||||
|
<li>Ronald Portier <<a class="reference external" href="mailto:rportier@therp.nl">rportier@therp.nl</a>></li> |
||||
|
<li>Andrea Stirpe <<a class="reference external" href="mailto:a.stirpe@onestein.nl">a.stirpe@onestein.nl</a>></li> |
||||
|
<li>Maxence Groine <<a class="reference external" href="mailto:mgroine@fiefmanage.ch">mgroine@fiefmanage.ch</a>></li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="maintainers"> |
||||
|
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2> |
||||
|
<p>This module is maintained by the OCA.</p> |
||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> |
||||
|
<p>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.</p> |
||||
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/12.0/account_bank_statement_import_camt_oca">OCA/bank-statement-import</a> project on GitHub.</p> |
||||
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -1,4 +1 @@ |
|||||
"""Test import of bank statement for camt.053.""" |
|
||||
# © 2013-2016 Therp BV <http://therp.nl> |
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
||||
from . import test_import_bank_statement |
from . import test_import_bank_statement |
@ -0,0 +1,5 @@ |
|||||
|
To configure this module, you need to: |
||||
|
|
||||
|
#. Go to *Settings > Users & Companies > Users*. |
||||
|
#. Open the user that needs to use this feature. |
||||
|
#. Mark the check *Show Full Accounting Features*. |
@ -1 +1,4 @@ |
|||||
* Luis M. Ontalba luis.martinez@tecnativa.com> |
|
||||
|
* `Tecnativa <https://www.tecnativa.com>`_: |
||||
|
|
||||
|
* Luis M. Ontalba |
||||
|
* Victor M.M. Torres |
@ -1,55 +0,0 @@ |
|||||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png |
|
||||
:target: https://www.gnu.org/licenses/agpl |
|
||||
:alt: License: AGPL-3 |
|
||||
|
|
||||
==================== |
|
||||
Bank Statement MT940 |
|
||||
==================== |
|
||||
|
|
||||
This module provides a generic parser for MT940 files. Given that MT940 is a |
|
||||
non-open non-standard of pure evil in the way that every bank cooks up its own |
|
||||
interpretation of it, this addon alone won't help you much. It is rather |
|
||||
intended to be used by other addons to implement the dialect specific to a |
|
||||
certain bank. |
|
||||
|
|
||||
See account_bank_statement_import_mt940_nl_ing for an example on how to use it. |
|
||||
|
|
||||
Known issues / Roadmap |
|
||||
====================== |
|
||||
|
|
||||
* None |
|
||||
|
|
||||
Bug Tracker |
|
||||
=========== |
|
||||
|
|
||||
Bugs are tracked on `GitHub Issues |
|
||||
<https://github.com/OCA/bank-statement-import/issues>`_. In case of trouble, please |
|
||||
check there if your issue has already been reported. If you spotted it first, |
|
||||
help us smash it by providing detailed and welcomed feedback. |
|
||||
|
|
||||
Credits |
|
||||
======= |
|
||||
|
|
||||
Contributors |
|
||||
------------ |
|
||||
|
|
||||
* Stefan Rijnhart <srijnhart@therp.nl> |
|
||||
* Ronald Portier <rportier@therp.nl> |
|
||||
* Andrea Stirpe <a.stirpe@onestein.nl> |
|
||||
* Fekete Mihai <mihai.fekete@forbiom.eu> |
|
||||
|
|
||||
Maintainer |
|
||||
---------- |
|
||||
|
|
||||
|
|
||||
.. image:: https://odoo-community.org/logo.png |
|
||||
:alt: Odoo Community Association |
|
||||
:target: https://odoo-community.org |
|
||||
|
|
||||
This module is maintained by the OCA. |
|
||||
|
|
||||
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. |
|
||||
|
|
||||
To contribute to this module, please visit https://odoo-community.org. |
|
@ -1 +0,0 @@ |
|||||
from . import mt940 |
|
@ -1,14 +0,0 @@ |
|||||
# Copyright (C) 2013-2015 Therp BV <http://therp.nl> |
|
||||
|
|
||||
{ |
|
||||
'name': 'MT940 Bank Statements Import', |
|
||||
'version': '11.0.1.0.0', |
|
||||
'license': 'AGPL-3', |
|
||||
'author': 'Odoo Community Association (OCA), Therp BV', |
|
||||
'website': 'https://github.com/OCA/bank-statement-import', |
|
||||
'category': 'Banking addons', |
|
||||
'depends': [ |
|
||||
'account_bank_statement_import', |
|
||||
], |
|
||||
'installable': True |
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
# Translation of Odoo Server. |
|
||||
# This file contains the translation of the following modules: |
|
||||
# |
|
||||
msgid "" |
|
||||
msgstr "" |
|
||||
"Project-Id-Version: Odoo Server 11.0\n" |
|
||||
"Report-Msgid-Bugs-To: \n" |
|
||||
"Last-Translator: <>\n" |
|
||||
"Language-Team: \n" |
|
||||
"MIME-Version: 1.0\n" |
|
||||
"Content-Type: text/plain; charset=UTF-8\n" |
|
||||
"Content-Transfer-Encoding: \n" |
|
||||
"Plural-Forms: \n" |
|
||||
|
|
@ -1,310 +0,0 @@ |
|||||
# Copyright (C) 2014-2015 Therp BV <http://therp.nl>. |
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
||||
"""Generic parser for MT940 files, base for customized versions per bank.""" |
|
||||
|
|
||||
import re |
|
||||
import logging |
|
||||
from datetime import datetime |
|
||||
|
|
||||
|
|
||||
def str2amount(sign, amount_str): |
|
||||
"""Convert sign (C or D) and amount in string to signed amount (float).""" |
|
||||
factor = (1 if sign == 'C' else -1) |
|
||||
return factor * float(amount_str.replace(',', '.')) |
|
||||
|
|
||||
|
|
||||
def get_subfields(data, codewords): |
|
||||
"""Return dictionary with value array for each codeword in data. |
|
||||
|
|
||||
For instance: |
|
||||
data = |
|
||||
/BENM//NAME/Kosten/REMI/Periode 01-10-2013 t/m 31-12-2013/ISDT/20 |
|
||||
codewords = ['BENM', 'ADDR', 'NAME', 'CNTP', ISDT', 'REMI'] |
|
||||
Then return subfields = { |
|
||||
'BENM': [], |
|
||||
'NAME': ['Kosten'], |
|
||||
'REMI': ['Periode 01-10-2013 t', 'm 31-12-2013'], |
|
||||
'ISDT': ['20'], |
|
||||
} |
|
||||
""" |
|
||||
subfields = {} |
|
||||
current_codeword = None |
|
||||
for word in data.split('/'): |
|
||||
if not word and not current_codeword: |
|
||||
continue |
|
||||
if word in codewords: |
|
||||
current_codeword = word |
|
||||
subfields[current_codeword] = [] |
|
||||
continue |
|
||||
if current_codeword in subfields: |
|
||||
subfields[current_codeword].append(word) |
|
||||
return subfields |
|
||||
|
|
||||
|
|
||||
def get_counterpart(transaction, subfield): |
|
||||
"""Get counterpart from transaction. |
|
||||
|
|
||||
Counterpart is often stored in subfield of tag 86. The subfield |
|
||||
can be BENM, ORDP, CNTP""" |
|
||||
if not subfield: |
|
||||
return # subfield is empty |
|
||||
if len(subfield) >= 1 and subfield[0]: |
|
||||
transaction.update({'account_number': subfield[0]}) |
|
||||
if len(subfield) >= 2 and subfield[1]: |
|
||||
transaction.update({'account_bic': subfield[1]}) |
|
||||
if len(subfield) >= 3 and subfield[2]: |
|
||||
transaction.update({'partner_name': subfield[2]}) |
|
||||
|
|
||||
|
|
||||
def handle_common_subfields(transaction, subfields): |
|
||||
"""Deal with common functionality for tag 86 subfields.""" |
|
||||
# Get counterpart from CNTP, BENM or ORDP subfields: |
|
||||
for counterpart_field in ['CNTP', 'BENM', 'ORDP']: |
|
||||
if counterpart_field in subfields: |
|
||||
get_counterpart(transaction, subfields[counterpart_field]) |
|
||||
if not transaction.get('name'): |
|
||||
transaction['name'] = '' |
|
||||
# REMI: Remitter information (text entered by other party on trans.): |
|
||||
if 'REMI' in subfields: |
|
||||
transaction['name'] += ( |
|
||||
subfields['REMI'][2] |
|
||||
# this might look like |
|
||||
# /REMI/USTD//<remittance info>/ |
|
||||
# or |
|
||||
# /REMI/STRD/CUR/<betalingskenmerk>/ |
|
||||
if len(subfields['REMI']) >= 3 and subfields['REMI'][0] in [ |
|
||||
'STRD', 'USTD' |
|
||||
] |
|
||||
else |
|
||||
'/'.join(x for x in subfields['REMI'] if x) |
|
||||
) |
|
||||
# EREF: End-to-end reference |
|
||||
if 'EREF' in subfields: |
|
||||
transaction['name'] += '/'.join(filter(bool, subfields['EREF'])) |
|
||||
# Get transaction reference subfield (might vary): |
|
||||
if transaction.get('ref') in subfields: |
|
||||
transaction['ref'] = ''.join(subfields[transaction['ref']]) |
|
||||
|
|
||||
|
|
||||
class MT940(object): |
|
||||
"""Inherit this class in your account_banking.parsers.models.parser, |
|
||||
define functions to handle the tags you need to handle and adjust static |
|
||||
variables as needed. |
|
||||
|
|
||||
At least, you should override handle_tag_61 and handle_tag_86. |
|
||||
Don't forget to call super. |
|
||||
|
|
||||
handle_tag_* functions receive the remainder of the the line (that is, |
|
||||
without ':XX:') and are supposed to write into self.current_transaction |
|
||||
""" |
|
||||
|
|
||||
def __init__(self): |
|
||||
"""Initialize parser - override at least header_regex. |
|
||||
|
|
||||
This in fact uses the ING syntax, override in others.""" |
|
||||
self.mt940_type = 'General' |
|
||||
self.header_lines = 3 # Number of lines to skip |
|
||||
self.header_regex = '^0000 01INGBNL2AXXXX|^{1' # Start of header |
|
||||
self.footer_regex = '^-}$|^-XXX$' # Stop processing on seeing this |
|
||||
self.tag_regex = '^:[0-9]{2}[A-Z]*:' # Start of new tag |
|
||||
self.current_statement = None |
|
||||
self.current_transaction = None |
|
||||
self.statements = [] |
|
||||
self.currency_code = None |
|
||||
self.account_number = None |
|
||||
|
|
||||
def is_mt940(self, line): |
|
||||
"""determine if a line is the header of a statement""" |
|
||||
if not bool(re.match(self.header_regex, line)): |
|
||||
raise ValueError( |
|
||||
'File starting with %s does not seem to be a' |
|
||||
' valid %s MT940 format bank statement.' % |
|
||||
(line[:12], self.mt940_type) |
|
||||
) |
|
||||
|
|
||||
def is_mt940_statement(self, line): |
|
||||
"""determine if line is the start of a statement""" |
|
||||
if not bool(line.startswith('{4:')): |
|
||||
raise ValueError( |
|
||||
'The pre processed match %s does not seem to be a' |
|
||||
' valid %s MT940 format bank statement. Every statement' |
|
||||
' should start be a dict starting with {4:..' % line |
|
||||
) |
|
||||
|
|
||||
def pre_process_data(self, data): |
|
||||
matches = [] |
|
||||
self.is_mt940(line=data) |
|
||||
data = data.replace( |
|
||||
'-}', '}').replace('}{', '}\r\n{').replace('\r\n', '\n') |
|
||||
if data.startswith(':940:'): |
|
||||
for statement in data.replace(':940:', '').split(':20:'): |
|
||||
match = '{4:\n:20:' + statement + '}' |
|
||||
matches.append(match) |
|
||||
else: |
|
||||
tag_re = re.compile( |
|
||||
r'(\{4:[^{}]+\})', |
|
||||
re.MULTILINE) |
|
||||
matches = tag_re.findall(data) |
|
||||
return matches |
|
||||
|
|
||||
def parse(self, data, header_lines=None): |
|
||||
"""Parse mt940 bank statement file contents.""" |
|
||||
data = data.decode() |
|
||||
matches = self.pre_process_data(data) |
|
||||
for match in matches: |
|
||||
self.is_mt940_statement(line=match) |
|
||||
iterator = '\n'.join( |
|
||||
match.split('\n')[1:-1]).split('\n').__iter__() |
|
||||
line = None |
|
||||
record_line = '' |
|
||||
try: |
|
||||
while True: |
|
||||
if not self.current_statement: |
|
||||
self.handle_header(line, iterator, |
|
||||
header_lines=header_lines) |
|
||||
line = next(iterator) |
|
||||
if not self.is_tag(line) and not self.is_footer(line): |
|
||||
record_line = self.add_record_line(line, record_line) |
|
||||
continue |
|
||||
if record_line: |
|
||||
self.handle_record(record_line) |
|
||||
if self.is_footer(line): |
|
||||
self.handle_footer(line, iterator) |
|
||||
record_line = '' |
|
||||
continue |
|
||||
record_line = line |
|
||||
except StopIteration: |
|
||||
pass |
|
||||
if self.current_statement: |
|
||||
if record_line: |
|
||||
self.handle_record(record_line) |
|
||||
record_line = '' |
|
||||
self.statements.append(self.current_statement) |
|
||||
self.current_statement = None |
|
||||
return self.currency_code, self.account_number, self.statements |
|
||||
|
|
||||
def add_record_line(self, line, record_line): |
|
||||
record_line += line |
|
||||
return record_line |
|
||||
|
|
||||
def is_footer(self, line): |
|
||||
"""determine if a line is the footer of a statement""" |
|
||||
return line and bool(re.match(self.footer_regex, line)) |
|
||||
|
|
||||
def is_tag(self, line): |
|
||||
"""determine if a line has a tag""" |
|
||||
return line and bool(re.match(self.tag_regex, line)) |
|
||||
|
|
||||
def handle_header(self, dummy_line, iterator, header_lines=None): |
|
||||
"""skip header lines, create current statement""" |
|
||||
if not header_lines: |
|
||||
header_lines = self.header_lines |
|
||||
for dummy_i in range(header_lines): |
|
||||
next(iterator) |
|
||||
self.current_statement = { |
|
||||
'name': None, |
|
||||
'date': None, |
|
||||
'balance_start': 0.0, |
|
||||
'balance_end_real': 0.0, |
|
||||
'transactions': [] |
|
||||
} |
|
||||
|
|
||||
def handle_footer(self, dummy_line, dummy_iterator): |
|
||||
"""add current statement to list, reset state""" |
|
||||
self.statements.append(self.current_statement) |
|
||||
self.current_statement = None |
|
||||
|
|
||||
def handle_record(self, line): |
|
||||
"""find a function to handle the record represented by line""" |
|
||||
tag_match = re.match(self.tag_regex, line) |
|
||||
tag = tag_match.group(0).strip(':') |
|
||||
if not hasattr(self, 'handle_tag_%s' % tag): # pragma: no cover |
|
||||
logging.error('Unknown tag %s', tag) |
|
||||
logging.error(line) |
|
||||
return |
|
||||
handler = getattr(self, 'handle_tag_%s' % tag) |
|
||||
handler(line[tag_match.end():]) |
|
||||
|
|
||||
def handle_tag_20(self, data): |
|
||||
"""Contains unique ? message ID""" |
|
||||
pass |
|
||||
|
|
||||
def handle_tag_25(self, data): |
|
||||
"""Handle tag 25: local bank account information.""" |
|
||||
data = data.replace('EUR', '').replace('.', '').strip() |
|
||||
self.account_number = data |
|
||||
|
|
||||
def handle_tag_28C(self, data): |
|
||||
"""Sequence number within batch - normally only zeroes.""" |
|
||||
pass |
|
||||
|
|
||||
def handle_tag_60F(self, data): |
|
||||
"""get start balance and currency""" |
|
||||
# For the moment only first 60F record |
|
||||
# The alternative would be to split the file and start a new |
|
||||
# statement for each 20: tag encountered. |
|
||||
if not self.currency_code: |
|
||||
self.currency_code = data[7:10] |
|
||||
self.current_statement['balance_start'] = str2amount( |
|
||||
data[0], |
|
||||
data[10:] |
|
||||
) |
|
||||
if not self.current_statement['date']: |
|
||||
self.current_statement['date'] = datetime.strptime(data[1:7], |
|
||||
'%y%m%d') |
|
||||
|
|
||||
def handle_tag_61(self, data): |
|
||||
"""get transaction values""" |
|
||||
self.current_statement['transactions'].append({}) |
|
||||
self.current_transaction = self.current_statement['transactions'][-1] |
|
||||
self.current_transaction['date'] = datetime.strptime( |
|
||||
data[:6], |
|
||||
'%y%m%d' |
|
||||
) |
|
||||
|
|
||||
def handle_tag_62F(self, data): |
|
||||
"""Get ending balance, statement date and id. |
|
||||
|
|
||||
We use the date on the last 62F tag as statement date, as the date |
|
||||
on the 60F record (previous end balance) might contain a date in |
|
||||
a previous period. |
|
||||
|
|
||||
We generate the statement.id from the local_account and the end-date, |
|
||||
this should normally be unique, provided there is a maximum of |
|
||||
one statement per day. |
|
||||
|
|
||||
Depending on the bank, there might be multiple 62F tags in the import |
|
||||
file. The last one counts. |
|
||||
""" |
|
||||
|
|
||||
self.current_statement['balance_end_real'] = str2amount( |
|
||||
data[0], |
|
||||
data[10:] |
|
||||
) |
|
||||
self.current_statement['date'] = datetime.strptime(data[1:7], '%y%m%d') |
|
||||
|
|
||||
# Only replace logically empty (only whitespace or zeroes) id's: |
|
||||
# But do replace statement_id's added before (therefore starting |
|
||||
# with local_account), because we need the date on the last 62F |
|
||||
# record. |
|
||||
statement_name = self.current_statement['name'] or '' |
|
||||
test_empty_id = re.sub(r'[\s0]', '', statement_name) |
|
||||
is_account_number = statement_name.startswith(self.account_number) |
|
||||
if not test_empty_id or is_account_number: |
|
||||
self.current_statement['name'] = '%s-%s' % ( |
|
||||
self.account_number, |
|
||||
self.current_statement['date'].strftime('%Y-%m-%d'), |
|
||||
) |
|
||||
|
|
||||
def handle_tag_64(self, data): |
|
||||
"""get current balance in currency""" |
|
||||
pass |
|
||||
|
|
||||
def handle_tag_65(self, data): |
|
||||
"""get future balance in currency""" |
|
||||
pass |
|
||||
|
|
||||
def handle_tag_86(self, data): |
|
||||
"""details for previous transaction, here most differences between |
|
||||
banks occur""" |
|
||||
pass |
|
@ -1,61 +0,0 @@ |
|||||
{1:F01INGBNL2ABXXX0000000000} |
|
||||
{2:I940INGBNL2AXXXN} |
|
||||
{4: |
|
||||
:20:P140220000000001 |
|
||||
:25:NL77INGB0574908765EUR |
|
||||
:28C:0000 |
|
||||
0 |
|
||||
:60F:C140219EUR662,23 |
|
||||
:61:1402200220C1,56NTRFEREF//00000000001 |
|
||||
005 |
|
||||
/TRCD/00100/ |
|
||||
:86:/EREF/EV12341REP1231456T1234//CNTP/NL32INGB0000012345/INGBNL2 |
|
||||
A/ING BANK NV INZAKE WEB///REMI/USTD//EV10001REP1000000T1000/ |
|
||||
:61:1402200220D1,57NTRFPREF//00000000001006 |
|
||||
/TRCD/00200/ |
|
||||
:86:/PREF/M000000003333333//REMI/USTD//TOTAAL 1 VZ/ |
|
||||
:61:1402200220C1,57NRTIEREF//00000000001007 |
|
||||
/TRCD/00190/ |
|
||||
:86:/RTRN/MS03//EREF/20120123456789//CNTP/NL32INGB0000012345/INGB |
|
||||
NL2A/J.Janssen///REMI/USTD//Factuurnr 123456 Klantnr 00123/ |
|
||||
:61:1402200220D1,14NDDTEREF//00000000001009 |
|
||||
/TRCD/010 |
|
||||
16 |
|
||||
/ |
|
||||
:86:/EREF/EV123R |
|
||||
EP123412T1234//MARF/MND |
|
||||
- |
|
||||
EV01//CSID/NL32ZZZ9999999 |
|
||||
91234//CNTP/NL32INGB0000012345/INGBNL2A/ING Bank N.V. inzake WeB/ |
|
||||
//REMI/USTD//EV123REP123412T1234/ |
|
||||
:61:1402200220C1,45NDDTPREF//00000000001008 |
|
||||
/TRCD/01000/ |
|
||||
:86:/PREF/M000000001111111/ |
|
||||
/CSID/ |
|
||||
NL32ZZZ999999991234 |
|
||||
/ |
|
||||
/REMI/USTD// |
|
||||
TOTAAL 1 POSTEN/ |
|
||||
:61:1402200220D12,75NRTIEREF//00000000001010 |
|
||||
/TRCD/01315/ |
|
||||
:86:/RTRN/MS03//EREF/20120501P0123478//MARF/MND |
|
||||
- |
|
||||
120123//CSID/NL32 |
|
||||
ZZZ999999991234//CNTP/NL32INGB0000012345/INGBNL2A/J.Janssen///REM |
|
||||
I/USTD//CO |
|
||||
NTRIBUTIE FEB 2014/ |
|
||||
:61:1402200220C32,00NTRF9001123412341234//00000000001011 |
|
||||
/TRCD/00108/ |
|
||||
:86:/EREF/15814016000676480//CNTP/NL32INGB0000012345/INGBNL2A/J.J |
|
||||
anssen///REMI/STRD/CUR/9001123412341234/ |
|
||||
:61:1402200220D119,00NTRF1070123412341234//00000000001012 |
|
||||
/ |
|
||||
TRCD/00108/ |
|
||||
:86:/EREF/15614016000384600//CNTP/NL32INGB0000012345/INGBNL2A/ING |
|
||||
BANK NV///REMI/STRD/CUR/1070123412341234/ |
|
||||
:62F:C140220EUR564,35 |
|
||||
:64:C140220EUR564,35 |
|
||||
:65:C140221EUR564,35 |
|
||||
:65:C140224EUR564,35 |
|
||||
:86:/SUM/4/4/134,46/36,58/ |
|
||||
-} |
|
@ -1,29 +0,0 @@ |
|||||
:940: |
|
||||
:20:940S140102 |
|
||||
:25:NL34RABO0142623393 EUR |
|
||||
:28C:0 |
|
||||
:60F:C131231EUR000000004433,52 |
|
||||
:61:140102C000000000400,00N541NONREF |
|
||||
NL66RABO0160878799 |
|
||||
:86:/ORDP//NAME/R. SMITH/ADDR/Green market 74 3311BE Sheepcity Nederl |
|
||||
and NL/REMI/Test money paid by other partner: |
|
||||
/ISDT/2014-01-02 |
|
||||
:62F:C140102EUR000000004833,52 |
|
||||
:20:940S140103 |
|
||||
:25:NL34RABO0142623393 EUR |
|
||||
:28C:0 |
|
||||
:60F:C140102EUR000000004833,52 |
|
||||
:62F:C140103EUR000000004833,52 |
|
||||
:20:940S140106 |
|
||||
:25:NL34RABO0142623393 EUR |
|
||||
:28C:0 |
|
||||
:60F:C140103EUR000000004833,52 |
|
||||
:61:140101D000000000034,61N093NONREF |
|
||||
:86:/BENM//NAME/Kosten/REMI/Periode 01-10-2013 t/m 31-12-2013/ISDT/20 |
|
||||
14-01-01 |
|
||||
:62F:C140106EUR000000004798,91 |
|
||||
:20:940S140107 |
|
||||
:25:NL34RABO0142623393 EUR |
|
||||
:28C:0 |
|
||||
:60F:C140106EUR000000004798,91 |
|
||||
:62F:C140107EUR000000004798,91 |
|
@ -1,78 +0,0 @@ |
|||||
{1:F01SNSBNL2AXXXX0000000000}{2:O940SNSBNL2AXXXXN}{3:}{4: |
|
||||
:20:0000000000 |
|
||||
:25:NL05SNSB0908244436 |
|
||||
:28C:361/1 |
|
||||
:60F:C171227EUR3026,96 |
|
||||
:61:1712271227D713,13NOVBNL49RABO0166416932 |
|
||||
gerrits glas en schilderwerk |
|
||||
:86:NL49RABO0166416932 gerrits glas en schilderwerk |
|
||||
|
|
||||
Factuur 17227/248/20 |
|
||||
|
|
||||
|
|
||||
|
|
||||
:61:1712271227D10,18NBEA//228ohu/972795 |
|
||||
:86: |
|
||||
|
|
||||
Jumbo Wijchen B.V. >WIJCHEN 27.12.2017 13U38 KV005 4XZJ4Z M |
|
||||
CC:5411 Contactloze betaling |
|
||||
|
|
||||
|
|
||||
:61:1712271227D13,52NINCNL94INGB0000869000 |
|
||||
vitens nv |
|
||||
:86:NL94INGB0000869000 vitens nv |
|
||||
|
|
||||
Europese incasso door:VITENS NV NL-Factuurnr 072304597540 VNKlant |
|
||||
nr 00000000000 BTW 0,77PC 6605 DW 6223, DEC-Incassant ID: NL84ZZZ0 |
|
||||
50695810000-Kenmerk Machtiging: bla |
|
||||
|
|
||||
:61:1712271227D25,61NBEA//229hro/195867 |
|
||||
:86: |
|
||||
|
|
||||
Albert Heijn 1370 >WIJCHEN 27.12.2017 19U13 KV006 70X708 M |
|
||||
CC:5411 |
|
||||
|
|
||||
|
|
||||
:62F:C171227EUR2264,52 |
|
||||
-}{5:} |
|
||||
{1:F01SNSBNL2AXXXX0000000000}{2:O940SNSBNL2AXXXXN}{3:}{4: |
|
||||
:20:0000000000 |
|
||||
:25:NL05SNSB0908244436 |
|
||||
:28C:362/1 |
|
||||
:60F:C171228EUR2264,52 |
|
||||
:61:1712281228D10,95NINCNL40RABO0127859497 |
|
||||
antagonist b.v. |
|
||||
:86:NL40RABO0127859497 antagonist b.v. |
|
||||
|
|
||||
Europese incasso door:ANTAGONIST B.V. NL-DDWPN954156 AI529942Cweb |
|
||||
share.nl-Incassant ID: NL65ZZZ091364410000-Kenmerk Machtiging: bla |
|
||||
|
|
||||
:61:1712281228C0,00NDIV |
|
||||
:86: |
|
||||
|
|
||||
Mobiel betalen is vanaf nu niet meer mogelijk voor B |
|
||||
ERG M A VAN DEN met Lenovo P2 |
|
||||
|
|
||||
|
|
||||
:62F:C171228EUR2253,57 |
|
||||
-}{5:} |
|
||||
{1:F01SNSBNL2AXXXX0000000000}{2:O940SNSBNL2AXXXXN}{3:}{4: |
|
||||
:20:0000000000 |
|
||||
:25:NL05SNSB0908244436 |
|
||||
:28C:363/1 |
|
||||
:60F:C171229EUR2253,57 |
|
||||
:61:1712291229D907,29NINCNL19ABNA0427093546 |
|
||||
florius |
|
||||
:86:NL19ABNA0427093546 florius |
|
||||
|
|
||||
Europese incasso door:FLORIUS NL-Verschuldigde bedragen PERIODE 1 |
|
||||
2-2017-Incassant ID: NL42ZZZ080242850000-Kenmerk Machtiging: bla |
|
||||
|
|
||||
:61:1712291229D35,00NINCNL28DEUT0265186439 |
|
||||
stichting derdengelden bucka |
|
||||
:86:NL28DEUT0265186439 stichting derdengelden bucka |
|
||||
|
|
||||
Europese incasso door:STICHTING DERDENGELDEN BUCKAROO-T-Mobile Th |
|
||||
uis B.V.: Rekening dec 2017. Bekijk je rekening op thuismy.t-mobi |
|
||||
le.nl-Incassant ID: NL39ZZZ302317620000-Kenmerk Machtiging: bla |
|
||||
-}{5:} |
|
@ -1,11 +0,0 @@ |
|||||
:9401: |
|
||||
:20:940S140102 |
|
||||
:25:NL34RABO0142623393 EUR |
|
||||
:28C:0 |
|
||||
:60F:C131231EUR000000004433,52 |
|
||||
:61:140102C000000000400,00N541NONREF |
|
||||
NL66RABO0160878799 |
|
||||
:86:/ORDP//NAME/R. SMITH/ADDR/Green market 74 3311BE Sheepcity Nederl |
|
||||
and NL/REMI/Test money paid by other partner: |
|
||||
/ISDT/2014-01-02 |
|
||||
:62F:C140102EUR000000004833,52 |
|
@ -1 +0,0 @@ |
|||||
from . import test_import_bank_statement |
|
@ -1,239 +0,0 @@ |
|||||
# Copyright 2017 Onestein (<http://www.onestein.eu>) |
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
||||
|
|
||||
import base64 |
|
||||
from mock import patch |
|
||||
from odoo.tests.common import TransactionCase |
|
||||
from odoo.modules.module import get_module_resource |
|
||||
from ..mt940 import MT940, get_subfields, handle_common_subfields |
|
||||
|
|
||||
|
|
||||
class TestImport(TransactionCase): |
|
||||
"""Run test to import mt940 import.""" |
|
||||
transactions = [ |
|
||||
{ |
|
||||
'account_number': 'NL46ABNA0499998748', |
|
||||
'amount': -754.25, |
|
||||
'ref': '435005714488-ABNO33052620', |
|
||||
'name': 'test line', |
|
||||
}, |
|
||||
] |
|
||||
|
|
||||
def setUp(self): |
|
||||
super(TestImport, self).setUp() |
|
||||
bank1 = self.env['res.partner.bank'].create({ |
|
||||
'acc_number': 'NL77INGB0574908765', |
|
||||
'partner_id': self.env.ref('base.main_partner').id, |
|
||||
'company_id': self.env.ref('base.main_company').id, |
|
||||
'bank_id': self.env.ref('base.res_bank_1').id, |
|
||||
}) |
|
||||
self.env['account.journal'].create({ |
|
||||
'name': 'Bank Journal - (test1 mt940)', |
|
||||
'code': 'TBNK1MT940', |
|
||||
'type': 'bank', |
|
||||
'bank_account_id': bank1.id, |
|
||||
'currency_id': self.env.ref('base.EUR').id, |
|
||||
}) |
|
||||
bank2 = self.env['res.partner.bank'].create({ |
|
||||
'acc_number': 'NL34RABO0142623393', |
|
||||
'partner_id': self.env.ref('base.main_partner').id, |
|
||||
'company_id': self.env.ref('base.main_company').id, |
|
||||
'bank_id': self.env.ref('base.res_bank_1').id, |
|
||||
}) |
|
||||
self.env['account.journal'].create({ |
|
||||
'name': 'Bank Journal - (test2 mt940)', |
|
||||
'code': 'TBNK2MT940', |
|
||||
'type': 'bank', |
|
||||
'bank_account_id': bank2.id, |
|
||||
'currency_id': self.env.ref('base.EUR').id, |
|
||||
}) |
|
||||
bank3 = self.env['res.partner.bank'].create({ |
|
||||
'acc_number': 'NL05SNSB0908244436', |
|
||||
'partner_id': self.env.ref('base.main_partner').id, |
|
||||
'company_id': self.env.ref('base.main_company').id, |
|
||||
'bank_id': self.env.ref('base.res_bank_1').id, |
|
||||
}) |
|
||||
self.env['account.journal'].create({ |
|
||||
'name': 'Bank Journal - (test3 mt940)', |
|
||||
'code': 'TBNK3MT940', |
|
||||
'type': 'bank', |
|
||||
'bank_account_id': bank3.id, |
|
||||
'currency_id': self.env.ref('base.EUR').id, |
|
||||
}) |
|
||||
|
|
||||
self.data =\ |
|
||||
"/BENM//NAME/Cost/REMI/Period 01-10-2013 t/m 31-12-2013/ISDT/20" |
|
||||
self.codewords = ['BENM', 'ADDR', 'NAME', 'CNTP', 'ISDT', 'REMI'] |
|
||||
|
|
||||
def test_wrong_file_import(self): |
|
||||
"""Test wrong file import.""" |
|
||||
testfile = get_module_resource( |
|
||||
'account_bank_statement_import_mt940_base', |
|
||||
'test_files', |
|
||||
'test-wrong-file.940', |
|
||||
) |
|
||||
parser = MT940() |
|
||||
datafile = open(testfile, 'rb').read() |
|
||||
with self.assertRaises(ValueError): |
|
||||
parser.parse(datafile, header_lines=1) |
|
||||
|
|
||||
def test_statement_import(self): |
|
||||
"""Test correct creation of single statement ING.""" |
|
||||
|
|
||||
def _prepare_statement_lines(statements): |
|
||||
transact = self.transactions[0] |
|
||||
for st_vals in statements[2]: |
|
||||
for line_vals in st_vals['transactions']: |
|
||||
line_vals['amount'] = transact['amount'] |
|
||||
line_vals['name'] = transact['name'] |
|
||||
line_vals['account_number'] = transact['account_number'] |
|
||||
line_vals['ref'] = transact['ref'] |
|
||||
|
|
||||
testfile = get_module_resource( |
|
||||
'account_bank_statement_import_mt940_base', |
|
||||
'test_files', |
|
||||
'test-ing.940', |
|
||||
) |
|
||||
parser = MT940() |
|
||||
datafile = open(testfile, 'rb').read() |
|
||||
statements = parser.parse(datafile, header_lines=1) |
|
||||
|
|
||||
_prepare_statement_lines(statements) |
|
||||
|
|
||||
path_addon = 'odoo.addons.account_bank_statement_import.' |
|
||||
path_file = 'account_bank_statement_import.' |
|
||||
path_class = 'AccountBankStatementImport.' |
|
||||
method = path_addon + path_file + path_class + '_parse_file' |
|
||||
with patch(method) as my_mock: |
|
||||
my_mock.return_value = statements |
|
||||
|
|
||||
action = self.env['account.bank.statement.import'].create({ |
|
||||
'data_file': base64.b64encode(datafile), |
|
||||
}).import_file() |
|
||||
|
|
||||
transact = self.transactions[0] |
|
||||
for statement in self.env['account.bank.statement'].browse( |
|
||||
action['context']['statement_ids']): |
|
||||
for line in statement.line_ids: |
|
||||
self.assertTrue( |
|
||||
line.bank_account_id.acc_number == |
|
||||
transact['account_number']) |
|
||||
self.assertTrue(line.amount == transact['amount']) |
|
||||
self.assertTrue(line.date == '2014-02-20') |
|
||||
self.assertTrue(line.name == transact['name']) |
|
||||
self.assertTrue(line.ref == transact['ref']) |
|
||||
|
|
||||
def test_get_subfields(self): |
|
||||
"""Unit Test function get_subfields().""" |
|
||||
|
|
||||
res = get_subfields(self.data, self.codewords) |
|
||||
espected_res = { |
|
||||
'BENM': [''], |
|
||||
'NAME': ['Cost'], |
|
||||
'REMI': ['Period 01-10-2013 t', 'm 31-12-2013'], |
|
||||
'ISDT': ['20'], |
|
||||
} |
|
||||
self.assertTrue(res == espected_res) |
|
||||
|
|
||||
def test_handle_common_subfields(self): |
|
||||
"""Unit Test function handle_common_subfields().""" |
|
||||
|
|
||||
subfields = get_subfields(self.data, self.codewords) |
|
||||
transaction = self.transactions[0] |
|
||||
|
|
||||
handle_common_subfields(transaction, subfields) |
|
||||
|
|
||||
def test_statement_import2(self): |
|
||||
"""Test correct creation of single statement RABO.""" |
|
||||
|
|
||||
def _prepare_statement_lines(statements): |
|
||||
transact = self.transactions[0] |
|
||||
for st_vals in statements[2]: |
|
||||
for line_vals in st_vals['transactions']: |
|
||||
line_vals['amount'] = transact['amount'] |
|
||||
line_vals['name'] = transact['name'] |
|
||||
line_vals['account_number'] = transact['account_number'] |
|
||||
line_vals['ref'] = transact['ref'] |
|
||||
|
|
||||
testfile = get_module_resource( |
|
||||
'account_bank_statement_import_mt940_base', |
|
||||
'test_files', |
|
||||
'test-rabo.swi', |
|
||||
) |
|
||||
parser = MT940() |
|
||||
parser.header_regex = '^:940:' # Start of header |
|
||||
parser.header_lines = 1 # Number of lines to skip |
|
||||
datafile = open(testfile, 'rb').read() |
|
||||
statements = parser.parse(datafile, header_lines=1) |
|
||||
|
|
||||
_prepare_statement_lines(statements) |
|
||||
|
|
||||
path_addon = 'odoo.addons.account_bank_statement_import.' |
|
||||
path_file = 'account_bank_statement_import.' |
|
||||
path_class = 'AccountBankStatementImport.' |
|
||||
method = path_addon + path_file + path_class + '_parse_file' |
|
||||
with patch(method) as my_mock: |
|
||||
my_mock.return_value = statements |
|
||||
|
|
||||
action = self.env['account.bank.statement.import'].create({ |
|
||||
'data_file': base64.b64encode(datafile), |
|
||||
}).import_file() |
|
||||
# The file contains 4 statements, but only 2 with transactions |
|
||||
self.assertTrue(len(action['context']['statement_ids']) == 2) |
|
||||
transact = self.transactions[0] |
|
||||
for statement in self.env['account.bank.statement'].browse( |
|
||||
action['context']['statement_ids']): |
|
||||
for line in statement.line_ids: |
|
||||
self.assertTrue( |
|
||||
line.bank_account_id.acc_number == |
|
||||
transact['account_number']) |
|
||||
self.assertTrue(line.amount == transact['amount']) |
|
||||
self.assertTrue(line.date) |
|
||||
self.assertTrue(line.name == transact['name']) |
|
||||
self.assertTrue(line.ref == transact['ref']) |
|
||||
|
|
||||
def test_statement_import3(self): |
|
||||
"""Test correct creation of multiple statements SNS.""" |
|
||||
|
|
||||
def _prepare_statement_lines(statements): |
|
||||
transact = self.transactions[0] |
|
||||
for st_vals in statements[2]: |
|
||||
for line_vals in st_vals['transactions']: |
|
||||
line_vals['amount'] = transact['amount'] |
|
||||
line_vals['name'] = transact['name'] |
|
||||
line_vals['account_number'] = transact['account_number'] |
|
||||
line_vals['ref'] = transact['ref'] |
|
||||
|
|
||||
testfile = get_module_resource( |
|
||||
'account_bank_statement_import_mt940_base', |
|
||||
'test_files', |
|
||||
'test-sns.940', |
|
||||
) |
|
||||
parser = MT940() |
|
||||
datafile = open(testfile, 'rb').read() |
|
||||
statements = parser.parse(datafile, header_lines=1) |
|
||||
|
|
||||
_prepare_statement_lines(statements) |
|
||||
|
|
||||
path_addon = 'odoo.addons.account_bank_statement_import.' |
|
||||
path_file = 'account_bank_statement_import.' |
|
||||
path_class = 'AccountBankStatementImport.' |
|
||||
method = path_addon + path_file + path_class + '_parse_file' |
|
||||
with patch(method) as my_mock: |
|
||||
my_mock.return_value = statements |
|
||||
|
|
||||
action = self.env['account.bank.statement.import'].create({ |
|
||||
'data_file': base64.b64encode(datafile), |
|
||||
}).import_file() |
|
||||
self.assertTrue(len(action['context']['statement_ids']) == 3) |
|
||||
transact = self.transactions[-1] |
|
||||
for statement in self.env['account.bank.statement'].browse( |
|
||||
action['context']['statement_ids'][-1]): |
|
||||
for line in statement.line_ids: |
|
||||
self.assertTrue( |
|
||||
line.bank_account_id.acc_number == |
|
||||
transact['account_number']) |
|
||||
self.assertTrue(line.amount == transact['amount']) |
|
||||
self.assertTrue(line.date == statement.date) |
|
||||
self.assertTrue(line.name == transact['name']) |
|
||||
self.assertTrue(line.ref == transact['ref']) |
|
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue