mirror of
https://gitlab.com/flectra-community/l10n-switzerland-flectra.git
synced 2024-12-23 04:41:45 +00:00
ported everything from odoo 14
This commit is contained in:
parent
7132a52425
commit
f83a1be6ee
13
.copier-answers.yml
Normal file
13
.copier-answers.yml
Normal file
@ -0,0 +1,13 @@
|
||||
# Do NOT update manually; changes here will be overwritten by Copier
|
||||
_commit: v1.1.4
|
||||
_src_path: gh:oca/oca-addons-repo-template
|
||||
dependency_installation_mode: PIP
|
||||
generate_requirements_txt: true
|
||||
include_wkhtmltopdf: false
|
||||
odoo_version: 14.0
|
||||
rebel_module_groups: []
|
||||
repo_description: "TODO: add repo description."
|
||||
repo_name: l10n-switzerland
|
||||
repo_slug: l10n-switzerland
|
||||
travis_apt_packages: []
|
||||
travis_apt_sources: []
|
20
.editorconfig
Normal file
20
.editorconfig
Normal file
@ -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
|
180
.eslintrc.yml
Normal file
180
.eslintrc.yml
Normal file
@ -0,0 +1,180 @@
|
||||
env:
|
||||
browser: true
|
||||
|
||||
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
|
||||
parserOptions:
|
||||
ecmaVersion: 2017
|
||||
|
||||
# Globals available in Odoo that shouldn't produce errorings
|
||||
globals:
|
||||
_: readonly
|
||||
$: readonly
|
||||
fuzzy: readonly
|
||||
jQuery: readonly
|
||||
moment: readonly
|
||||
odoo: readonly
|
||||
openerp: readonly
|
||||
Promise: readonly
|
||||
|
||||
# Styling is handled by Prettier, so we only need to enable AST rules;
|
||||
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
|
||||
rules:
|
||||
accessor-pairs: warn
|
||||
array-callback-return: warn
|
||||
callback-return: warn
|
||||
capitalized-comments:
|
||||
- warn
|
||||
- always
|
||||
- ignoreConsecutiveComments: true
|
||||
ignoreInlineComments: true
|
||||
complexity:
|
||||
- warn
|
||||
- 15
|
||||
constructor-super: warn
|
||||
dot-notation: warn
|
||||
eqeqeq: warn
|
||||
global-require: warn
|
||||
handle-callback-err: warn
|
||||
id-blacklist: warn
|
||||
id-match: warn
|
||||
init-declarations: error
|
||||
max-depth: warn
|
||||
max-nested-callbacks: warn
|
||||
max-statements-per-line: warn
|
||||
no-alert: warn
|
||||
no-array-constructor: warn
|
||||
no-caller: warn
|
||||
no-case-declarations: warn
|
||||
no-class-assign: warn
|
||||
no-cond-assign: error
|
||||
no-const-assign: error
|
||||
no-constant-condition: warn
|
||||
no-control-regex: warn
|
||||
no-debugger: error
|
||||
no-delete-var: warn
|
||||
no-div-regex: warn
|
||||
no-dupe-args: error
|
||||
no-dupe-class-members: error
|
||||
no-dupe-keys: error
|
||||
no-duplicate-case: error
|
||||
no-duplicate-imports: error
|
||||
no-else-return: warn
|
||||
no-empty-character-class: warn
|
||||
no-empty-function: error
|
||||
no-empty-pattern: error
|
||||
no-empty: warn
|
||||
no-eq-null: error
|
||||
no-eval: error
|
||||
no-ex-assign: error
|
||||
no-extend-native: warn
|
||||
no-extra-bind: warn
|
||||
no-extra-boolean-cast: warn
|
||||
no-extra-label: warn
|
||||
no-fallthrough: warn
|
||||
no-func-assign: error
|
||||
no-global-assign: error
|
||||
no-implicit-coercion:
|
||||
- warn
|
||||
- allow: ["~"]
|
||||
no-implicit-globals: warn
|
||||
no-implied-eval: warn
|
||||
no-inline-comments: warn
|
||||
no-inner-declarations: warn
|
||||
no-invalid-regexp: warn
|
||||
no-irregular-whitespace: warn
|
||||
no-iterator: warn
|
||||
no-label-var: warn
|
||||
no-labels: warn
|
||||
no-lone-blocks: warn
|
||||
no-lonely-if: error
|
||||
no-mixed-requires: error
|
||||
no-multi-str: warn
|
||||
no-native-reassign: error
|
||||
no-negated-condition: warn
|
||||
no-negated-in-lhs: error
|
||||
no-new-func: warn
|
||||
no-new-object: warn
|
||||
no-new-require: warn
|
||||
no-new-symbol: warn
|
||||
no-new-wrappers: warn
|
||||
no-new: warn
|
||||
no-obj-calls: warn
|
||||
no-octal-escape: warn
|
||||
no-octal: warn
|
||||
no-param-reassign: warn
|
||||
no-path-concat: warn
|
||||
no-process-env: warn
|
||||
no-process-exit: warn
|
||||
no-proto: warn
|
||||
no-prototype-builtins: warn
|
||||
no-redeclare: warn
|
||||
no-regex-spaces: warn
|
||||
no-restricted-globals: warn
|
||||
no-restricted-imports: warn
|
||||
no-restricted-modules: warn
|
||||
no-restricted-syntax: warn
|
||||
no-return-assign: error
|
||||
no-script-url: warn
|
||||
no-self-assign: warn
|
||||
no-self-compare: warn
|
||||
no-sequences: warn
|
||||
no-shadow-restricted-names: warn
|
||||
no-shadow: warn
|
||||
no-sparse-arrays: warn
|
||||
no-sync: warn
|
||||
no-this-before-super: warn
|
||||
no-throw-literal: warn
|
||||
no-undef-init: warn
|
||||
no-undef: error
|
||||
no-unmodified-loop-condition: warn
|
||||
no-unneeded-ternary: error
|
||||
no-unreachable: error
|
||||
no-unsafe-finally: error
|
||||
no-unused-expressions: error
|
||||
no-unused-labels: error
|
||||
no-unused-vars: error
|
||||
no-use-before-define: error
|
||||
no-useless-call: warn
|
||||
no-useless-computed-key: warn
|
||||
no-useless-concat: warn
|
||||
no-useless-constructor: warn
|
||||
no-useless-escape: warn
|
||||
no-useless-rename: warn
|
||||
no-void: warn
|
||||
no-with: warn
|
||||
operator-assignment: [error, always]
|
||||
prefer-const: warn
|
||||
radix: warn
|
||||
require-yield: warn
|
||||
sort-imports: warn
|
||||
spaced-comment: [error, always]
|
||||
strict: [error, function]
|
||||
use-isnan: error
|
||||
valid-jsdoc:
|
||||
- warn
|
||||
- prefer:
|
||||
arg: param
|
||||
argument: param
|
||||
augments: extends
|
||||
constructor: class
|
||||
exception: throws
|
||||
func: function
|
||||
method: function
|
||||
prop: property
|
||||
return: returns
|
||||
virtual: abstract
|
||||
yield: yields
|
||||
preferType:
|
||||
array: Array
|
||||
bool: Boolean
|
||||
boolean: Boolean
|
||||
number: Number
|
||||
object: Object
|
||||
str: String
|
||||
string: String
|
||||
requireParamDescription: false
|
||||
requireReturn: false
|
||||
requireReturnDescription: false
|
||||
requireReturnType: false
|
||||
valid-typeof: warn
|
||||
yoda: warn
|
12
.flake8
Normal file
12
.flake8
Normal file
@ -0,0 +1,12 @@
|
||||
[flake8]
|
||||
max-line-length = 88
|
||||
max-complexity = 16
|
||||
# B = bugbear
|
||||
# B9 = bugbear opinionated (incl line length)
|
||||
select = C,E,F,W,B,B9
|
||||
# E203: whitespace before ':' (black behaviour)
|
||||
# E501: flake8 line length (covered by bugbear B950)
|
||||
# W503: line break before binary operator (black behaviour)
|
||||
ignore = E203,E501,W503
|
||||
per-file-ignores=
|
||||
__init__.py:F401
|
75
.gitignore
vendored
Normal file
75
.gitignore
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
/.venv
|
||||
/.pytest_cache
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
bin/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
*.eggs
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
# Pycharm
|
||||
.idea
|
||||
|
||||
# Eclipse
|
||||
.settings
|
||||
|
||||
# Visual Studio cache/options directory
|
||||
.vs/
|
||||
.vscode
|
||||
|
||||
# OSX Files
|
||||
.DS_Store
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
||||
|
||||
# Rope
|
||||
.ropeproject
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# Backup files
|
||||
*~
|
||||
*.swp
|
||||
|
||||
# OCA rules
|
||||
!static/lib/
|
13
.isort.cfg
Normal file
13
.isort.cfg
Normal file
@ -0,0 +1,13 @@
|
||||
[settings]
|
||||
; see https://github.com/psf/black
|
||||
multi_line_output=3
|
||||
include_trailing_comma=True
|
||||
force_grid_wrap=0
|
||||
combine_as_imports=True
|
||||
use_parentheses=True
|
||||
line_length=88
|
||||
known_odoo=odoo
|
||||
known_odoo_addons=odoo.addons
|
||||
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
|
||||
default_section=THIRDPARTY
|
||||
ensure_newline_before_comments = True
|
137
.pre-commit-config.yaml
Normal file
137
.pre-commit-config.yaml
Normal file
@ -0,0 +1,137 @@
|
||||
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/|
|
||||
# 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
|
||||
node: "14.13.0"
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
# These files are most likely copier diff rejection junks; if found,
|
||||
# review them manually, fix the problem (if needed) and remove them
|
||||
- id: forbidden-files
|
||||
name: forbidden files
|
||||
entry: found forbidden files; remove them
|
||||
language: fail
|
||||
files: "\\.rej$"
|
||||
- repo: https://github.com/oca/maintainer-tools
|
||||
rev: ab1d7f6
|
||||
hooks:
|
||||
# update the NOT INSTALLABLE ADDONS section above
|
||||
- id: oca-update-pre-commit-excluded-addons
|
||||
- id: oca-fix-manifest-website
|
||||
args: ["https://github.com/OCA/l10n-switzerland"]
|
||||
- repo: https://github.com/myint/autoflake
|
||||
rev: v1.4
|
||||
hooks:
|
||||
- id: autoflake
|
||||
args:
|
||||
- --expand-star-imports
|
||||
- --ignore-init-module-imports
|
||||
- --in-place
|
||||
- --remove-all-unused-imports
|
||||
- --remove-duplicate-keys
|
||||
- --remove-unused-variables
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 20.8b1
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v2.1.2
|
||||
hooks:
|
||||
- id: prettier
|
||||
name: prettier (with plugin-xml)
|
||||
additional_dependencies:
|
||||
- "prettier@2.1.2"
|
||||
- "@prettier/plugin-xml@0.12.0"
|
||||
args:
|
||||
- --plugin=@prettier/plugin-xml
|
||||
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
|
||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
||||
rev: v7.8.1
|
||||
hooks:
|
||||
- id: eslint
|
||||
verbose: true
|
||||
args:
|
||||
- --color
|
||||
- --fix
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
# exclude autogenerated files
|
||||
exclude: /README\.rst$|\.pot?$
|
||||
- id: end-of-file-fixer
|
||||
# exclude autogenerated files
|
||||
exclude: /README\.rst$|\.pot?$
|
||||
- id: debug-statements
|
||||
- id: fix-encoding-pragma
|
||||
args: ["--remove"]
|
||||
- id: check-case-conflict
|
||||
- id: check-docstring-first
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-merge-conflict
|
||||
# exclude files where underlines are not distinguishable from merge conflicts
|
||||
exclude: /README\.rst$|^docs/.*\.rst$
|
||||
- id: check-symlinks
|
||||
- id: check-xml
|
||||
- id: mixed-line-ending
|
||||
args: ["--fix=lf"]
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.7.2
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: ["--keep-percent-format"]
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.5.1
|
||||
hooks:
|
||||
- id: isort
|
||||
name: isort except __init__.py
|
||||
args:
|
||||
- --settings=.
|
||||
exclude: /__init__\.py$
|
||||
- repo: https://github.com/acsone/setuptools-odoo
|
||||
rev: 2.6.0
|
||||
hooks:
|
||||
- id: setuptools-odoo-make-default
|
||||
- id: setuptools-odoo-get-requirements
|
||||
args:
|
||||
- --output
|
||||
- requirements.txt
|
||||
- --header
|
||||
- "# generated from manifests external_dependencies"
|
||||
- repo: https://gitlab.com/PyCQA/flake8
|
||||
rev: 3.8.3
|
||||
hooks:
|
||||
- id: flake8
|
||||
name: flake8
|
||||
additional_dependencies: ["flake8-bugbear==20.1.4"]
|
||||
- repo: https://github.com/PyCQA/pylint
|
||||
rev: pylint-2.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
|
8
.prettierrc.yml
Normal file
8
.prettierrc.yml
Normal file
@ -0,0 +1,8 @@
|
||||
# Defaults for all prettier-supported languages.
|
||||
# Prettier will complete this with settings from .editorconfig file.
|
||||
bracketSpacing: false
|
||||
printWidth: 88
|
||||
proseWrap: always
|
||||
semi: true
|
||||
trailingComma: "es5"
|
||||
xmlWhitespaceSensitivity: "strict"
|
88
.pylintrc
Normal file
88
.pylintrc
Normal file
@ -0,0 +1,88 @@
|
||||
[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=14.0
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=all
|
||||
|
||||
# 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.
|
||||
|
||||
enable=anomalous-backslash-in-string,
|
||||
api-one-deprecated,
|
||||
api-one-multi-together,
|
||||
assignment-from-none,
|
||||
attribute-deprecated,
|
||||
class-camelcase,
|
||||
dangerous-default-value,
|
||||
dangerous-view-replace-wo-priority,
|
||||
development-status-allowed,
|
||||
duplicate-id-csv,
|
||||
duplicate-key,
|
||||
duplicate-xml-fields,
|
||||
duplicate-xml-record-id,
|
||||
eval-referenced,
|
||||
eval-used,
|
||||
incoherent-interpreter-exec-perm,
|
||||
license-allowed,
|
||||
manifest-author-string,
|
||||
manifest-deprecated-key,
|
||||
manifest-required-author,
|
||||
manifest-required-key,
|
||||
manifest-version-format,
|
||||
method-compute,
|
||||
method-inverse,
|
||||
method-required-super,
|
||||
method-search,
|
||||
openerp-exception-warning,
|
||||
pointless-statement,
|
||||
pointless-string-statement,
|
||||
print-used,
|
||||
redundant-keyword-arg,
|
||||
redundant-modulename-xml,
|
||||
reimported,
|
||||
relative-import,
|
||||
return-in-init,
|
||||
rst-syntax-error,
|
||||
sql-injection,
|
||||
too-few-format-args,
|
||||
translation-field,
|
||||
translation-required,
|
||||
unreachable,
|
||||
use-vim-comment,
|
||||
wrong-tabs-instead-of-spaces,
|
||||
xml-syntax-error,
|
||||
# messages that do not cause the lint step to fail
|
||||
consider-merging-classes-inherited,
|
||||
create-user-wo-reset-password,
|
||||
dangerous-filter-wo-user,
|
||||
deprecated-module,
|
||||
file-not-used,
|
||||
invalid-commit,
|
||||
missing-manifest-dependency,
|
||||
missing-newline-extrafiles,
|
||||
missing-readme,
|
||||
no-utf8-coding-comment,
|
||||
odoo-addons-relative-import,
|
||||
old-api7-method-defined,
|
||||
redefined-builtin,
|
||||
too-complex,
|
||||
unnecessary-utf8-coding-comment
|
||||
|
||||
|
||||
[REPORTS]
|
||||
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
|
||||
output-format=colorized
|
||||
reports=no
|
64
.pylintrc-mandatory
Normal file
64
.pylintrc-mandatory
Normal file
@ -0,0 +1,64 @@
|
||||
[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=14.0
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=all
|
||||
|
||||
enable=anomalous-backslash-in-string,
|
||||
api-one-deprecated,
|
||||
api-one-multi-together,
|
||||
assignment-from-none,
|
||||
attribute-deprecated,
|
||||
class-camelcase,
|
||||
dangerous-default-value,
|
||||
dangerous-view-replace-wo-priority,
|
||||
development-status-allowed,
|
||||
duplicate-id-csv,
|
||||
duplicate-key,
|
||||
duplicate-xml-fields,
|
||||
duplicate-xml-record-id,
|
||||
eval-referenced,
|
||||
eval-used,
|
||||
incoherent-interpreter-exec-perm,
|
||||
license-allowed,
|
||||
manifest-author-string,
|
||||
manifest-deprecated-key,
|
||||
manifest-required-author,
|
||||
manifest-required-key,
|
||||
manifest-version-format,
|
||||
method-compute,
|
||||
method-inverse,
|
||||
method-required-super,
|
||||
method-search,
|
||||
openerp-exception-warning,
|
||||
pointless-statement,
|
||||
pointless-string-statement,
|
||||
print-used,
|
||||
redundant-keyword-arg,
|
||||
redundant-modulename-xml,
|
||||
reimported,
|
||||
relative-import,
|
||||
return-in-init,
|
||||
rst-syntax-error,
|
||||
sql-injection,
|
||||
too-few-format-args,
|
||||
translation-field,
|
||||
translation-required,
|
||||
unreachable,
|
||||
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
|
42
.travis.yml
Normal file
42
.travis.yml
Normal file
@ -0,0 +1,42 @@
|
||||
language: python
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/pip
|
||||
- $HOME/.cache/pre-commit
|
||||
|
||||
python:
|
||||
- "3.6"
|
||||
|
||||
addons:
|
||||
postgresql: "9.6"
|
||||
apt:
|
||||
packages:
|
||||
- expect-dev # provides unbuffer utility
|
||||
|
||||
stages:
|
||||
- test
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
env:
|
||||
- TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1"
|
||||
- stage: test
|
||||
env:
|
||||
- TESTS=1 ODOO_REPO="OCA/OCB"
|
||||
env:
|
||||
global:
|
||||
- VERSION="14.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
|
||||
- MQT_DEP=PIP
|
||||
|
||||
install:
|
||||
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git
|
||||
${HOME}/maintainer-quality-tools
|
||||
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
|
||||
- travis_install_nightly
|
||||
|
||||
script:
|
||||
- travis_run_tests
|
||||
|
||||
after_success:
|
||||
- travis_after_tests_success
|
10
CONTRIBUTING.md
Normal file
10
CONTRIBUTING.md
Normal file
@ -0,0 +1,10 @@
|
||||
# OCA Guidelines
|
||||
|
||||
Please follow the official guide from the
|
||||
[OCA Guidelines page](https://odoo-community.org/page/contributing).
|
||||
|
||||
## Project Specific Guidelines
|
||||
|
||||
<!-- /!\ do not modify above this line -->
|
||||
|
||||
This project does not have specific coding guidelines.
|
661
LICENSE
Normal file
661
LICENSE
Normal file
@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
41
README.md
41
README.md
@ -1 +1,42 @@
|
||||
[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat/125/14.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-l10n-switzerland-125)
|
||||
[![Build Status](https://travis-ci.com/OCA/l10n-switzerland.svg?branch=14.0)](https://travis-ci.com/OCA/l10n-switzerland)
|
||||
[![codecov](https://codecov.io/gh/OCA/l10n-switzerland/branch/14.0/graph/badge.svg)](https://codecov.io/gh/OCA/l10n-switzerland)
|
||||
[![Translation Status](https://translation.odoo-community.org/widgets/l10n-switzerland-14-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/l10n-switzerland-14-0/?utm_source=widget)
|
||||
|
||||
<!-- /!\ do not modify above this line -->
|
||||
|
||||
# l10n-switzerland
|
||||
|
||||
TODO: add repo description.
|
||||
|
||||
<!-- /!\ do not modify below this line -->
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
[//]: # (addons)
|
||||
|
||||
Available addons
|
||||
----------------
|
||||
addon | version | summary
|
||||
--- | --- | ---
|
||||
[l10n_ch_base_bank](l10n_ch_base_bank/) | 14.0.1.0.0 | Types and number validation for swiss electronic pmnt. DTA, ESR
|
||||
[l10n_ch_account_tags](l10n_ch_account_tags/) | 14.0.1.0.0 | Localisation
|
||||
[l10n_ch_invoice_reports](l10n_ch_invoice_reports/) | 14.0.1.0.0 | Extend invoice to add ISR/QR payment slip
|
||||
|
||||
[//]: # (end addons)
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Licenses
|
||||
|
||||
This repository is licensed under [AGPL-3.0](LICENSE).
|
||||
|
||||
However, each module can have a totally different license, as long as they adhere to OCA
|
||||
policy. Consult each module's `__manifest__.py` file, which contains a `license` key
|
||||
that explains its license.
|
||||
|
||||
----
|
||||
|
||||
OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit
|
||||
organization whose mission is to support the collaborative development of Odoo features
|
||||
and promote its widespread use.
|
||||
|
130
ebill_paynet/README.rst
Normal file
130
ebill_paynet/README.rst
Normal file
@ -0,0 +1,130 @@
|
||||
============
|
||||
eBill Paynet
|
||||
============
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! 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%2Fl10n--switzerland-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/l10n-switzerland/tree/14.0/ebill_paynet
|
||||
:alt: OCA/l10n-switzerland
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/l10n-switzerland-14-0/l10n-switzerland-14-0-ebill_paynet
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/125/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module implements the exchange of electronic invoices with the SIXT Paynet infrastructure used in Switzerland.
|
||||
|
||||
It allows the automatic sending of invoice to customer that have registered with the service.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
This module depends on `base_ebill_payment_contract` which is located on `OCA/account_invoicing`, so this repository must also be present on the system.
|
||||
This `base_ebill_payment_contract` module depends on `account_invoice_transmit_method` which will also be installed.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
## Create a service
|
||||
|
||||
To create a service you need to be registred with SIXT Paynet service. Then the configuration of the service can be done in `Accounting - Configuration - Payments - Paynet Service`
|
||||
|
||||
## Configure the customers
|
||||
|
||||
A customer that wants to receive his invoices through Paynet will also need to register with the service.
|
||||
In Odoo to enable the sending of invoices for a specific customer through Paynet, the transmit method must be set accordingly for that customer. This is done on the customer form in the tab `Sales & Purchases` section `Sales`.
|
||||
|
||||
## Configure the contracts
|
||||
|
||||
The contracts specific to e-billing are located in `Accounting - Customers - eBill Payment Contract`
|
||||
Although the Paynet system allows for automatic exchange of contract registration and status changes, this automation is not yet implemented.
|
||||
To be active a contract needs to be in the state `Open` and it's start/end dates to be valid.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need to:
|
||||
|
||||
#. Configure the service, customers and contracts as described in the CONFIGURATION section.
|
||||
#. Create an invoice for a customer with an open Paynet contract.
|
||||
#. Validate the invoice, and it will be send to the service.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
To Do
|
||||
|
||||
* The B2C invoice generated is only a draft and not tested, yet.
|
||||
* Invoice in currency other than CHF will not be generated correctly.
|
||||
* Implementation of the automatic registration of contracts, is not impemented and probably not supported by the DWS
|
||||
|
||||
Improvements
|
||||
|
||||
* On the contract view the list of messages for that contract could be visible.
|
||||
* When an error is returned by the service it should be clearer where it is located in the payload send.
|
||||
* In the chatter add a link to the job when it fails
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/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/l10n-switzerland/issues/new?body=module:%20ebill_paynet%0Aversion:%2014.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 SA
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
||||
|
||||
Other credits
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
|
||||
* Camptocamp
|
||||
|
||||
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/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/14.0/ebill_paynet>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
2
ebill_paynet/__init__.py
Normal file
2
ebill_paynet/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
from . import components
|
||||
from . import models
|
34
ebill_paynet/__manifest__.py
Normal file
34
ebill_paynet/__manifest__.py
Normal file
@ -0,0 +1,34 @@
|
||||
# Copyright 2019-2020 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "eBill Paynet",
|
||||
"summary": """
|
||||
Paynet platform bridge implementation""",
|
||||
"version": "14.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "Camptocamp SA,Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/l10n-switzerland",
|
||||
"depends": [
|
||||
"account",
|
||||
"account_invoice_export",
|
||||
"base_ebill_payment_contract",
|
||||
"l10n_ch_base_bank",
|
||||
"l10n_ch_qriban",
|
||||
"queue_job",
|
||||
"sale",
|
||||
"mass_mailing",
|
||||
],
|
||||
"external_dependencies": {"python": ["zeep"]},
|
||||
"data": [
|
||||
"data/transmit.method.xml",
|
||||
"data/ir_cron.xml",
|
||||
"data/mail_activity_type.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"views/ebill_payment_contract.xml",
|
||||
"views/message_template.xml",
|
||||
"views/paynet_service.xml",
|
||||
"views/paynet_invoice_message.xml",
|
||||
],
|
||||
"demo": [],
|
||||
}
|
1
ebill_paynet/components/__init__.py
Normal file
1
ebill_paynet/components/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from . import api
|
58
ebill_paynet/components/api.py
Normal file
58
ebill_paynet/components/api.py
Normal file
@ -0,0 +1,58 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
import requests
|
||||
import zeep
|
||||
from lxml import html
|
||||
|
||||
from odoo.modules.module import get_resource_path
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
WSDL_DOC = os.path.join(os.path.dirname(__file__), "wsdl", "DWSPayNet.wsdl")
|
||||
SSL_PROD_CERTIFICATE = get_resource_path(
|
||||
"ebill_paynet", "certificats", "prod_services_chain.pem"
|
||||
)
|
||||
SSL_TEST_CERTIFICATE = get_resource_path(
|
||||
"ebill_paynet", "certificats", "test_services_chain.pem"
|
||||
)
|
||||
|
||||
|
||||
class PayNetDWS:
|
||||
"""PayNet DWS web services."""
|
||||
|
||||
def __init__(self, url, test_service):
|
||||
settings = zeep.Settings(xml_huge_tree=True)
|
||||
session = requests.Session()
|
||||
if test_service:
|
||||
session.verify = SSL_TEST_CERTIFICATE
|
||||
else:
|
||||
session.verify = SSL_PROD_CERTIFICATE
|
||||
transport = zeep.transports.Transport(session=session)
|
||||
self.client = zeep.Client(WSDL_DOC, transport=transport, settings=settings)
|
||||
if url:
|
||||
self.service = self.client.create_service(
|
||||
"{http://www.sap.com/DWS}DWSBinding", url
|
||||
)
|
||||
else:
|
||||
self.service = self.client.service
|
||||
|
||||
@staticmethod
|
||||
def authorization(userid, password):
|
||||
"""Generate Authorization node."""
|
||||
return {"UserName": userid, "Password": password}
|
||||
|
||||
@staticmethod
|
||||
def handle_fault(fault):
|
||||
msg = ("{}\n" "code: {} -> {}\n" "actor: {}\n" "detail: {}\n").format(
|
||||
fault.message.upper(),
|
||||
fault.code,
|
||||
fault.subcodes,
|
||||
fault.actor,
|
||||
html.tostring(fault.detail),
|
||||
)
|
||||
_logger.info("Paynet DWS fault : {}".format(msg))
|
||||
return msg
|
108
ebill_paynet/components/certificats/prod_services_chain.pem
Normal file
108
ebill_paynet/components/certificats/prod_services_chain.pem
Normal file
@ -0,0 +1,108 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGaTCCBVGgAwIBAgIUWba4DmLQ0dWzDjnsaT2OQ8rbIGwwDQYJKoZIhvcNAQEL
|
||||
BQAwVDELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEuMCwGA1UE
|
||||
AxMlU3dpc3NTaWduIFBlcnNvbmFsIEdvbGQgQ0EgMjAxNCAtIEcyMjAeFw0xNzEx
|
||||
MjAwOTU5NDRaFw0yMjExMjAwOTU5NDRaMIGYMQswCQYDVQQGEwJDSDELMAkGA1UE
|
||||
CBMCWkgxFjAUBgNVBAoTDVNJWCBQYXluZXQgQUcxGjAYBgNVBAsTEVBheW5ldCBw
|
||||
cm9kdWN0aW9uMSYwJAYJKoZIhvcNAQkBFhdzdXBwb3J0Y2VudGVyQHBheW5ldC5j
|
||||
aDEgMB4GA1UEAxMXcHNldWRvOiBTeXN0ZW0tU2VydmljZXMwggEiMA0GCSqGSIb3
|
||||
DQEBAQUAA4IBDwAwggEKAoIBAQCZKGdFfKvzyIIjIHAa0Cke7K7fmHeUicyDTcUD
|
||||
uHkzKgug1gXIBVcp8BUxlWa4i2z4CeR+ovGL6J/qlCySAOAF/gTd9toIfsBtZvpw
|
||||
IuBxCSoik/ctTwFTw8DKBWGEwgWjPDm2mZBqHpHMsr1q2IXueLT0vZnTMvfsnR1d
|
||||
EqD1lsX5q8expQdfhjoo51hRAh9ZUGvCfIuQUJBpVb2NkGPHJVD36wzQHANyJUxL
|
||||
sM4GvNCLYiJn9HtAAppxoOaEgiwA36iQuOI5j2g22RhCIdUATfSGhmNWsL8DBc+0
|
||||
vEH+NXsa1j+teQ7jOjA4b4e6PSFZaV3p/J3OCS8CN4nYtMgBAgMBQhWjggLsMIIC
|
||||
6DAiBgNVHREEGzAZgRdzdXBwb3J0Y2VudGVyQHBheW5ldC5jaDAOBgNVHQ8BAf8E
|
||||
BAMCA/gwNQYDVR0lBC4wLAYIKwYBBQUHAwIGCCsGAQUFBwMEBgorBgEEAYI3CgME
|
||||
BgorBgEEAYI3FAICMB0GA1UdDgQWBBSpA61TR1vJwbygReWdyy696hwRKjAfBgNV
|
||||
HSMEGDAWgBTaMvlJ+FHMmHFmDNnOttuSPwlL7zCB/wYDVR0fBIH3MIH0MEegRaBD
|
||||
hkFodHRwOi8vY3JsLnN3aXNzc2lnbi5uZXQvREEzMkY5NDlGODUxQ0M5ODcxNjYw
|
||||
Q0Q5Q0VCNkRCOTIzRjA5NEJFRjCBqKCBpaCBooaBn2xkYXA6Ly9kaXJlY3Rvcnku
|
||||
c3dpc3NzaWduLm5ldC9DTj1EQTMyRjk0OUY4NTFDQzk4NzE2NjBDRDlDRUI2REI5
|
||||
MjNGMDk0QkVGJTJDTz1Td2lzc1NpZ24lMkNDPUNIP2NlcnRpZmljYXRlUmV2b2Nh
|
||||
dGlvbkxpc3Q/YmFzZT9vYmplY3RDbGFzcz1jUkxEaXN0cmlidXRpb25Qb2ludDBf
|
||||
BgNVHSAEWDBWMFQGCWCFdAFZAQIBBjBHMEUGCCsGAQUFBwIBFjlodHRwOi8vcmVw
|
||||
b3NpdG9yeS5zd2lzc3NpZ24uY29tL1N3aXNzU2lnbi1Hb2xkLUNQLUNQUy5wZGYw
|
||||
gdcGCCsGAQUFBwEBBIHKMIHHMGQGCCsGAQUFBzAChlhodHRwOi8vc3dpc3NzaWdu
|
||||
Lm5ldC9jZ2ktYmluL2F1dGhvcml0eS9kb3dubG9hZC9EQTMyRjk0OUY4NTFDQzk4
|
||||
NzE2NjBDRDlDRUI2REI5MjNGMDk0QkVGMF8GCCsGAQUFBzABhlNodHRwOi8vZ29s
|
||||
ZC1wZXJzb25hbC1nMi5vY3NwLnN3aXNzc2lnbi5uZXQvREEzMkY5NDlGODUxQ0M5
|
||||
ODcxNjYwQ0Q5Q0VCNkRCOTIzRjA5NEJFRjANBgkqhkiG9w0BAQsFAAOCAQEAYHiL
|
||||
SurldkBD3sra6oQ0LygKueuJobgrrJmkAnvfCZbjbgd12IJs7ayDG1Eu7hhFWh+8
|
||||
7JkbcfwZMgYkpfN7ogHZYm9Sl3nf3hfCXqnxji2Hzeb7GZFrmQ/BOBdrCIEaTZwf
|
||||
MjHPVOQ0XhNVGb8oFE4xSeK7yhLZlue33xNEGEKYlC8hwyCj690OhCJVzr5l7obf
|
||||
0821KA2L/pXb0HmuXQkev+ECF9D1T/nsswIj2IJFlxDvnTpvYiUxBh3Mj8GnPHrS
|
||||
R+vsIlcRYa1OGm10Nfwe7EnpTf+pAm5iKepxhcReFKzXQA12xkEquNgIr8sa76+y
|
||||
Eg95jNEZxB9wC4bIJQ==
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGuDCCBKCgAwIBAgIPGReV3CJ0GxId21RMXMvcMA0GCSqGSIb3DQEBCwUAMEUx
|
||||
CzAJBgNVBAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3
|
||||
aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcNMTQwOTE5MTQxMDI1WhcNMjkwOTE1MTQx
|
||||
MDI1WjBUMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMS4wLAYD
|
||||
VQQDEyVTd2lzc1NpZ24gUGVyc29uYWwgR29sZCBDQSAyMDE0IC0gRzIyMIIBIjAN
|
||||
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnrf0T2JFsx4NPb+TUBInPgv9nUyF
|
||||
9dMJh7sQL66HybrB2devqNc1+Gq+fFT4tfBa9hbI+xqRRqCO0LoQOJ3v3XMlOzQ3
|
||||
zTL+b3wgDvs/d8tZ7LWGOSYF480/rL1aaBIQFlrE62GDQvcmkH/C8QxsSS+T+ga2
|
||||
FQhC/Br/btveNcP6cz87WyshF8IU/7sOKYqh3o5mbxI641R1u3+zaiGq8A9620pS
|
||||
oW3b9P1Mf5t4z51ifqb+/QsYtDt60dw+mVES6sk8cl9VRLejcuiXFyVJaj7YyITi
|
||||
or33buzheHvzZdxaQSgeq0mIrvmXqtplZoqXQ12irR7xhuf/w9UtFBbqCwIDAQAB
|
||||
o4IClDCCApAwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYD
|
||||
VR0OBBYEFNoy+Un4UcyYcWYM2c6225I/CUvvMB8GA1UdIwQYMBaAFFsle5akZVF+
|
||||
uDnzwHhmXug65/DuMIH/BgNVHR8EgfcwgfQwR6BFoEOGQWh0dHA6Ly9jcmwuc3dp
|
||||
c3NzaWduLm5ldC81QjI1N0I5NkE0NjU1MTdFQjgzOUYzQzA3ODY2NUVFODNBRTdG
|
||||
MEVFMIGooIGloIGihoGfbGRhcDovL2RpcmVjdG9yeS5zd2lzc3NpZ24ubmV0L0NO
|
||||
PTVCMjU3Qjk2QTQ2NTUxN0VCODM5RjNDMDc4NjY1RUU4M0FFN0YwRUUlMkNPPVN3
|
||||
aXNzU2lnbiUyQ0M9Q0g/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdD9iYXNlP29i
|
||||
amVjdENsYXNzPWNSTERpc3RyaWJ1dGlvblBvaW50MF8GA1UdIARYMFYwVAYJYIV0
|
||||
AVkBAgEGMEcwRQYIKwYBBQUHAgEWOWh0dHA6Ly9yZXBvc2l0b3J5LnN3aXNzc2ln
|
||||
bi5jb20vU3dpc3NTaWduLUdvbGQtQ1AtQ1BTLnBkZjCBxgYIKwYBBQUHAQEEgbkw
|
||||
gbYwZAYIKwYBBQUHMAKGWGh0dHA6Ly9zd2lzc3NpZ24ubmV0L2NnaS1iaW4vYXV0
|
||||
aG9yaXR5L2Rvd25sb2FkLzVCMjU3Qjk2QTQ2NTUxN0VCODM5RjNDMDc4NjY1RUU4
|
||||
M0FFN0YwRUUwTgYIKwYBBQUHMAGGQmh0dHA6Ly9vY3NwLnN3aXNzc2lnbi5uZXQv
|
||||
NUIyNTdCOTZBNDY1NTE3RUI4MzlGM0MwNzg2NjVFRTgzQUU3RjBFRTANBgkqhkiG
|
||||
9w0BAQsFAAOCAgEArevbqCOPH6va0x4oEb4UviyXJzIokl5MjRADlGMDFXaKm52m
|
||||
U+IZlJ9PjcqBiEXhjjD1oR8uV5aVRWXH+auI6JgQZz5L+u2a309bDu3bcineP45v
|
||||
Z+nAuoDvulmx2nqjloCOturaks727w/nHCoz723eYH46fg//q/a5QnOoBe+WIiZW
|
||||
T71TcycX4hiVcPwVqB53tL9IM2qe2balnCpZKorZWVHQXYWSO5MIBaw/iMOwCCpf
|
||||
lDRU75TruHPjfE4Bu4U9Nm3NBt3zcc5ykcQ8ZbJzkWLnSi2LY8r71Ulc3jxqyWOZ
|
||||
QbgS14x/BzVQj4Rk9+X8KovGpooAFVIBR/bdU/z2IdZlENgoPNpJokuEH5OS6UZS
|
||||
yNmhhXjI2QGXn91G+QV4++kreVz6heVOhDPgOoOfRXLYG9O/9wqPMthmUQgcTrym
|
||||
p57bPpM0zIYpHxcKfxhoYprQdO3LuU1F2xkZE2vFLWVB9ugHzXd1ADIKrrGgJXPf
|
||||
MluXT9wK8BzTcI5cOqhESt4Awq5q9fmiW3OUAROL0Ca0Z/sRQcvvJ/ewlZvLdsym
|
||||
cfjV6JtN7/IBgIJ4D/Js4DRWCwAv1jhBiEGsRAlhiJmep//U1HEaT9oredt9PYS1
|
||||
iKbkcMuDEtPuYXrQ+8OQmMEwMbOFboZMMTOVNOenLH+EiG6BUnowTwqqjtA=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
|
||||
BAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2ln
|
||||
biBHb2xkIENBIC0gRzIwHhcNMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBF
|
||||
MQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMR8wHQYDVQQDExZT
|
||||
d2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
|
||||
CgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUqt2/8
|
||||
76LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+
|
||||
bbqBHH5CjCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c
|
||||
6bM8K8vzARO/Ws/BtQpgvd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqE
|
||||
emA8atufK+ze3gE/bk3lUIbLtK/tREDFylqM2tIrfKjuvqblCqoOpd8FUrdVxyJd
|
||||
MmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvRAiTysybUa9oEVeXBCsdt
|
||||
MDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuendjIj3o02y
|
||||
MszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69y
|
||||
FGkOpeUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPi
|
||||
aG59je883WX0XaxR7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxM
|
||||
gI93e2CaHt+28kgeDrpOVG2Y4OGiGqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCB
|
||||
qTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWyV7
|
||||
lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64OfPAeGZe6Drn
|
||||
8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
|
||||
L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe6
|
||||
45R88a7A3hfm5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczO
|
||||
UYrHUDFu4Up+GC9pWbY9ZIEr44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5
|
||||
O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOfMke6UiI0HTJ6CVanfCU2qT1L2sCC
|
||||
bwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6mGu6uLftIdxf+u+yv
|
||||
GPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxpmo/a
|
||||
77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCC
|
||||
hdiDyyJkvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid3
|
||||
92qgQmwLOM7XdVAyksLfKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEpp
|
||||
Ld6leNcG2mqeSz53OiATIgHQv2ieY2BrNU0LbbqhPcCT4H8js1WtciVORvnSFu+w
|
||||
ZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6LqjviOvrv1vA+ACOzB2+htt
|
||||
Qc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
|
||||
-----END CERTIFICATE-----
|
108
ebill_paynet/components/certificats/test_services_chain.pem
Normal file
108
ebill_paynet/components/certificats/test_services_chain.pem
Normal file
@ -0,0 +1,108 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGYzCCBUugAwIBAgIUWdrIKM3bJ8JpG1C7eTGiyjv34rswDQYJKoZIhvcNAQEL
|
||||
BQAwVDELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEuMCwGA1UE
|
||||
AxMlU3dpc3NTaWduIFBlcnNvbmFsIEdvbGQgQ0EgMjAxNCAtIEcyMjAeFw0xNzEx
|
||||
MjAwOTU2NTBaFw0yMjExMjAwOTU2NTBaMIGSMQswCQYDVQQGEwJDSDELMAkGA1UE
|
||||
CBMCWkgxFjAUBgNVBAoTDVNJWCBQYXluZXQgQUcxFDASBgNVBAsTC1BheW5ldCB0
|
||||
ZXN0MSYwJAYJKoZIhvcNAQkBFhdzdXBwb3J0Y2VudGVyQHBheW5ldC5jaDEgMB4G
|
||||
A1UEAxMXcHNldWRvOiBTeXN0ZW0tU2VydmljZXMwggEiMA0GCSqGSIb3DQEBAQUA
|
||||
A4IBDwAwggEKAoIBAQCypeouG2k5NzPRVMvXWgtQmRdGi9ix2LD+B0iC0xkBiFn6
|
||||
MZnvchjqenwY66xleqn1plryb1B5aCX1q04RBtEgXj7P9WL4p7TpjtXIneoY2UuO
|
||||
ir97GmfgMLwnhwxq612AofsFwa2TujRAGWycMUNzUFMpifWP61vcXxVS/vZ/DM7h
|
||||
UGwOk6d4YLDk37UrtPke1nIzvG59QI0yDSe3B3pp9RQ3RSZHCnYuNOZVgSOYn2XR
|
||||
NbkZWY1Vl3O7eqGp9pcfuVQlgXkm7HiBj19MXcwL7HilYnvH0d812LuO3f48Xrtq
|
||||
ya7b1sfmKS2HnlydMfHrW30FkKSNIu8soN55Qm9bAgMBLj2jggLsMIIC6DAiBgNV
|
||||
HREEGzAZgRdzdXBwb3J0Y2VudGVyQHBheW5ldC5jaDAOBgNVHQ8BAf8EBAMCA/gw
|
||||
NQYDVR0lBC4wLAYIKwYBBQUHAwIGCCsGAQUFBwMEBgorBgEEAYI3CgMEBgorBgEE
|
||||
AYI3FAICMB0GA1UdDgQWBBQtnW9uvu1S1/48B4sogUt1iVX9ZjAfBgNVHSMEGDAW
|
||||
gBTaMvlJ+FHMmHFmDNnOttuSPwlL7zCB/wYDVR0fBIH3MIH0MEegRaBDhkFodHRw
|
||||
Oi8vY3JsLnN3aXNzc2lnbi5uZXQvREEzMkY5NDlGODUxQ0M5ODcxNjYwQ0Q5Q0VC
|
||||
NkRCOTIzRjA5NEJFRjCBqKCBpaCBooaBn2xkYXA6Ly9kaXJlY3Rvcnkuc3dpc3Nz
|
||||
aWduLm5ldC9DTj1EQTMyRjk0OUY4NTFDQzk4NzE2NjBDRDlDRUI2REI5MjNGMDk0
|
||||
QkVGJTJDTz1Td2lzc1NpZ24lMkNDPUNIP2NlcnRpZmljYXRlUmV2b2NhdGlvbkxp
|
||||
c3Q/YmFzZT9vYmplY3RDbGFzcz1jUkxEaXN0cmlidXRpb25Qb2ludDBfBgNVHSAE
|
||||
WDBWMFQGCWCFdAFZAQIBBjBHMEUGCCsGAQUFBwIBFjlodHRwOi8vcmVwb3NpdG9y
|
||||
eS5zd2lzc3NpZ24uY29tL1N3aXNzU2lnbi1Hb2xkLUNQLUNQUy5wZGYwgdcGCCsG
|
||||
AQUFBwEBBIHKMIHHMGQGCCsGAQUFBzAChlhodHRwOi8vc3dpc3NzaWduLm5ldC9j
|
||||
Z2ktYmluL2F1dGhvcml0eS9kb3dubG9hZC9EQTMyRjk0OUY4NTFDQzk4NzE2NjBD
|
||||
RDlDRUI2REI5MjNGMDk0QkVGMF8GCCsGAQUFBzABhlNodHRwOi8vZ29sZC1wZXJz
|
||||
b25hbC1nMi5vY3NwLnN3aXNzc2lnbi5uZXQvREEzMkY5NDlGODUxQ0M5ODcxNjYw
|
||||
Q0Q5Q0VCNkRCOTIzRjA5NEJFRjANBgkqhkiG9w0BAQsFAAOCAQEAQpjmC9W3K5pO
|
||||
EtRakvBA+kexvGesc+jtzzqPJhUSEN1AB8OrcfY+xhiN9TO/hNdRApPTtYuDFIqW
|
||||
Lxhz3i5Gs+k6bpXnioDEs0UfgqhGvTLEq7LYbkMgZQ+0U4DpiANKMKbRo38krK5I
|
||||
1OSY6W7zchC/r4O/0Wj7kQL+Cchv6LEdgu9xqBVkRTe3Z0jxK8AvNGkppFMNACRd
|
||||
Ev2/9N0/klbGY6ZF3keU/u3IaTRNaX5spXIjpwYBwp0DNmIUnHZLPyji474rNzHg
|
||||
z950/a5cIbhukwkUw2lu2f21r3MkpX/TJ5Pjmo5N0qUkj9h7iWWZO1lI1phpIMmd
|
||||
VgNEI1L2lw==
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGuDCCBKCgAwIBAgIPGReV3CJ0GxId21RMXMvcMA0GCSqGSIb3DQEBCwUAMEUx
|
||||
CzAJBgNVBAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3
|
||||
aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcNMTQwOTE5MTQxMDI1WhcNMjkwOTE1MTQx
|
||||
MDI1WjBUMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMS4wLAYD
|
||||
VQQDEyVTd2lzc1NpZ24gUGVyc29uYWwgR29sZCBDQSAyMDE0IC0gRzIyMIIBIjAN
|
||||
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnrf0T2JFsx4NPb+TUBInPgv9nUyF
|
||||
9dMJh7sQL66HybrB2devqNc1+Gq+fFT4tfBa9hbI+xqRRqCO0LoQOJ3v3XMlOzQ3
|
||||
zTL+b3wgDvs/d8tZ7LWGOSYF480/rL1aaBIQFlrE62GDQvcmkH/C8QxsSS+T+ga2
|
||||
FQhC/Br/btveNcP6cz87WyshF8IU/7sOKYqh3o5mbxI641R1u3+zaiGq8A9620pS
|
||||
oW3b9P1Mf5t4z51ifqb+/QsYtDt60dw+mVES6sk8cl9VRLejcuiXFyVJaj7YyITi
|
||||
or33buzheHvzZdxaQSgeq0mIrvmXqtplZoqXQ12irR7xhuf/w9UtFBbqCwIDAQAB
|
||||
o4IClDCCApAwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYD
|
||||
VR0OBBYEFNoy+Un4UcyYcWYM2c6225I/CUvvMB8GA1UdIwQYMBaAFFsle5akZVF+
|
||||
uDnzwHhmXug65/DuMIH/BgNVHR8EgfcwgfQwR6BFoEOGQWh0dHA6Ly9jcmwuc3dp
|
||||
c3NzaWduLm5ldC81QjI1N0I5NkE0NjU1MTdFQjgzOUYzQzA3ODY2NUVFODNBRTdG
|
||||
MEVFMIGooIGloIGihoGfbGRhcDovL2RpcmVjdG9yeS5zd2lzc3NpZ24ubmV0L0NO
|
||||
PTVCMjU3Qjk2QTQ2NTUxN0VCODM5RjNDMDc4NjY1RUU4M0FFN0YwRUUlMkNPPVN3
|
||||
aXNzU2lnbiUyQ0M9Q0g/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdD9iYXNlP29i
|
||||
amVjdENsYXNzPWNSTERpc3RyaWJ1dGlvblBvaW50MF8GA1UdIARYMFYwVAYJYIV0
|
||||
AVkBAgEGMEcwRQYIKwYBBQUHAgEWOWh0dHA6Ly9yZXBvc2l0b3J5LnN3aXNzc2ln
|
||||
bi5jb20vU3dpc3NTaWduLUdvbGQtQ1AtQ1BTLnBkZjCBxgYIKwYBBQUHAQEEgbkw
|
||||
gbYwZAYIKwYBBQUHMAKGWGh0dHA6Ly9zd2lzc3NpZ24ubmV0L2NnaS1iaW4vYXV0
|
||||
aG9yaXR5L2Rvd25sb2FkLzVCMjU3Qjk2QTQ2NTUxN0VCODM5RjNDMDc4NjY1RUU4
|
||||
M0FFN0YwRUUwTgYIKwYBBQUHMAGGQmh0dHA6Ly9vY3NwLnN3aXNzc2lnbi5uZXQv
|
||||
NUIyNTdCOTZBNDY1NTE3RUI4MzlGM0MwNzg2NjVFRTgzQUU3RjBFRTANBgkqhkiG
|
||||
9w0BAQsFAAOCAgEArevbqCOPH6va0x4oEb4UviyXJzIokl5MjRADlGMDFXaKm52m
|
||||
U+IZlJ9PjcqBiEXhjjD1oR8uV5aVRWXH+auI6JgQZz5L+u2a309bDu3bcineP45v
|
||||
Z+nAuoDvulmx2nqjloCOturaks727w/nHCoz723eYH46fg//q/a5QnOoBe+WIiZW
|
||||
T71TcycX4hiVcPwVqB53tL9IM2qe2balnCpZKorZWVHQXYWSO5MIBaw/iMOwCCpf
|
||||
lDRU75TruHPjfE4Bu4U9Nm3NBt3zcc5ykcQ8ZbJzkWLnSi2LY8r71Ulc3jxqyWOZ
|
||||
QbgS14x/BzVQj4Rk9+X8KovGpooAFVIBR/bdU/z2IdZlENgoPNpJokuEH5OS6UZS
|
||||
yNmhhXjI2QGXn91G+QV4++kreVz6heVOhDPgOoOfRXLYG9O/9wqPMthmUQgcTrym
|
||||
p57bPpM0zIYpHxcKfxhoYprQdO3LuU1F2xkZE2vFLWVB9ugHzXd1ADIKrrGgJXPf
|
||||
MluXT9wK8BzTcI5cOqhESt4Awq5q9fmiW3OUAROL0Ca0Z/sRQcvvJ/ewlZvLdsym
|
||||
cfjV6JtN7/IBgIJ4D/Js4DRWCwAv1jhBiEGsRAlhiJmep//U1HEaT9oredt9PYS1
|
||||
iKbkcMuDEtPuYXrQ+8OQmMEwMbOFboZMMTOVNOenLH+EiG6BUnowTwqqjtA=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
|
||||
BAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2ln
|
||||
biBHb2xkIENBIC0gRzIwHhcNMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBF
|
||||
MQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMR8wHQYDVQQDExZT
|
||||
d2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
|
||||
CgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUqt2/8
|
||||
76LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+
|
||||
bbqBHH5CjCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c
|
||||
6bM8K8vzARO/Ws/BtQpgvd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqE
|
||||
emA8atufK+ze3gE/bk3lUIbLtK/tREDFylqM2tIrfKjuvqblCqoOpd8FUrdVxyJd
|
||||
MmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvRAiTysybUa9oEVeXBCsdt
|
||||
MDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuendjIj3o02y
|
||||
MszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69y
|
||||
FGkOpeUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPi
|
||||
aG59je883WX0XaxR7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxM
|
||||
gI93e2CaHt+28kgeDrpOVG2Y4OGiGqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCB
|
||||
qTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWyV7
|
||||
lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64OfPAeGZe6Drn
|
||||
8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
|
||||
L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe6
|
||||
45R88a7A3hfm5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczO
|
||||
UYrHUDFu4Up+GC9pWbY9ZIEr44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5
|
||||
O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOfMke6UiI0HTJ6CVanfCU2qT1L2sCC
|
||||
bwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6mGu6uLftIdxf+u+yv
|
||||
GPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxpmo/a
|
||||
77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCC
|
||||
hdiDyyJkvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid3
|
||||
92qgQmwLOM7XdVAyksLfKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEpp
|
||||
Ld6leNcG2mqeSz53OiATIgHQv2ieY2BrNU0LbbqhPcCT4H8js1WtciVORvnSFu+w
|
||||
ZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6LqjviOvrv1vA+ACOzB2+htt
|
||||
Qc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
|
||||
-----END CERTIFICATE-----
|
120
ebill_paynet/components/wsdl/DWSPayNet.wsdl
Normal file
120
ebill_paynet/components/wsdl/DWSPayNet.wsdl
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Mit XMLSpy v2009 sp1 (http://www.altova.com) von M. Kaiser (SAP (Schweiz) AG) bearbeitet -->
|
||||
<wsd:definitions xmlns:wsd="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:dsx="http://www.sap.com/DXPPShipmentExchange" xmlns:dws="http://www.sap.com/DWS" xmlns:dxpp="http://www.sap.com/DXPPTypes" xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" name="DWS" targetNamespace="http://www.sap.com/DWS">
|
||||
<wsd:types>
|
||||
<xs:schema targetNamespace="http://www.sap.com/DWS" xmlns:dsx="http://www.sap.com/DXPPShipmentExchange" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:import namespace="http://www.sap.com/DXPPShipmentExchange" schemaLocation="DXPPShipmentExchangePayNet.xsd"/>
|
||||
</xs:schema>
|
||||
</wsd:types>
|
||||
<wsd:message name="ShipmentDeliveryMsg">
|
||||
<wsd:part name="shipmentDelivery" element="dsx:ShipmentDeliveryMsg"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="ShipmentDeliveryMsgReply">
|
||||
<wsd:part name="shipmentDeliveryReply" element="dsx:ShipmentDeliveryMsgReply"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="ShipmentListMsg">
|
||||
<wsd:part name="shipmentList" element="dsx:ShipmentListMsg"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="ShipmentListMsgReply">
|
||||
<wsd:part name="shipmentListReply" element="dsx:ShipmentListMsgReply"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="ShipmentContentMsg">
|
||||
<wsd:part name="shipmentContent" element="dsx:ShipmentContentMsg"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="ShipmentContentMsgReply">
|
||||
<wsd:part name="shipmentContentReply" element="dsx:ShipmentContentMsgReply"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="ShipmentConfirmationMsg">
|
||||
<wsd:part name="shipmentConfirmation" element="dsx:ShipmentConfirmationMsg"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="SetShipmentStateMsg">
|
||||
<wsd:part name="shipmentStateMsg" element="dsx:SetShipmentStateMsg"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="SetShipmentStateMsgReply">
|
||||
<wsd:part name="shipmentStateMsgReply" element="dsx:SetShipmentStateMsgReply"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="faultMsg">
|
||||
<wsd:part name="FaultMsg" element="dxpp:FaultMsg"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="PingMsg">
|
||||
<wsd:part name="pingMsg" element="dxpp:PingMsg"/>
|
||||
</wsd:message>
|
||||
<wsd:message name="PingMsgReply">
|
||||
<wsd:part name="pingMsgReply" element="dxpp:PingMsgReply"/>
|
||||
</wsd:message>
|
||||
<wsd:portType name="DWSPort">
|
||||
<wsd:operation name="getShipmentList">
|
||||
<wsd:input message="dws:ShipmentListMsg"/>
|
||||
<wsd:output message="dws:ShipmentListMsgReply"/>
|
||||
</wsd:operation>
|
||||
<wsd:operation name="confirmShipmentReceipt">
|
||||
<wsd:input message="dws:ShipmentConfirmationMsg"/>
|
||||
</wsd:operation>
|
||||
<wsd:operation name="getShipmentContent">
|
||||
<wsd:input message="dws:ShipmentContentMsg"/>
|
||||
<wsd:output message="dws:ShipmentContentMsgReply"/>
|
||||
</wsd:operation>
|
||||
<wsd:operation name="takeShipment">
|
||||
<wsd:input message="dws:ShipmentDeliveryMsg"/>
|
||||
<wsd:output message="dws:ShipmentDeliveryMsgReply"/>
|
||||
</wsd:operation>
|
||||
<wsd:operation name="ping">
|
||||
<wsd:input message="dws:PingMsg"/>
|
||||
<wsd:output message="dws:PingMsgReply"/>
|
||||
<wsd:fault name="FaultName" message="dws:faultMsg"/>
|
||||
</wsd:operation>
|
||||
</wsd:portType>
|
||||
<wsd:binding name="DWSBinding" type="dws:DWSPort">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsd:operation name="getShipmentList">
|
||||
<soap:operation soapAction="urn:#getShipmentList" style="document"/>
|
||||
<wsd:input>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:input>
|
||||
<wsd:output>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:output>
|
||||
</wsd:operation>
|
||||
<wsd:operation name="confirmShipmentReceipt">
|
||||
<soap:operation soapAction="urn:#confirmShipmentReceipt" style="document"/>
|
||||
<wsd:input>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:input>
|
||||
</wsd:operation>
|
||||
<wsd:operation name="getShipmentContent">
|
||||
<soap:operation soapAction="urn:#getShipmentContent" style="document"/>
|
||||
<wsd:input>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:input>
|
||||
<wsd:output>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:output>
|
||||
</wsd:operation>
|
||||
<wsd:operation name="takeShipment">
|
||||
<soap:operation soapAction="urn:#takeShipment" style="document"/>
|
||||
<wsd:input>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:input>
|
||||
<wsd:output>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:output>
|
||||
</wsd:operation>
|
||||
<wsd:operation name="ping">
|
||||
<soap:operation soapAction="urn:#ping" style="document"/>
|
||||
<wsd:input>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:input>
|
||||
<wsd:output>
|
||||
<soap:body use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:output>
|
||||
<wsd:fault name="FaultName">
|
||||
<soap:fault name="faultMsg" use="literal" namespace="http://www.sap.com/DWS"/>
|
||||
</wsd:fault>
|
||||
</wsd:operation>
|
||||
</wsd:binding>
|
||||
<wsd:service name="DWS">
|
||||
<wsd:port name="DWSPort" binding="dws:DWSBinding">
|
||||
<soap:address location="https://dws-test.paynet.ch/DWS/DWS"/>
|
||||
</wsd:port>
|
||||
</wsd:service>
|
||||
</wsd:definitions>
|
269
ebill_paynet/components/wsdl/DXPPShipmentExchangePayNet.xsd
Normal file
269
ebill_paynet/components/wsdl/DXPPShipmentExchangePayNet.xsd
Normal file
@ -0,0 +1,269 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:dxpp="http://www.sap.com/DXPPTypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dsx="http://www.sap.com/DXPPShipmentExchange" targetNamespace="http://www.sap.com/DXPPShipmentExchange" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:import namespace="http://www.sap.com/DXPPTypes" schemaLocation="DXPPTypesPayNet.xsd"/>
|
||||
<xs:element name="ShipmentDeliveryMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:Authorization" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:Mandant" minOccurs="0"/>
|
||||
<xs:element name="ProcessingDate" type="xs:dateTime" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:ShipmentPriority" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:Content"/>
|
||||
<xs:element name="Monitoring" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dsx:MessageID"/>
|
||||
<xs:element ref="dsx:MonitorCaseReference"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ShipmentDeliveryMsgReply">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:ShipmentID"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ShipmentListMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:Authorization" minOccurs="0"/>
|
||||
<xs:element name="FromDate" type="xs:dateTime" minOccurs="0"/>
|
||||
<xs:element name="ToDate" type="xs:dateTime" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:DocumentIdentifier" minOccurs="0"/>
|
||||
<xs:element name="ShipmentStates" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:ShipmentState" maxOccurs="3"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="FromShipmentPriority" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:int">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="ToShipmentPriority" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:int">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="fromEntry" type="xs:unsignedInt" use="optional" default="1"/>
|
||||
<xs:attribute name="maxEntries" type="xs:unsignedInt" use="optional" default="100"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ShipmentListMsgReply">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Shipment" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:ShipmentID"/>
|
||||
<xs:element ref="dxpp:DocumentIdentifier"/>
|
||||
<xs:element ref="dxpp:SignatureIdentifier" minOccurs="0"/>
|
||||
<xs:element name="CreationDate" type="xs:dateTime"/>
|
||||
<xs:element ref="dxpp:ShipmentState"/>
|
||||
<xs:element name="SenderID" type="xs:string"/>
|
||||
<xs:element name="ReceiverID" type="xs:string"/>
|
||||
<xs:element name="ContentSize" type="xs:int"/>
|
||||
<xs:element ref="dxpp:ShipmentPriority"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="entriesFound" type="xs:unsignedInt" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ShipmentContentMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:Authorization" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:ShipmentID"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="getAdditionalInfo" type="xs:boolean" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ShipmentContentMsgReply">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:Content"/>
|
||||
<xs:element ref="dxpp:ShipmentPriority"/>
|
||||
<xs:element ref="dsx:AdditionalInfo" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ShipmentConfirmationMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:Authorization" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:ShipmentID"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="MessageID" type="xs:string"/>
|
||||
<xs:element name="MonitorCaseReference" type="xs:string"/>
|
||||
<xs:element name="GetDocumentStateListMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:Authorization" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:Mandant" minOccurs="0"/>
|
||||
<xs:element name="FromDate" type="xs:dateTime" minOccurs="0"/>
|
||||
<xs:element name="ToDate" type="xs:dateTime" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:ShipmentID" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:DocumentIdentifier" minOccurs="0"/>
|
||||
<xs:element name="ShipmentStates" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:ShipmentProcessingState" maxOccurs="7"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="maxShipments" type="xs:unsignedInt" use="optional"/>
|
||||
<xs:attribute name="fromShipment" type="xs:unsignedInt" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetDocumentStateListMsgReply">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Shipment" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="IncomingDocument" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="OutgoingDocument" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="DocumentReference" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ID" type="xs:string" use="required"/>
|
||||
<xs:attribute name="state" type="xs:string" use="required"/>
|
||||
<xs:attribute name="creationDate" type="xs:dateTime" use="required"/>
|
||||
<xs:attribute name="isOK" type="xs:boolean" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ID" type="xs:string" use="required"/>
|
||||
<xs:attribute name="state" type="xs:string" use="required"/>
|
||||
<xs:attribute name="creationDate" type="xs:dateTime" use="required"/>
|
||||
<xs:attribute name="isOK" type="xs:boolean" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ID" type="xs:string" use="required"/>
|
||||
<xs:attribute name="state" type="xs:string" use="required"/>
|
||||
<xs:attribute name="creationDate" type="xs:dateTime" use="required"/>
|
||||
<xs:attribute name="isOK" type="xs:boolean" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="shipmentsFound" type="xs:integer"/>
|
||||
<xs:attribute name="fromShipment" type="xs:integer"/>
|
||||
<xs:attribute name="toShipment" type="xs:integer"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="SetShipmentStateMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:Authorization" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:ShipmentID"/>
|
||||
<xs:element name="NewState">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="ReadyForSending"/>
|
||||
<xs:enumeration value="ArrivedAtDestination"/>
|
||||
<xs:enumeration value="NotProcessable"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="SetShipmentStateMsgReply">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:ShipmentID"/>
|
||||
<xs:element name="NewState">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="ReadyForSending"/>
|
||||
<xs:enumeration value="ArrivedAtDestination"/>
|
||||
<xs:enumeration value="NotProcessable"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetDocumentSetDescriptionMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:Authorization" minOccurs="0"/>
|
||||
<xs:element ref="dxpp:ShipmentID"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetDocumentSetDescriptionMsgReply">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dsx:eDocument" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="eDocument">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="type" type="xs:string" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element ref="dxpp:Content"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="type" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string"/>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="format" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="version" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="filename" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="state" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="NotVerified"/>
|
||||
<xs:enumeration value="Verified"/>
|
||||
<xs:enumeration value="VerifiedWithError"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="signatureFormat" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="NONE"/>
|
||||
<xs:enumeration value="PKCS7"/>
|
||||
<xs:enumeration value="PDFINTERN"/>
|
||||
<xs:enumeration value="HEADTRAILSIG"/>
|
||||
<xs:enumeration value="XMLDSIG"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="AdditionalInfo" type="dxpp:AdditionalInfoType"/>
|
||||
</xs:schema>
|
198
ebill_paynet/components/wsdl/DXPPTypesPayNet.xsd
Normal file
198
ebill_paynet/components/wsdl/DXPPTypesPayNet.xsd
Normal file
@ -0,0 +1,198 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dxpp="http://www.sap.com/DXPPTypes" targetNamespace="http://www.sap.com/DXPPTypes" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:element name="ShipmentProcessingState">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="ReadyForProcessing"/>
|
||||
<xs:enumeration value="BeingProcessed"/>
|
||||
<xs:enumeration value="Processed"/>
|
||||
<xs:enumeration value="TerminatedByUser"/>
|
||||
<xs:enumeration value="NotProcessable"/>
|
||||
<xs:enumeration value="NotRecognizable"/>
|
||||
<xs:enumeration value="PartiallyProcessed"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Authorization">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="UserName" type="xs:string"/>
|
||||
<xs:element name="Password" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Content">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:base64Binary">
|
||||
<xs:attribute name="encoding" type="xs:string" use="optional"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ShipmentPriority">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:int">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="ShipmentID" type="xs:string"/>
|
||||
<xs:element name="ShipmentState">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="ReadyForSending"/>
|
||||
<xs:enumeration value="Submitted"/>
|
||||
<xs:enumeration value="ArrivedAtDestination"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Mandant">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ExternalID" type="xs:string"/>
|
||||
<xs:element name="ExternalIDType">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="APPSYSNAME"/>
|
||||
<xs:enumeration value="BC"/>
|
||||
<xs:enumeration value="BCN"/>
|
||||
<xs:enumeration value="BIC"/>
|
||||
<xs:enumeration value="BLZ"/>
|
||||
<xs:enumeration value="BPID"/>
|
||||
<xs:enumeration value="DN"/>
|
||||
<xs:enumeration value="EAN"/>
|
||||
<xs:enumeration value="FTPLUSID"/>
|
||||
<xs:enumeration value="IBAN"/>
|
||||
<xs:enumeration value="MACID"/>
|
||||
<xs:enumeration value="MIME"/>
|
||||
<xs:enumeration value="PATHNAME"/>
|
||||
<xs:enumeration value="PID"/>
|
||||
<xs:enumeration value="SMSNUMBER"/>
|
||||
<xs:enumeration value="STATIONID"/>
|
||||
<xs:enumeration value="UNKNOWN"/>
|
||||
<xs:enumeration value="USERNAME"/>
|
||||
<xs:enumeration value="X400ADDRESS"/>
|
||||
<xs:enumeration value="XISENDERID"/>
|
||||
<xs:enumeration value="XIRECEIVERID"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="PingMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="dxpp:ClientData" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="PingMsgReply">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="State" type="xs:string"/>
|
||||
<xs:element name="Timestamp" type="xs:dateTime"/>
|
||||
<xs:element name="Version" type="xs:string"/>
|
||||
<xs:element ref="dxpp:ClientData" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ClientData" type="xs:string"/>
|
||||
<xs:element name="FaultMsg">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ErrorCode">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:length value="4"/>
|
||||
<xs:pattern value="[0-9]{4}"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="ErrorMessage" type="xs:string" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="DocumentIdentifier" type="dxpp:DocumentIdentifierType"/>
|
||||
<xs:complexType name="DocumentIdentifierType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Name" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="Type" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="Format" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="Version" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="Extension" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="Category" type="xs:string" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="SignatureIdentifierType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Name" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="Type" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="Extension" type="xs:string" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="AdditionalInfoType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Key" type="xs:string"/>
|
||||
<xs:element name="Value" type="xs:string" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="DateRangeType">
|
||||
<xs:sequence>
|
||||
<xs:element name="FromDate" type="xs:date" minOccurs="0"/>
|
||||
<xs:element name="ToDate" type="xs:date" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:simpleType name="ShipmentPriorityType">
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:element name="SignatureIdentifier" type="dxpp:SignatureIdentifierType"/>
|
||||
<xs:complexType name="DocumentType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Content">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:base64Binary">
|
||||
<xs:attribute name="encoding" type="xs:string" use="optional"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="type" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string"/>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="format" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="version" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="filename" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="state" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="NotVerified"/>
|
||||
<xs:enumeration value="Verified"/>
|
||||
<xs:enumeration value="VerifiedWithError"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="signatureFormat" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="NONE"/>
|
||||
<xs:enumeration value="PKCS7"/>
|
||||
<xs:enumeration value="PDFINTERN"/>
|
||||
<xs:enumeration value="HEADTRAILSIG"/>
|
||||
<xs:enumeration value="XMLDSIG"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="creationTime" type="xs:dateTime" use="required"/>
|
||||
<xs:attribute name="shipmentID" type="xs:string" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
14
ebill_paynet/data/ir_cron.xml
Normal file
14
ebill_paynet/data/ir_cron.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo noupdate="1">
|
||||
<record model="ir.cron" id="cron_paynet_get_shipment">
|
||||
<field name='name'>Paynet - Poll for shipments</field>
|
||||
<field name='interval_number'>1</field>
|
||||
<field name='interval_type'>hours</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="active" eval="True" />
|
||||
<field name="doall" eval="False" />
|
||||
<field name="model_id" ref="model_paynet_service" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">model.cron_poll_shipment()</field>
|
||||
</record>
|
||||
</odoo>
|
12
ebill_paynet/data/mail_activity_type.xml
Normal file
12
ebill_paynet/data/mail_activity_type.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="mail_activity_dws_error" model="mail.activity.type">
|
||||
<field name="name">Paynet System Error</field>
|
||||
<field name="icon">fa-warning</field>
|
||||
<field name="delay_count">0</field>
|
||||
<field name="sequence">99</field>
|
||||
<field name="decoration_type">warning</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
11
ebill_paynet/data/transmit.method.xml
Normal file
11
ebill_paynet/data/transmit.method.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="paynet_transmit_method" model="transmit.method">
|
||||
<field name="name">Paynet</field>
|
||||
<field name="code">paynet</field>
|
||||
<field name="customer_ok" eval="True" />
|
||||
<!-- There is a bug on transmit_method module, needs to be set -->
|
||||
<!-- to True so it is available for customer -->
|
||||
<field name="supplier_ok" eval="True" />
|
||||
</record>
|
||||
</odoo>
|
225
ebill_paynet/messages/invoice-2003A.xml
Normal file
225
ebill_paynet/messages/invoice-2003A.xml
Normal file
@ -0,0 +1,225 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE XML-FSCM-INVOICE-2003A SYSTEM "XML-FSCM-INVOICE-2003A.DTD">
|
||||
<XML-FSCM-INVOICE-2003A>
|
||||
<INTERCHANGE>
|
||||
<IC-SENDER>
|
||||
<Pid>{{ client_pid }}</Pid>
|
||||
</IC-SENDER>
|
||||
<IC-RECEIVER>
|
||||
<Pid>41010106799303734</Pid>
|
||||
</IC-RECEIVER>
|
||||
<IC-Ref>{{ ic_ref }}</IC-Ref>
|
||||
</INTERCHANGE>
|
||||
<INVOICE Type="{{ document_type }}">
|
||||
<HEADER>
|
||||
<FUNCTION-FLAGS>
|
||||
<Confirmation-Flag/>
|
||||
</FUNCTION-FLAGS>
|
||||
<MESSAGE-REFERENCE>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>{{ invoice.name }}</Reference-No>
|
||||
<Date Format="CCYYMMDD">{{ format_date() }}</Date>
|
||||
</REFERENCE-DATE>
|
||||
</MESSAGE-REFERENCE>
|
||||
<PRINT-DATE>
|
||||
<Date Format="CCYYMMDD">{{ format_date(invoice.date_invoice) }}</Date>
|
||||
</PRINT-DATE>
|
||||
<DELIVERY-DATE>
|
||||
<Date Format="CCYYMMDD">{{ format_date(invoice.date_invoice) }}</Date>
|
||||
</DELIVERY-DATE>
|
||||
<REFERENCE>
|
||||
<INVOICE-REFERENCE>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>{{ invoice.name }}</Reference-No>
|
||||
<Date Format="CCYYMMDD">{{ format_date(invoice.date_invoice) }}</Date>
|
||||
</REFERENCE-DATE>
|
||||
</INVOICE-REFERENCE>
|
||||
{% for order in invoice_lines.sale_line_ids.mapped('order_id') %}
|
||||
{%- if order.paynet_client_order_ref %}
|
||||
<ORDER>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>{{ order.paynet_client_order_ref }}</Reference-No>
|
||||
<Date Format="CCYYMMDD">{{ format_date(order.date_order) }}</Date>
|
||||
</REFERENCE-DATE>
|
||||
</ORDER>
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for ref in invoice.get_paynet_other_reference() %}
|
||||
<OTHER-REFERENCE Type="{{ ref.type }}">
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>{{ ref.no|truncate(35, True, "") }}</Reference-No>
|
||||
</REFERENCE-DATE>
|
||||
</OTHER-REFERENCE>
|
||||
{% endfor %}
|
||||
|
||||
</REFERENCE>
|
||||
<BILLER>
|
||||
{#- Doc says vat number or business identitfiaction number #}
|
||||
{%- if invoice.company_id.vat %}
|
||||
<Tax-No>{{ invoice.company_id.vat }}</Tax-No>
|
||||
{%- endif %}
|
||||
{%- if invoice.payment_reference %}
|
||||
<Doc-Reference Type="{{ 'QRR' if payment_type == 'qr' else 'ESR-NEU' }}">{{ invoice.payment_reference }}</Doc-Reference>
|
||||
{%- endif %}
|
||||
<PARTY-ID>
|
||||
<Pid>{{ client_pid }}</Pid>
|
||||
</PARTY-ID>
|
||||
<NAME-ADDRESS Format="COM">
|
||||
<NAME>
|
||||
<Line-35>{{ biller.name }}</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>{{ (biller.street or '')|truncate(35, True, "") }}</Line-35>
|
||||
{%- if biller.street2 %}
|
||||
<Line-35>{{ biller.street2|truncate(5, True, "") }}</Line-35>
|
||||
{% endif %}
|
||||
</STREET>
|
||||
<City>{{ biller.city or ''}}</City>
|
||||
<Zip>{{ biller.zip or '' }}</Zip>
|
||||
<Country>{{ biller.country_id.code or 'CH' }}</Country>
|
||||
</NAME-ADDRESS>
|
||||
<BANK-INFO>
|
||||
{%- if payment_type in ['esr', 'esp'] %}
|
||||
<Acct-No>{{ bank_account }}</Acct-No>
|
||||
<BankId Type="BCNr-int" Country="CH">{{ bank.bank_id.clearing }}</BankId>
|
||||
{%- elif payment_type == 'qr' %}
|
||||
<Acct-No>{{ bank_account }}</Acct-No>
|
||||
<BankId Type="IID" Country="CH">{{ bank_account[4:9] if bank_account else ''}}</BankId>
|
||||
{%- endif %}
|
||||
</BANK-INFO>
|
||||
</BILLER>
|
||||
<PAYER>
|
||||
<PARTY-ID>
|
||||
<Pid>{{ ebill_account_number }}</Pid>
|
||||
</PARTY-ID>
|
||||
<NAME-ADDRESS Format="COM">
|
||||
<NAME>
|
||||
{%- if customer.name != customer.commercial_company_name and customer.commercial_company_name %}
|
||||
<Line-35>{{ customer.commercial_company_name|truncate(35, True, '') }}</Line-35>
|
||||
{%- endif %}
|
||||
<Line-35>{{ (customer.name or "")|truncate(35, True, "") }}</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>{{ (customer.street or "")|truncate(35, True, "") }}</Line-35>
|
||||
{%- if customer.street2 %}
|
||||
<Line-35>{{ customer.street2|truncate(35, True, "") }}</Line-35>
|
||||
{%- endif %}
|
||||
</STREET>
|
||||
<City>{{ customer.city or ""}}</City>
|
||||
<Zip>{{ customer.zip or ""}}</Zip>
|
||||
<Country>{{ customer.country_id.code or 'CH' }}</Country>
|
||||
</NAME-ADDRESS>
|
||||
</PAYER>
|
||||
{%- if delivery %}
|
||||
<DELIVERY-PARTY>
|
||||
<NAME-ADDRESS Format="COM">
|
||||
<NAME>
|
||||
{%- if delivery.name != delivery.commercial_company_name and delivery.commercial_company_name %}
|
||||
<Line-35>{{ delivery.commercial_company_name|truncate(35, True, '') }}</Line-35>
|
||||
{%- endif %}
|
||||
<Line-35>{{ (delivery.name or "")|truncate(35, True, "") }}</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>{{ (delivery.street or "")|truncate(35, True, "") }}</Line-35>
|
||||
{%- if delivery.street2 %}
|
||||
<Line-35>{{ delivery.street2|truncate(35, True, "") }}</Line-35>
|
||||
{%- endif %}
|
||||
</STREET>
|
||||
<City>{{ delivery.city or '' }}</City>
|
||||
<Zip>{{ delivery.zip or '' }}</Zip>
|
||||
<Country>{{ delivery.country_id.code or 'CH' }}</Country>
|
||||
</NAME-ADDRESS>
|
||||
</DELIVERY-PARTY>
|
||||
{%- endif %}
|
||||
</HEADER>
|
||||
{% for line in invoice_lines %}
|
||||
<LINE-ITEM Line-Number="{{ loop.index }}">
|
||||
{%- if line.product_id %}
|
||||
<ITEM-ID>
|
||||
<Item-Id Type="VN">{{ line.product_id.default_code or ''}}</Item-Id>
|
||||
<Item-Id Type="SA">{{ line.product_id.default_code or ''}}</Item-Id>
|
||||
</ITEM-ID>
|
||||
{%- endif %}
|
||||
<ITEM-DESCRIPTION>
|
||||
<Item-Type-Code>1011</Item-Type-Code>
|
||||
<Line-35>{{ (line.product_id.name or line.name or "")[:35] }}</Line-35>
|
||||
{%- if (line.product_id.name or line.name or "")|length > 35 %}
|
||||
<Line-35>{{ (line.product_id.name or line.name)[35:]|truncate(34, True) }}</Line-35>
|
||||
{%- endif %}
|
||||
</ITEM-DESCRIPTION>
|
||||
{% for order in invoice_lines.sale_line_ids.mapped('order_id') %}
|
||||
{%- if order.paynet_client_order_ref %}
|
||||
<ITEM-REFERENCE Type="ON">
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>{{ order.paynet_client_order_ref }}</Reference-No>
|
||||
<Date Format="CCYYMMDD">{{ format_date(order.date_order) }}</Date>
|
||||
</REFERENCE-DATE>
|
||||
</ITEM-REFERENCE>
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
<Quantity Type="47" Units="PCE">{{ line.quantity }}</Quantity>
|
||||
<Price Type="YYY">{{ line.price_subtotal|round(2) }}</Price>
|
||||
<Price Type="AAA">{{ line.price_subtotal|round(2) }}</Price>
|
||||
<Price Type="XXX">{{ line.price_total|round(2) }}</Price>
|
||||
<ITEM-AMOUNT Type="66">
|
||||
<Amount Currency="{{ invoice.currency_id.name }}">{{ line.price_total|round(2) }}</Amount>
|
||||
</ITEM-AMOUNT>
|
||||
{% for tax in line.tax_ids %}
|
||||
{%- if loop.index == 1 %}
|
||||
<TAX>
|
||||
<Rate>{{ tax.amount}}</Rate>
|
||||
<Amount Currency="{{ invoice.currency_id.name }}">{{ tax._compute_amount(line.price_subtotal, line.price_unit)|round(2) }}</Amount>
|
||||
</TAX>
|
||||
{%- endif %}
|
||||
{% else %}
|
||||
<TAX>
|
||||
<Rate>0</Rate>
|
||||
</TAX>
|
||||
{% endfor %}
|
||||
</LINE-ITEM>
|
||||
{% endfor %}
|
||||
<SUMMARY>
|
||||
<INVOICE-AMOUNT Print-Status="25">
|
||||
<Amount Currency="{{ invoice.currency_id.name }}">{{ invoice.amount_total|round(2) }}</Amount>
|
||||
</INVOICE-AMOUNT>
|
||||
<VAT-AMOUNT Print-Status="25">
|
||||
<Amount Currency="{{ invoice.currency_id.name }}">{{ invoice.amount_tax|round(2) }}</Amount>
|
||||
</VAT-AMOUNT>
|
||||
{% if amount_by_group %}
|
||||
{% for taxgroup in amount_by_group %}
|
||||
<TAX>
|
||||
<TAX-BASIS>
|
||||
<Amount Currency="{{ invoice.currency_id.name }}">{{ taxgroup[2] }}</Amount>
|
||||
</TAX-BASIS>
|
||||
{%- if taxgroup[0] %}
|
||||
<Rate Category="S">{{ taxgroup[0] }}</Rate>
|
||||
{%- else %}
|
||||
<Rate Category="E">0</Rate>
|
||||
{%- endif %}
|
||||
<Amount Currency="{{ invoice.currency_id.name }}">{{ taxgroup[1] }}</Amount>
|
||||
</TAX>
|
||||
{% endfor %}
|
||||
{%- else %}
|
||||
<TAX>
|
||||
<TAX-BASIS>
|
||||
<Amount Currency="{{ invoice.currency_id.name }}">{{ invoice.amount_untaxed|round(2) }}</Amount>
|
||||
</TAX-BASIS>
|
||||
<Rate Category="E">0</Rate>
|
||||
<Amount Currency="{{ invoice.currency_id.name }}">0</Amount>
|
||||
</TAX>
|
||||
{% endif -%}
|
||||
<PAYMENT-TERMS>
|
||||
<BASIC Payment-Type="{{ payment_type|upper }}" Terms-Type="5">
|
||||
<TERMS>
|
||||
<Date>{{ date_due }}</Date>
|
||||
</TERMS>
|
||||
</BASIC>
|
||||
{% include discount_template ignore missing %}
|
||||
</PAYMENT-TERMS>
|
||||
<Back-Pack-Container Encode="Base64">
|
||||
{{- pdf_data | safe -}}
|
||||
</Back-Pack-Container>
|
||||
</SUMMARY>
|
||||
</INVOICE>
|
||||
</XML-FSCM-INVOICE-2003A>
|
133
ebill_paynet/messages/invoice-2013A.xml
Normal file
133
ebill_paynet/messages/invoice-2013A.xml
Normal file
@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XML-FSCM-INVOICE-2013A>
|
||||
<INTERCHANGE>
|
||||
<IC-SENDER>
|
||||
<Pid>{{ client_pid }}</Pid>
|
||||
</IC-SENDER>
|
||||
<IC-RECEIVER>
|
||||
<Pid>41010106799303734</Pid>
|
||||
</IC-RECEIVER>
|
||||
<IC-Ref>{{ ic_ref }}</IC-Ref>
|
||||
</INTERCHANGE>
|
||||
<INVOICE Type="{{ document_type }}">
|
||||
<HEADER>
|
||||
<FUNCTION-FLAGS>
|
||||
<Confirmation-Flag />
|
||||
</FUNCTION-FLAGS>
|
||||
<MESSAGE-REFERENCE>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>{{ invoice.name }}</Reference-No>
|
||||
<Date>{{ format_date() }}</Date>
|
||||
</REFERENCE-DATE>
|
||||
</MESSAGE-REFERENCE>
|
||||
<PRINT-DATE>
|
||||
<Date>{{ format_date(invoice.date_invoice) }}</Date>
|
||||
</PRINT-DATE>
|
||||
<REFERENCE>
|
||||
<INVOICE-REFERENCE>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>{{ invoice.name }}</Reference-No>
|
||||
<Date>{{ format_date(invoice.date_invoice) }}</Date>
|
||||
</REFERENCE-DATE>
|
||||
</INVOICE-REFERENCE>
|
||||
</REFERENCE>
|
||||
<BILLER>
|
||||
{#- Doc says vat number or business identitfiaction number #}
|
||||
{%- if invoice.company_id.vat %}
|
||||
<Tax-No>{{ invoice.company_id.vat }}</Tax-No>
|
||||
{%- endif %}
|
||||
{%- if invoice_esr %}
|
||||
<Doc-Reference Type="ESR-NEU">{{ invoice_esr }}</Doc-Reference>
|
||||
{%- endif %}
|
||||
<PARTY-ID>
|
||||
<Pid>{{ client_pid }}</Pid>
|
||||
</PARTY-ID>
|
||||
<NAME-ADDRESS Format="COM">
|
||||
<NAME>
|
||||
<Line-35>{{ biller.name }}</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>{{ biller.street or ''}}</Line-35>
|
||||
{%- if biller.street2 %}
|
||||
<Line-35>{{ biller.street2 }}</Line-35>
|
||||
{% endif %}
|
||||
</STREET>
|
||||
<City>{{ biller.city or ''}}</City>
|
||||
<Zip>{{ biller.zip or '' }}</Zip>
|
||||
<Country>{{ biller.country_id.code or 'CH' }}</Country>
|
||||
</NAME-ADDRESS>
|
||||
<BANK-INFO>
|
||||
<Acct-No>{{ bank.sanitized_acc_number }}</Acct-No>
|
||||
<Acct-Name>{{ bank.acc_holder_name }}</Acct-Name>
|
||||
{# Is this the default for e-banking customers ? -#}
|
||||
<BankId Type="BCNr-int" Country="CH">001996</BankId>
|
||||
</BANK-INFO>
|
||||
</BILLER>
|
||||
<PAYER>
|
||||
<PARTY-ID>
|
||||
<Pid>{{ ebill_account_number }}</Pid>
|
||||
</PARTY-ID>
|
||||
<NAME-ADDRESS Format="PRV">
|
||||
<NAME>
|
||||
<Line-35>{{ customer.name }}</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>{{ customer.street }}</Line-35>
|
||||
{%- if customer.street2 %}
|
||||
<Line-35>{{ customer.street2 or '' }}</Line-35>
|
||||
{%- endif %}
|
||||
</STREET>
|
||||
<City>{{ customer.city }}</City>
|
||||
<State>{{ customer.state_id.code }}</State>
|
||||
<Zip>{{ customer.zip }}</Zip>
|
||||
<Country>{{ customer.country_id.code or 'CH' }}</Country>
|
||||
</NAME-ADDRESS>
|
||||
</PAYER>
|
||||
</HEADER>
|
||||
<LINE-ITEM />
|
||||
<SUMMARY>
|
||||
<INVOICE-AMOUNT>
|
||||
<Amount Currency="CHF">{{ invoice.amount_total }}</Amount>
|
||||
</INVOICE-AMOUNT>
|
||||
<VAT-AMOUNT>
|
||||
<Amount Currency="CHF">{{ invoice.amount_tax }}</Amount>
|
||||
</VAT-AMOUNT>
|
||||
<EXTENDED-AMOUNT Type="79">
|
||||
<Amount Currency="CHF">{{ invoice.amount_untaxed }}</Amount>
|
||||
</EXTENDED-AMOUNT>
|
||||
{% if amount_by_group %}
|
||||
{% for taxgroup in amount_by_group %}
|
||||
<TAX>
|
||||
<TAX-BASIS>
|
||||
<Amount Currency="CHF">{{ taxgroup[2] }}</Amount>
|
||||
</TAX-BASIS>
|
||||
{%- if taxgroup[0] %}
|
||||
<Rate Category="S">{{ taxgroup[0] }}</Rate>
|
||||
{%- else %}
|
||||
<Rate Category="E">0</Rate>
|
||||
{%- endif %}
|
||||
<Amount Currency="CHF">{{ taxgroup[1] }}</Amount>
|
||||
</TAX>
|
||||
{% endfor %}
|
||||
{%- else %}
|
||||
<TAX>
|
||||
<TAX-BASIS>
|
||||
<Amount Currency="CHF">{{ invoice.amount_untaxed }}</Amount>
|
||||
</TAX-BASIS>
|
||||
<Rate Category="E">0</Rate>
|
||||
<Amount Currency="CHF">0</Amount>
|
||||
</TAX>
|
||||
{% endif -%}
|
||||
<PAYMENT-TERMS>
|
||||
<BASIC Payment-Type="{{ payment_type|upper }}" Terms-Type="5">
|
||||
<TERMS>
|
||||
<Date>{{ format_date(invoice.date_due or invoice.date_invoice) }}</Date>
|
||||
</TERMS>
|
||||
</BASIC>
|
||||
</PAYMENT-TERMS>
|
||||
<Back-Pack-Container Encode="Base64">
|
||||
{{ pdf_data }}
|
||||
</Back-Pack-Container>
|
||||
</SUMMARY>
|
||||
</INVOICE>
|
||||
</XML-FSCM-INVOICE-2013A>
|
5
ebill_paynet/models/__init__.py
Normal file
5
ebill_paynet/models/__init__.py
Normal file
@ -0,0 +1,5 @@
|
||||
from . import account_invoice
|
||||
from . import ebill_payment_contract
|
||||
from . import paynet_invoice_message
|
||||
from . import paynet_service
|
||||
from . import sale_order
|
137
ebill_paynet/models/account_invoice.py
Normal file
137
ebill_paynet/models/account_invoice.py
Normal file
@ -0,0 +1,137 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import base64
|
||||
import logging
|
||||
|
||||
import odoo
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tools.pdf import merge_pdf
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AccountInvoice(models.Model):
|
||||
|
||||
_inherit = "account.move"
|
||||
|
||||
@api.onchange("partner_id", "company_id")
|
||||
def _transmit_method_partner_change(self):
|
||||
super()._transmit_method_partner_change()
|
||||
if self.move_type not in ("out_invoice", "out_refund"):
|
||||
return
|
||||
paynet_method = self.env.ref("ebill_paynet.paynet_transmit_method")
|
||||
if self.transmit_method_id == paynet_method:
|
||||
contract = self.partner_id.get_active_contract(self.transmit_method_id)
|
||||
if contract:
|
||||
self.invoice_partner_bank_id = (
|
||||
contract.paynet_service_id.partner_bank_id
|
||||
)
|
||||
|
||||
def _export_invoice(self):
|
||||
"""Export invoice with the help of account_invoice_export module."""
|
||||
paynet_method = self.env.ref("ebill_paynet.paynet_transmit_method")
|
||||
if self.transmit_method_id != paynet_method:
|
||||
return super()._export_invoice()
|
||||
message = self.create_paynet_message()
|
||||
if not message:
|
||||
raise UserError(_("Error generating Paynet message"))
|
||||
message.send_to_paynet()
|
||||
self.invoice_exported = True
|
||||
return "Paynet invoice generated and in state {}".format(message.state)
|
||||
|
||||
def create_paynet_message(self):
|
||||
"""Generate the paynet message for an invoice."""
|
||||
self.ensure_one()
|
||||
contract = self.partner_id.get_active_contract(self.transmit_method_id)
|
||||
if not contract:
|
||||
return
|
||||
# Generate PDf to be send
|
||||
pdf_data = []
|
||||
report_names = ["account.report_invoice"]
|
||||
if contract.payment_type == "qr":
|
||||
report_names.append("l10n_ch.qr_report_main")
|
||||
elif contract.payment_type == "esr":
|
||||
report_names.append("l10n_ch.isr_report_main")
|
||||
for report_name in report_names:
|
||||
r = self.env["ir.actions.report"]._get_report_from_name(report_name)
|
||||
pdf_content, _ = r._render([self.id])
|
||||
pdf_data.append(pdf_content)
|
||||
if not odoo.tools.config["test_enable"]:
|
||||
pdf = merge_pdf(pdf_data)
|
||||
else:
|
||||
# When test are run, pdf are not generated, so use an empty pdf
|
||||
pdf = b""
|
||||
|
||||
message = self.env["paynet.invoice.message"].create(
|
||||
{
|
||||
"service_id": contract.paynet_service_id.id,
|
||||
"invoice_id": self.id,
|
||||
"ebill_account_number": contract.paynet_account_number,
|
||||
"payment_type": contract.payment_type,
|
||||
}
|
||||
)
|
||||
attachment = self.env["ir.attachment"].create(
|
||||
{
|
||||
"name": "paynet ebill",
|
||||
"type": "binary",
|
||||
"datas": base64.b64encode(pdf).decode("ascii"),
|
||||
"res_model": "paynet.invoice.message",
|
||||
"res_id": message.id,
|
||||
"mimetype": "application/x-pdf",
|
||||
}
|
||||
)
|
||||
message.attachment_id = attachment.id
|
||||
return message
|
||||
|
||||
def paynet_invoice_line_ids(self):
|
||||
"""Filter invoice line to be included in XML message.
|
||||
|
||||
Invoicing line that are UX based (notes, sections) are removed.
|
||||
|
||||
"""
|
||||
self.ensure_one()
|
||||
return self.invoice_line_ids.filtered(lambda r: not r.display_type)
|
||||
|
||||
def get_paynet_other_reference(self):
|
||||
"""Allows glue module to insert <OTHER-REFERENCE> in paynet <HEADER>
|
||||
|
||||
Add to the list ref, object strucutred like this:
|
||||
|
||||
{'type': other reference allowed types,
|
||||
'no': the content of <Reference-No> desired
|
||||
}
|
||||
"""
|
||||
self.ensure_one()
|
||||
return []
|
||||
|
||||
def log_invoice_accepted_by_system(self):
|
||||
""" """
|
||||
self.activity_feedback(
|
||||
["ebill_paynet.mail_activity_dws_error"],
|
||||
feedback="It worked on a later try",
|
||||
)
|
||||
self.message_post(body=_("Invoice accepted by the Paynet system"))
|
||||
self.invoice_export_confirmed = True
|
||||
|
||||
def log_invoice_refused_by_system(self):
|
||||
""" """
|
||||
activity_type = "ebill_paynet.mail_activity_dws_error"
|
||||
activity = self.activity_reschedule(
|
||||
[activity_type], date_deadline=fields.Date.today()
|
||||
)
|
||||
values = {}
|
||||
if not activity:
|
||||
message = self.env.ref("ebill_paynet.dws_reject_invoice")._render(
|
||||
values=values
|
||||
)
|
||||
activity = self.activity_schedule(
|
||||
activity_type, summary="Invoice rejected by Paynet", note=message
|
||||
)
|
||||
# error_log = values.get("error_detail")
|
||||
# if not error_log:
|
||||
# error_log = _("An error of type {} occured.").format(
|
||||
# values.get("error_type")
|
||||
# )
|
||||
# activity.note += "<div class='mt16'><p>{}</p></div>".format(error_log)
|
48
ebill_paynet/models/ebill_payment_contract.py
Normal file
48
ebill_paynet/models/ebill_payment_contract.py
Normal file
@ -0,0 +1,48 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class EbillPaymentContract(models.Model):
|
||||
_inherit = "ebill.payment.contract"
|
||||
|
||||
paynet_account_number = fields.Char(string="Paynet ID", size=20)
|
||||
is_paynet_contract = fields.Boolean(
|
||||
compute="_compute_is_paynet_contract", store=False
|
||||
)
|
||||
paynet_service_id = fields.Many2one(
|
||||
comodel_name="paynet.service", string="Paynet Service", ondelete="restrict"
|
||||
)
|
||||
payment_type = fields.Selection(
|
||||
selection=[("qr", "QR"), ("esr", "ESR")],
|
||||
string="Payment method",
|
||||
default="qr",
|
||||
help="Payment type to use for the invoices sent,"
|
||||
" PDF will be generated and attached accordingly.",
|
||||
)
|
||||
|
||||
@api.depends("transmit_method_id")
|
||||
def _compute_is_paynet_contract(self):
|
||||
transmit_method = self.env.ref("ebill_paynet.paynet_transmit_method")
|
||||
for record in self:
|
||||
record.is_paynet_contract = record.transmit_method_id == transmit_method
|
||||
|
||||
@api.constrains("transmit_method_id", "paynet_account_number")
|
||||
def _check_paynet_account_number(self):
|
||||
for contract in self:
|
||||
if not contract.is_paynet_contract:
|
||||
continue
|
||||
if not contract.paynet_account_number:
|
||||
raise ValidationError(
|
||||
_("The Paynet ID is required for a Paynet contract.")
|
||||
)
|
||||
|
||||
@api.constrains("transmit_method_id", "paynet_service_id")
|
||||
def _check_paynet_service_id(self):
|
||||
for contract in self:
|
||||
if contract.is_paynet_contract and not contract.paynet_service_id:
|
||||
raise ValidationError(
|
||||
_("A Paynet service is required for a Paynet contract.")
|
||||
)
|
181
ebill_paynet/models/paynet_invoice_message.py
Normal file
181
ebill_paynet/models/paynet_invoice_message.py
Normal file
@ -0,0 +1,181 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
# Needs Jinja 2.10
|
||||
from jinja2 import Environment, FileSystemLoader, select_autoescape
|
||||
|
||||
from odoo import fields, models
|
||||
from odoo.modules.module import get_module_root
|
||||
|
||||
from odoo.addons.base.models.res_bank import sanitize_account_number
|
||||
|
||||
from ..components.api import PayNetDWS
|
||||
|
||||
import zeep # isort:skip
|
||||
|
||||
|
||||
MODULE_PATH = get_module_root(os.path.dirname(__file__))
|
||||
INVOICE_TEMPLATE_2013 = "invoice-2013A.xml"
|
||||
INVOICE_TEMPLATE_2003 = "invoice-2003A.xml"
|
||||
TEMPLATE_DIR = [MODULE_PATH + "/messages"]
|
||||
|
||||
DOCUMENT_TYPE = {"out_invoice": "EFD", "out_refund": "EGS"}
|
||||
|
||||
|
||||
class PaynetInvoiceMessage(models.Model):
|
||||
_name = "paynet.invoice.message"
|
||||
_description = "Paynet shipment send to service"
|
||||
|
||||
service_id = fields.Many2one(
|
||||
comodel_name="paynet.service",
|
||||
string="Paynet Service",
|
||||
required=True,
|
||||
ondelete="restrict",
|
||||
readonly=True,
|
||||
)
|
||||
invoice_id = fields.Many2one(comodel_name="account.move", ondelete="restrict")
|
||||
attachment_id = fields.Many2one("ir.attachment", "PDF")
|
||||
state = fields.Selection(
|
||||
selection=[
|
||||
("draft", "Draft"),
|
||||
("sent", "Sent"),
|
||||
("done", "Done"),
|
||||
("reject", "Reject"),
|
||||
("error", "Error"),
|
||||
],
|
||||
default="draft",
|
||||
)
|
||||
ic_ref = fields.Char(
|
||||
string="IC Ref", size=14, help="Document interchange reference"
|
||||
)
|
||||
# Set with invoice_id.number but also with returned data from server ?
|
||||
ref = fields.Char("Reference No.", size=35)
|
||||
ebill_account_number = fields.Char("Paynet Id", size=20)
|
||||
payload = fields.Text("Payload sent")
|
||||
response = fields.Text("Response recieved")
|
||||
shipment_id = fields.Char(size=24, help="Shipment Id on Paynet service")
|
||||
payment_type = fields.Selection(
|
||||
selection=[("qr", "QR"), ("esr", "ESR"), ("esp", "ESP"), ("npy", "NPY")],
|
||||
default="qr",
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
def _get_ic_ref(self):
|
||||
return "SA%012d" % self.id
|
||||
|
||||
def send_to_paynet(self):
|
||||
for message in self:
|
||||
message.payload = message._generate_payload()
|
||||
try:
|
||||
shipment_id = message.service_id.take_shipment(message.payload)
|
||||
message.shipment_id = shipment_id
|
||||
message.state = "sent"
|
||||
except zeep.exceptions.Fault as e:
|
||||
message.response = PayNetDWS.handle_fault(e)
|
||||
message.state = "error"
|
||||
|
||||
@staticmethod
|
||||
def format_date(date_string=None):
|
||||
if not date_string:
|
||||
date_string = datetime.now()
|
||||
return date_string.strftime("%Y%m%d")
|
||||
|
||||
def _get_payload_params(self):
|
||||
self.ic_ref = self._get_ic_ref()
|
||||
bank_account = ""
|
||||
if self.payment_type == "qr":
|
||||
bank_account = sanitize_account_number(
|
||||
self.invoice_id.partner_bank_id.l10n_ch_qr_iban
|
||||
or self.invoice_id.partner_bank_id.acc_number
|
||||
)
|
||||
else:
|
||||
bank_account = self.invoice_id.partner_bank_id.l10n_ch_isr_subscription_chf
|
||||
if bank_account:
|
||||
account_parts = bank_account.split("-")
|
||||
bank_account = (
|
||||
account_parts[0] + account_parts[1].rjust(6, "0") + account_parts[2]
|
||||
)
|
||||
else:
|
||||
bank_account = ""
|
||||
|
||||
params = {
|
||||
"client_pid": self.service_id.client_pid,
|
||||
"invoice": self.invoice_id,
|
||||
"invoice_lines": self.invoice_id.paynet_invoice_line_ids(),
|
||||
"biller": self.invoice_id.company_id,
|
||||
"customer": self.invoice_id.partner_id,
|
||||
"delivery": self.invoice_id.partner_shipping_id,
|
||||
"pdf_data": self.attachment_id.datas.decode("ascii"),
|
||||
"bank": self.invoice_id.partner_bank_id,
|
||||
"bank_account": bank_account,
|
||||
"ic_ref": self.ic_ref,
|
||||
"payment_type": self.payment_type,
|
||||
"document_type": DOCUMENT_TYPE[self.invoice_id.move_type],
|
||||
"format_date": self.format_date,
|
||||
"ebill_account_number": self.ebill_account_number,
|
||||
"discount_template": "",
|
||||
"discount": {},
|
||||
}
|
||||
amount_by_group = []
|
||||
# Get the percentage of the tax from the name of the group
|
||||
# Could be improve by searching in the account_tax linked to the group
|
||||
for taxgroup in self.invoice_id.amount_by_group:
|
||||
rate = taxgroup[0].split()[-1:][0][:-1]
|
||||
amount_by_group.append(
|
||||
(
|
||||
rate or "0",
|
||||
taxgroup[1],
|
||||
taxgroup[2],
|
||||
)
|
||||
)
|
||||
params["amount_by_group"] = amount_by_group
|
||||
# Get the invoice due date
|
||||
date_due = None
|
||||
if self.invoice_id.invoice_payment_term_id:
|
||||
terms = self.invoice_id.invoice_payment_term_id.compute(
|
||||
self.invoice_id.amount_total
|
||||
)
|
||||
if terms:
|
||||
# Returns all payment and their date like [('2020-12-07', 430.37), ...]
|
||||
# Get the last payment date in the format "202021207"
|
||||
date_due = terms[-1][0].replace("-", "")
|
||||
if not date_due:
|
||||
date_due = self.format_date(
|
||||
self.invoice_id.invoice_date_due or self.invoice_id.invoice_date
|
||||
)
|
||||
params["date_due"] = date_due
|
||||
return params
|
||||
|
||||
def _get_jinja_env(self, template_dir):
|
||||
jinja_env = Environment(
|
||||
loader=FileSystemLoader(template_dir),
|
||||
autoescape=select_autoescape(["xml"]),
|
||||
)
|
||||
# Force the truncate filter to be exact
|
||||
jinja_env.policies["truncate.leeway"] = 0
|
||||
return jinja_env
|
||||
|
||||
def _get_template(self, jinja_env):
|
||||
if self.service_id.service_type == "b2b":
|
||||
return jinja_env.get_template(INVOICE_TEMPLATE_2003)
|
||||
else:
|
||||
return jinja_env.get_template(INVOICE_TEMPLATE_2013)
|
||||
|
||||
def _generate_payload(self):
|
||||
self.ensure_one()
|
||||
assert self.state == "draft"
|
||||
params = self._get_payload_params()
|
||||
jinja_env = self._get_jinja_env(TEMPLATE_DIR)
|
||||
jinja_template = self._get_template(jinja_env)
|
||||
return jinja_template.render(params)
|
||||
|
||||
def update_invoice_status(self):
|
||||
"""Update the export status in the chatter."""
|
||||
for message in self:
|
||||
if message.state == "done":
|
||||
message.invoice_id.log_invoice_accepted_by_system()
|
||||
elif message.state in ["reject", "error"]:
|
||||
message.invoice_id.log_invoice_refused_by_system()
|
222
ebill_paynet/models/paynet_service.py
Normal file
222
ebill_paynet/models/paynet_service.py
Normal file
@ -0,0 +1,222 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
|
||||
import zeep
|
||||
from lxml import etree
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
from ..components.api import PayNetDWS
|
||||
|
||||
SYSTEM_PROD_URL = "https://dws.paynet.ch/DWS/DWS"
|
||||
SYSTEM_TEST_URL = "https://dws-test.paynet.ch/DWS/DWS"
|
||||
|
||||
PENDING_STATES = ["ReadyForSending", "Submitted"]
|
||||
ALL_STATES = PENDING_STATES + ["ArrivedAtDestination"]
|
||||
# The state for already acknowledge ones ArrivedAtDestination
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PaynetService(models.Model):
|
||||
_name = "paynet.service"
|
||||
_description = "Paynet service configuration"
|
||||
|
||||
name = fields.Char(required=True)
|
||||
url = fields.Char(compute="_compute_url")
|
||||
username = fields.Char()
|
||||
password = fields.Char()
|
||||
client_pid = fields.Char(string="Paynet ID", size=17, required=True)
|
||||
use_test_service = fields.Boolean(string="Testing", help="Target the test service")
|
||||
service_type = fields.Selection(
|
||||
selection=[("b2b", "B2B"), ("b2c", "B2C")],
|
||||
string="Service type",
|
||||
default="b2b",
|
||||
help="Specify the type of XML exchange with the service.",
|
||||
)
|
||||
partner_bank_id = fields.Many2one(
|
||||
comodel_name="res.partner.bank", string="Bank account", ondelete="restrict"
|
||||
)
|
||||
invoice_message_ids = fields.One2many(
|
||||
comodel_name="paynet.invoice.message",
|
||||
inverse_name="service_id",
|
||||
string="Invoice Messages",
|
||||
readonly=True,
|
||||
)
|
||||
ebill_payment_contract_ids = fields.One2many(
|
||||
comodel_name="ebill.payment.contract",
|
||||
inverse_name="paynet_service_id",
|
||||
string="Contracts",
|
||||
readonly=True,
|
||||
)
|
||||
active = fields.Boolean(default=True)
|
||||
|
||||
@api.depends("use_test_service")
|
||||
def _compute_url(self):
|
||||
for record in self:
|
||||
if record.use_test_service:
|
||||
record.url = SYSTEM_TEST_URL
|
||||
else:
|
||||
record.url = SYSTEM_PROD_URL
|
||||
|
||||
def take_shipment(self, content):
|
||||
"""Send a shipment via DWS to the Paynet System
|
||||
|
||||
Return value is the shipment id
|
||||
"""
|
||||
self.ensure_one()
|
||||
dws = PayNetDWS(self.url, self.use_test_service)
|
||||
content = content.encode("utf-8")
|
||||
res = dws.service.takeShipment(
|
||||
Authorization=dws.authorization(self.username, self.password),
|
||||
# ProcessingDate : Preferred processing date,
|
||||
# if not provided, processed asap
|
||||
# ShipmentPriority: Value between 1 and 9 (default is 5)
|
||||
Content=content,
|
||||
)
|
||||
return res
|
||||
|
||||
def get_shipment_list(self):
|
||||
"""Get a list of shipments present on the DWS."""
|
||||
self.ensure_one()
|
||||
dws = PayNetDWS(self.url, self.use_test_service)
|
||||
res = dws.service.getShipmentList(
|
||||
Authorization=dws.authorization(self.username, self.password),
|
||||
# fromEntry : Position number as of which shipments should be
|
||||
# retrieved (default is 1)
|
||||
# maxEntries : Max number of shimpment listed (default is 100)
|
||||
# FromDate :
|
||||
# ToDate :
|
||||
ShipmentStates=PENDING_STATES,
|
||||
# FromShipmentPriority:
|
||||
# ToShipmentPriority:
|
||||
)
|
||||
|
||||
return res
|
||||
|
||||
def get_shipment_content(self, shipment_id):
|
||||
""" """
|
||||
self.ensure_one()
|
||||
dws = PayNetDWS(self.url, self.use_test_service)
|
||||
try:
|
||||
res = dws.service.getShipmentContent(
|
||||
Authorization=dws.authorization(self.username, self.password),
|
||||
ShipmentID=shipment_id,
|
||||
)
|
||||
except zeep.exceptions.Fault as e:
|
||||
error = dws.handle_fault(e)
|
||||
raise UserError(error)
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def handle_received_shipment(self, res, shipment_id):
|
||||
""" """
|
||||
content = res["Content"]
|
||||
# TODO: if it contains encoding should return False so not confirmed
|
||||
if not content["encoding"]:
|
||||
# XML-FSCM-CONTRL do not have an encoding
|
||||
# TODO Could check the INTERCHANGE ids to check the system
|
||||
xml_string = content["_value_1"]
|
||||
root = etree.fromstring(xml_string)
|
||||
if root.tag == "XML-FSCM-CONTRL-2003A":
|
||||
control = root[1]
|
||||
status = control.attrib.get("Action-Code")
|
||||
ic_ref = control.xpath("//CONTRL/IC-Ref/text()")[0]
|
||||
state = "done" if status == "OK" else "error"
|
||||
elif root.tag == "XML-FSCM-CONFIRMATION-2003A":
|
||||
conf_status = root[1]
|
||||
ic_ref = conf_status.xpath("//ORIGINAL-MESSAGE/IC-Ref/text()")[0]
|
||||
status = conf_status.xpath("//MESSAGE-STATUS/@Status-Code")[0]
|
||||
state = "done" if status == "OK" else "error"
|
||||
elif root.tag == "XML-FSCM-REJECTION-2003A":
|
||||
# Not tested, need to be simulated on the portal
|
||||
# Only possible for b2c contract
|
||||
state = "rejected"
|
||||
else:
|
||||
return False
|
||||
# Updating message concerned by the response
|
||||
# TODO improve me
|
||||
message = self.env["paynet.invoice.message"].search(
|
||||
[("ic_ref", "=", ic_ref)]
|
||||
)
|
||||
if not message:
|
||||
_logger.error(
|
||||
"IC_Ref {} not found for shipment {}".format(ic_ref, shipment_id)
|
||||
)
|
||||
return False
|
||||
message.state = state
|
||||
message.response = etree.tostring(root)
|
||||
message.update_invoice_status()
|
||||
return True
|
||||
|
||||
def confirm_shipment(self, shipment_id):
|
||||
"""Confirm a shipment reception to the DWS."""
|
||||
self.ensure_one()
|
||||
dws = PayNetDWS(self.url, self.use_test_service)
|
||||
with dws.client.settings(raw_response=True):
|
||||
# The DWS returns an empty response for the confirmation
|
||||
# And due to that Zeep raises an exception while trying to parse
|
||||
# This is why we want the raw Request response
|
||||
res = dws.service.confirmShipmentReceipt(
|
||||
Authorization=dws.authorization(self.username, self.password),
|
||||
ShipmentID=shipment_id,
|
||||
)
|
||||
return res.status_code == 200
|
||||
|
||||
def ping_service(self):
|
||||
"""Ping the DWS service this works without autentication."""
|
||||
dws = PayNetDWS(self.url, self.use_test_service)
|
||||
return dws.service.ping(ClientData="hello")
|
||||
|
||||
def check_shipments(self):
|
||||
"""Check for shipments on the service and create jobs to download them."""
|
||||
self.ensure_one()
|
||||
res = self.get_shipment_list()
|
||||
_logger.info("Paynet ({}) shipment list result : {}".format(self.name, res))
|
||||
|
||||
for shipment in res["Shipment"]:
|
||||
shipment_id = shipment["ShipmentID"]
|
||||
description = "Paynet - Download shipment {}".format(shipment_id)
|
||||
self.with_delay(
|
||||
description=description, channel="root.invoice_export"
|
||||
).download_shipment(shipment_id)
|
||||
return "{} shipments found for {} service.".format(
|
||||
res["entriesFound"], self.name
|
||||
)
|
||||
|
||||
def download_shipment(self, shipment_id):
|
||||
"""Download a shipment, parse it and if successful, acknowledge it."""
|
||||
# TODO: Should test if shipment has already been downloaded
|
||||
# Maybe have a shipment model ?
|
||||
res = self.get_shipment_content(shipment_id)
|
||||
if self.handle_received_shipment(res, shipment_id):
|
||||
self.confirm_shipment(shipment_id)
|
||||
return "Shimpment {} downloaded and acknowledged.".format(shipment_id)
|
||||
else:
|
||||
return "Shipment {} can not be parsed \n {}".format(shipment_id, res)
|
||||
|
||||
def test_ping(self):
|
||||
"""Test the service from the UI."""
|
||||
self.ensure_one()
|
||||
msg = ["Test connection to service : {}".format(self.url)]
|
||||
res = self.ping_service()
|
||||
if "ClientData" in res:
|
||||
msg.append(" - Success pinging service")
|
||||
else:
|
||||
msg.append(" - Failed pinging service")
|
||||
res = self.get_shipment_list()
|
||||
if "Shipment" in res:
|
||||
msg.append(" - Success fetching shipment list")
|
||||
else:
|
||||
msg.append(" - Failed fetching shipment list")
|
||||
raise UserError("\n".join(msg))
|
||||
|
||||
@api.model
|
||||
def cron_poll_shipment(self):
|
||||
"""Cron job to poll for shipments on all active services."""
|
||||
services = self.search([])
|
||||
for service in services:
|
||||
service.check_shipments()
|
17
ebill_paynet/models/sale_order.py
Normal file
17
ebill_paynet/models/sale_order.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 2021 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
|
||||
_inherit = "sale.order"
|
||||
|
||||
paynet_client_order_ref = fields.Char(compute="_compute_paynet_client_order_ref")
|
||||
|
||||
@api.depends("client_order_ref")
|
||||
def _compute_paynet_client_order_ref(self):
|
||||
"""Compute the customer reference order to allow for glue module."""
|
||||
for order in self:
|
||||
order.paynet_client_order_ref = order.client_order_ref
|
14
ebill_paynet/readme/CONFIGURE.rst
Normal file
14
ebill_paynet/readme/CONFIGURE.rst
Normal file
@ -0,0 +1,14 @@
|
||||
## Create a service
|
||||
|
||||
To create a service you need to be registred with SIXT Paynet service. Then the configuration of the service can be done in `Accounting - Configuration - Payments - Paynet Service`
|
||||
|
||||
## Configure the customers
|
||||
|
||||
A customer that wants to receive his invoices through Paynet will also need to register with the service.
|
||||
In Odoo to enable the sending of invoices for a specific customer through Paynet, the transmit method must be set accordingly for that customer. This is done on the customer form in the tab `Sales & Purchases` section `Sales`.
|
||||
|
||||
## Configure the contracts
|
||||
|
||||
The contracts specific to e-billing are located in `Accounting - Customers - eBill Payment Contract`
|
||||
Although the Paynet system allows for automatic exchange of contract registration and status changes, this automation is not yet implemented.
|
||||
To be active a contract needs to be in the state `Open` and it's start/end dates to be valid.
|
1
ebill_paynet/readme/CONTRIBUTORS.rst
Normal file
1
ebill_paynet/readme/CONTRIBUTORS.rst
Normal file
@ -0,0 +1 @@
|
||||
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
3
ebill_paynet/readme/CREDITS.rst
Normal file
3
ebill_paynet/readme/CREDITS.rst
Normal file
@ -0,0 +1,3 @@
|
||||
The development of this module has been financially supported by:
|
||||
|
||||
* Camptocamp
|
3
ebill_paynet/readme/DESCRIPTION.rst
Normal file
3
ebill_paynet/readme/DESCRIPTION.rst
Normal file
@ -0,0 +1,3 @@
|
||||
This module implements the exchange of electronic invoices with the SIXT Paynet infrastructure used in Switzerland.
|
||||
|
||||
It allows the automatic sending of invoice to customer that have registered with the service.
|
2
ebill_paynet/readme/INSTALL.rst
Normal file
2
ebill_paynet/readme/INSTALL.rst
Normal file
@ -0,0 +1,2 @@
|
||||
This module depends on `base_ebill_payment_contract` which is located on `OCA/account_invoicing`, so this repository must also be present on the system.
|
||||
This `base_ebill_payment_contract` module depends on `account_invoice_transmit_method` which will also be installed.
|
11
ebill_paynet/readme/ROADMAP.rst
Normal file
11
ebill_paynet/readme/ROADMAP.rst
Normal file
@ -0,0 +1,11 @@
|
||||
To Do
|
||||
|
||||
* The B2C invoice generated is only a draft and not tested, yet.
|
||||
* Invoice in currency other than CHF will not be generated correctly.
|
||||
* Implementation of the automatic registration of contracts, is not impemented and probably not supported by the DWS
|
||||
|
||||
Improvements
|
||||
|
||||
* On the contract view the list of messages for that contract could be visible.
|
||||
* When an error is returned by the service it should be clearer where it is located in the payload send.
|
||||
* In the chatter add a link to the job when it fails
|
5
ebill_paynet/readme/USAGE.rst
Normal file
5
ebill_paynet/readme/USAGE.rst
Normal file
@ -0,0 +1,5 @@
|
||||
To use this module, you need to:
|
||||
|
||||
#. Configure the service, customers and contracts as described in the CONFIGURATION section.
|
||||
#. Create an invoice for a customer with an open Paynet contract.
|
||||
#. Validate the invoice, and it will be send to the service.
|
5
ebill_paynet/security/ir.model.access.csv
Normal file
5
ebill_paynet/security/ir.model.access.csv
Normal file
@ -0,0 +1,5 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_paynet_service_user,access_paynet_service_user,model_paynet_service,base.group_user,1,0,0,0
|
||||
access_paynet_service_manager,access_paynet_service_manager,model_paynet_service,account.group_account_manager,1,1,1,1
|
||||
access_paynet_invoice_message_user,access_paynet_invoice_message_user,model_paynet_invoice_message,base.group_user,1,0,0,0
|
||||
access_paynet_invoice_message_manager,access_paynet_invoice_message_manager,model_paynet_invoice_message,account.group_account_manager,1,1,1,1
|
|
BIN
ebill_paynet/static/description/icon.png
Normal file
BIN
ebill_paynet/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
473
ebill_paynet/static/description/index.html
Normal file
473
ebill_paynet/static/description/index.html
Normal file
@ -0,0 +1,473 @@
|
||||
<?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>eBill Paynet</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="ebill-paynet">
|
||||
<h1 class="title">eBill Paynet</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/l10n-switzerland/tree/14.0/ebill_paynet"><img alt="OCA/l10n-switzerland" src="https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-switzerland-14-0/l10n-switzerland-14-0-ebill_paynet"><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/125/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module implements the exchange of electronic invoices with the SIXT Paynet infrastructure used in Switzerland.</p>
|
||||
<p>It allows the automatic sending of invoice to customer that have registered with the service.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
|
||||
<li><a class="reference internal" href="#configuration" id="id2">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="id3">Usage</a></li>
|
||||
<li><a class="reference internal" href="#known-issues-roadmap" id="id4">Known issues / Roadmap</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id5">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id6">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id7">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id8">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#other-credits" id="id9">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id10">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="installation">
|
||||
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
|
||||
<p>This module depends on <cite>base_ebill_payment_contract</cite> which is located on <cite>OCA/account_invoicing</cite>, so this repository must also be present on the system.
|
||||
This <cite>base_ebill_payment_contract</cite> module depends on <cite>account_invoice_transmit_method</cite> which will also be installed.</p>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#id2">Configuration</a></h1>
|
||||
<p>## Create a service</p>
|
||||
<p>To create a service you need to be registred with SIXT Paynet service. Then the configuration of the service can be done in <cite>Accounting - Configuration - Payments - Paynet Service</cite></p>
|
||||
<p>## Configure the customers</p>
|
||||
<p>A customer that wants to receive his invoices through Paynet will also need to register with the service.
|
||||
In Odoo to enable the sending of invoices for a specific customer through Paynet, the transmit method must be set accordingly for that customer. This is done on the customer form in the tab <cite>Sales & Purchases</cite> section <cite>Sales</cite>.</p>
|
||||
<p>## Configure the contracts</p>
|
||||
<p>The contracts specific to e-billing are located in <cite>Accounting - Customers - eBill Payment Contract</cite>
|
||||
Although the Paynet system allows for automatic exchange of contract registration and status changes, this automation is not yet implemented.
|
||||
To be active a contract needs to be in the state <cite>Open</cite> and it’s start/end dates to be valid.</p>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id3">Usage</a></h1>
|
||||
<p>To use this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Configure the service, customers and contracts as described in the CONFIGURATION section.</li>
|
||||
<li>Create an invoice for a customer with an open Paynet contract.</li>
|
||||
<li>Validate the invoice, and it will be send to the service.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="known-issues-roadmap">
|
||||
<h1><a class="toc-backref" href="#id4">Known issues / Roadmap</a></h1>
|
||||
<p>To Do</p>
|
||||
<ul class="simple">
|
||||
<li>The B2C invoice generated is only a draft and not tested, yet.</li>
|
||||
<li>Invoice in currency other than CHF will not be generated correctly.</li>
|
||||
<li>Implementation of the automatic registration of contracts, is not impemented and probably not supported by the DWS</li>
|
||||
</ul>
|
||||
<p>Improvements</p>
|
||||
<ul class="simple">
|
||||
<li>On the contract view the list of messages for that contract could be visible.</li>
|
||||
<li>When an error is returned by the service it should be clearer where it is located in the payload send.</li>
|
||||
<li>In the chatter add a link to the job when it fails</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id5">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-switzerland/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/l10n-switzerland/issues/new?body=module:%20ebill_paynet%0Aversion:%2014.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="#id6">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id7">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Camptocamp SA</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id8">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Thierry Ducrest <<a class="reference external" href="mailto:thierry.ducrest@camptocamp.com">thierry.ducrest@camptocamp.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#id9">Other credits</a></h2>
|
||||
<p>The development of this module has been financially supported by:</p>
|
||||
<ul class="simple">
|
||||
<li>Camptocamp</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id10">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/l10n-switzerland/tree/14.0/ebill_paynet">OCA/l10n-switzerland</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>
|
5
ebill_paynet/tests/__init__.py
Normal file
5
ebill_paynet/tests/__init__.py
Normal file
@ -0,0 +1,5 @@
|
||||
from . import test_ebill_paynet
|
||||
|
||||
# Test for the B2C implemenation wich is not done, yet
|
||||
# from . import test_invoice_message
|
||||
from . import test_invoice_message_b2b
|
224
ebill_paynet/tests/common.py
Normal file
224
ebill_paynet/tests/common.py
Normal file
@ -0,0 +1,224 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
|
||||
import os
|
||||
from os.path import dirname, join
|
||||
|
||||
from vcr import VCR
|
||||
from xmlunittest import XmlTestMixin
|
||||
|
||||
from odoo.tests.common import SavepointCase
|
||||
|
||||
|
||||
class CommonCase(SavepointCase, XmlTestMixin):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.country = cls.env.ref("base.ch")
|
||||
cls.company = cls.env.user.company_id
|
||||
cls.company.vat = "CHE-012.345.678"
|
||||
cls.company.name = "Camptocamp SA"
|
||||
cls.company.street = "StreetOne"
|
||||
cls.company.street2 = ""
|
||||
cls.company.zip = "1015"
|
||||
cls.company.city = "Lausanne"
|
||||
cls.company.partner_id.country_id = cls.country
|
||||
cls.bank = cls.env.ref("base.res_bank_1")
|
||||
cls.bank.clearing = 777
|
||||
cls.tax7 = cls.env["account.tax"].create(
|
||||
{
|
||||
"name": "Test tax",
|
||||
"type_tax_use": "sale",
|
||||
"amount_type": "percent",
|
||||
"amount": "7.7",
|
||||
"tax_group_id": cls.env.ref("l10n_ch.tax_group_tva_77").id,
|
||||
}
|
||||
)
|
||||
cls.partner_bank = cls.env["res.partner.bank"].create(
|
||||
{
|
||||
"bank_id": cls.bank.id,
|
||||
"acc_number": "300.300.300",
|
||||
"acc_holder_name": "AccountHolderName",
|
||||
"partner_id": cls.company.partner_id.id,
|
||||
"l10n_ch_qr_iban": "CH21 3080 8001 2345 6782 7",
|
||||
}
|
||||
)
|
||||
cls.terms = cls.env.ref("account.account_payment_term_15days")
|
||||
cls.paynet = cls.env["paynet.service"].create(
|
||||
{
|
||||
"name": "Paynet Test Service",
|
||||
"use_test_service": True,
|
||||
"client_pid": os.getenv("PAYNET_ID", "52110726772852593"),
|
||||
"service_type": "b2b",
|
||||
}
|
||||
)
|
||||
cls.state = cls.env["res.country.state"].create(
|
||||
{"code": "RR", "name": "Fribourg", "country_id": cls.country.id}
|
||||
)
|
||||
cls.customer = cls.env["res.partner"].create(
|
||||
{
|
||||
"name": "Test RAD Customer XML",
|
||||
"customer_rank": 1,
|
||||
"is_company": True,
|
||||
"street": "Teststrasse 100",
|
||||
"street2": "This is a very long street name that should be snapped",
|
||||
"city": "Fribourg",
|
||||
"zip": "1700",
|
||||
"country_id": cls.country.id,
|
||||
"state_id": cls.state.id,
|
||||
}
|
||||
)
|
||||
cls.customer_delivery = cls.env["res.partner"].create(
|
||||
{
|
||||
"name": "The Shed in the yard",
|
||||
"street": "Teststrasse 102",
|
||||
"city": "Fribourg",
|
||||
"zip": "1700",
|
||||
"parent_id": cls.customer.id,
|
||||
"type": "delivery",
|
||||
}
|
||||
)
|
||||
cls.contract = cls.env["ebill.payment.contract"].create(
|
||||
{
|
||||
"partner_id": cls.customer.id,
|
||||
"paynet_account_number": "41010198248040391",
|
||||
"state": "open",
|
||||
"paynet_service_id": cls.paynet.id,
|
||||
"payment_type": "qr",
|
||||
}
|
||||
)
|
||||
cls.account = cls.env["account.account"].search(
|
||||
[
|
||||
(
|
||||
"user_type_id",
|
||||
"=",
|
||||
cls.env.ref("account.data_account_type_revenue").id,
|
||||
)
|
||||
],
|
||||
limit=1,
|
||||
)
|
||||
cls.at_receivable = cls.env["account.account.type"].create(
|
||||
{
|
||||
"name": "Test receivable account",
|
||||
"type": "receivable",
|
||||
"internal_group": "asset",
|
||||
}
|
||||
)
|
||||
cls.a_receivable = cls.env["account.account"].create(
|
||||
{
|
||||
"name": "Test receivable account",
|
||||
"code": "TEST_RA",
|
||||
"user_type_id": cls.at_receivable.id,
|
||||
"reconcile": True,
|
||||
}
|
||||
)
|
||||
cls.product = cls.env["product.product"].create(
|
||||
{"name": "Product One", "list_price": 100.00, "default_code": "370003021"}
|
||||
)
|
||||
cls.product_long_name = cls.env["product.product"].create(
|
||||
{
|
||||
"name": "Product With a Very Long Name That Need To Be Truncated",
|
||||
"list_price": 0.00,
|
||||
"default_code": "370003022",
|
||||
}
|
||||
)
|
||||
cls.product.product_tmpl_id.invoice_policy = "order"
|
||||
cls.product_long_name.product_tmpl_id.invoice_policy = "order"
|
||||
cls.sale = cls.env["sale.order"].create(
|
||||
{
|
||||
"name": "Order123",
|
||||
"partner_id": cls.customer.id,
|
||||
"partner_shipping_id": cls.customer_delivery.id,
|
||||
"client_order_ref": "CustomerRef",
|
||||
"order_line": [
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"product_id": cls.product.id,
|
||||
"name": cls.product.name,
|
||||
"product_uom_qty": 4.0,
|
||||
"price_unit": 123.0,
|
||||
"tax_id": [(4, cls.tax7.id, 0)],
|
||||
},
|
||||
),
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"product_id": cls.product_long_name.id,
|
||||
"name": cls.product_long_name.name,
|
||||
"product_uom_qty": 1.0,
|
||||
"price_unit": 0.0,
|
||||
"tax_id": [(4, cls.tax7.id, 0)],
|
||||
},
|
||||
),
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.sale.action_confirm()
|
||||
cls.sale.date_order = "2019-06-01"
|
||||
# Generate the invoice from the sale order
|
||||
cls.invoice = cls.sale._create_invoices()
|
||||
# And add some more lines on the invoice
|
||||
# One UX line and one not linked to a product
|
||||
cls.invoice.update(
|
||||
{
|
||||
"line_ids": [
|
||||
(0, 0, {"name": "A little note", "display_type": "line_note"}),
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"name": "Phone support",
|
||||
"quantity": 4.0,
|
||||
# Set zero, avoiding error with accounting ?!
|
||||
"price_unit": 0,
|
||||
"account_id": cls.at_receivable.id,
|
||||
# "tax_id": [(4, cls.tax7.id, 0)],
|
||||
},
|
||||
),
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.invoice.action_post()
|
||||
cls.invoice.payment_reference = "1234567890"
|
||||
cls.invoice.partner_bank_id = cls.partner_bank.id
|
||||
|
||||
@staticmethod
|
||||
def compare_xml_line_by_line(content, expected):
|
||||
"""This a quick way to check the diff line by line to ease debugging"""
|
||||
generated_line = [
|
||||
xml_content.strip()
|
||||
for xml_content in content.split(b"\n")
|
||||
if len(xml_content.strip())
|
||||
]
|
||||
expected_line = [
|
||||
xml_content.strip()
|
||||
for xml_content in expected.split(b"\n")
|
||||
if len(xml_content.strip())
|
||||
]
|
||||
number_of_lines = len(expected_line)
|
||||
for i in range(number_of_lines):
|
||||
if generated_line[i].strip() != expected_line[i].strip():
|
||||
return "Diff at {}/{} || Expected {} || Generated {}".format(
|
||||
i, number_of_lines, expected_line[i], generated_line[i]
|
||||
)
|
||||
|
||||
|
||||
def get_recorder(base_path=None, **kw):
|
||||
base_path = base_path or dirname(__file__)
|
||||
defaults = dict(
|
||||
record_mode="once",
|
||||
cassette_library_dir=join(base_path, "fixtures/cassettes"),
|
||||
path_transformer=VCR.ensure_suffix(".yaml"),
|
||||
match_on=["method", "path", "query"],
|
||||
filter_headers=["Authorization"],
|
||||
decode_compressed_response=True,
|
||||
)
|
||||
defaults.update(kw)
|
||||
return VCR(**defaults)
|
||||
|
||||
|
||||
recorder = get_recorder()
|
103
ebill_paynet/tests/examples/invoice_1.xml
Normal file
103
ebill_paynet/tests/examples/invoice_1.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XML-FSCM-INVOICE-2013A>
|
||||
<INTERCHANGE>
|
||||
<IC-SENDER>
|
||||
<Pid>52110726772852593</Pid>
|
||||
</IC-SENDER>
|
||||
<IC-RECEIVER>
|
||||
<Pid>41010106799303734</Pid>
|
||||
</IC-RECEIVER>
|
||||
<IC-Ref>$IC_REF</IC-Ref>
|
||||
</INTERCHANGE>
|
||||
<INVOICE Type="EFD">
|
||||
<HEADER>
|
||||
<FUNCTION-FLAGS>
|
||||
<Confirmation-Flag />
|
||||
</FUNCTION-FLAGS>
|
||||
<MESSAGE-REFERENCE>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>INV_TEST_01</Reference-No>
|
||||
<Date>20190607</Date>
|
||||
</REFERENCE-DATE>
|
||||
</MESSAGE-REFERENCE>
|
||||
<PRINT-DATE>
|
||||
<Date>20190607</Date>
|
||||
</PRINT-DATE>
|
||||
<REFERENCE>
|
||||
<INVOICE-REFERENCE>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>INV_TEST_01</Reference-No>
|
||||
<Date>20190607</Date>
|
||||
</REFERENCE-DATE>
|
||||
</INVOICE-REFERENCE>
|
||||
</REFERENCE>
|
||||
<BILLER>
|
||||
<Tax-No>CHE-012.345.678</Tax-No>
|
||||
<PARTY-ID>
|
||||
<Pid>52110726772852593</Pid>
|
||||
</PARTY-ID>
|
||||
<NAME-ADDRESS Format="COM">
|
||||
<NAME>
|
||||
<Line-35>Camptocamp SA</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>StreetOne</Line-35>
|
||||
</STREET>
|
||||
<City>TestCity</City>
|
||||
<Zip>8888</Zip>
|
||||
<Country>CH</Country>
|
||||
</NAME-ADDRESS>
|
||||
<BANK-INFO>
|
||||
<Acct-No>300300300</Acct-No>
|
||||
<Acct-Name>AccountHolderName</Acct-Name>
|
||||
<BankId Type="BCNr-int" Country="CH">001996</BankId>
|
||||
</BANK-INFO>
|
||||
</BILLER>
|
||||
<PAYER>
|
||||
<PARTY-ID>
|
||||
<Pid>41010198248040391</Pid>
|
||||
</PARTY-ID>
|
||||
<NAME-ADDRESS Format="PRV">
|
||||
<NAME>
|
||||
<Line-35>Test RAD Customer XML</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>Teststrasse 100</Line-35>
|
||||
</STREET>
|
||||
<City>Fribourg</City>
|
||||
<State>RR</State>
|
||||
<Zip>1700</Zip>
|
||||
<Country>CH</Country>
|
||||
</NAME-ADDRESS>
|
||||
</PAYER>
|
||||
</HEADER>
|
||||
<LINE-ITEM />
|
||||
<SUMMARY>
|
||||
<INVOICE-AMOUNT>
|
||||
<Amount Currency="CHF">529.88</Amount>
|
||||
</INVOICE-AMOUNT>
|
||||
<VAT-AMOUNT>
|
||||
<Amount Currency="CHF">37.88</Amount>
|
||||
</VAT-AMOUNT>
|
||||
<EXTENDED-AMOUNT Type="79">
|
||||
<Amount Currency="CHF">492.0</Amount>
|
||||
</EXTENDED-AMOUNT>
|
||||
<TAX>
|
||||
<TAX-BASIS>
|
||||
<Amount Currency="CHF">492.0</Amount>
|
||||
</TAX-BASIS>
|
||||
<Rate Category="S">7.7</Rate>
|
||||
<Amount Currency="CHF">37.88</Amount>
|
||||
</TAX>
|
||||
<PAYMENT-TERMS>
|
||||
<BASIC Payment-Type="ESR" Terms-Type="5">
|
||||
<TERMS>
|
||||
<Date>20190607</Date>
|
||||
</TERMS>
|
||||
</BASIC>
|
||||
</PAYMENT-TERMS>
|
||||
<Back-Pack-Container Encode="Base64">
|
||||
</Back-Pack-Container>
|
||||
</SUMMARY>
|
||||
</INVOICE>
|
||||
</XML-FSCM-INVOICE-2013A>
|
239
ebill_paynet/tests/examples/invoice_b2b.xml
Normal file
239
ebill_paynet/tests/examples/invoice_b2b.xml
Normal file
@ -0,0 +1,239 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE XML-FSCM-INVOICE-2003A SYSTEM "XML-FSCM-INVOICE-2003A.DTD">
|
||||
<XML-FSCM-INVOICE-2003A>
|
||||
<INTERCHANGE>
|
||||
<IC-SENDER>
|
||||
<Pid>52110726772852593</Pid>
|
||||
</IC-SENDER>
|
||||
<IC-RECEIVER>
|
||||
<Pid>41010106799303734</Pid>
|
||||
</IC-RECEIVER>
|
||||
<IC-Ref>$IC_REF</IC-Ref>
|
||||
</INTERCHANGE>
|
||||
<INVOICE Type="EFD">
|
||||
<HEADER>
|
||||
<FUNCTION-FLAGS>
|
||||
<Confirmation-Flag/>
|
||||
</FUNCTION-FLAGS>
|
||||
<MESSAGE-REFERENCE>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>INV_TEST_01</Reference-No>
|
||||
<Date Format="CCYYMMDD">20190621</Date>
|
||||
</REFERENCE-DATE>
|
||||
</MESSAGE-REFERENCE>
|
||||
<PRINT-DATE>
|
||||
<Date Format="CCYYMMDD">20190621</Date>
|
||||
</PRINT-DATE>
|
||||
<DELIVERY-DATE>
|
||||
<Date Format="CCYYMMDD">20190621</Date>
|
||||
</DELIVERY-DATE>
|
||||
<REFERENCE>
|
||||
<INVOICE-REFERENCE>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>INV_TEST_01</Reference-No>
|
||||
<Date Format="CCYYMMDD">20190621</Date>
|
||||
</REFERENCE-DATE>
|
||||
</INVOICE-REFERENCE>
|
||||
<ORDER>
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>CustomerRef</Reference-No>
|
||||
<Date Format="CCYYMMDD">20190601</Date>
|
||||
</REFERENCE-DATE>
|
||||
</ORDER>
|
||||
<!-- <DELIVERY-NOTE> -->
|
||||
<!-- <REFERENCE-DATE> -->
|
||||
<!-- <Reference-No>93078415</Reference-No> -->
|
||||
<!-- <Date Format="CCYYMMDD">20190620</Date> -->
|
||||
<!-- </REFERENCE-DATE> -->
|
||||
<!-- </DELIVERY-NOTE> -->
|
||||
<!-- <OTHER-REFERENCE Type="SS"> -->
|
||||
<!-- <REFERENCE-DATE> -->
|
||||
<!-- <Reference-No>Brigitta Harati</Reference-No> -->
|
||||
<!-- </REFERENCE-DATE> -->
|
||||
<!-- </OTHER-REFERENCE> -->
|
||||
<!-- <OTHER-REFERENCE Type="CR"> -->
|
||||
<!-- <REFERENCE-DATE> -->
|
||||
<!-- <Reference-No>Camile STECHMANN</Reference-No> -->
|
||||
<!-- </REFERENCE-DATE> -->
|
||||
<!-- </OTHER-REFERENCE> -->
|
||||
<!-- <OTHER-REFERENCE Type="IT"> -->
|
||||
<!-- <REFERENCE-DATE> -->
|
||||
<!-- <Reference-No>432840</Reference-No> -->
|
||||
<!-- </REFERENCE-DATE> -->
|
||||
<!-- </OTHER-REFERENCE> -->
|
||||
</REFERENCE>
|
||||
<BILLER>
|
||||
<Tax-No>CHE-012.345.678</Tax-No>
|
||||
<Doc-Reference Type="QRR">1234567890</Doc-Reference>
|
||||
<PARTY-ID>
|
||||
<Pid>52110726772852593</Pid>
|
||||
</PARTY-ID>
|
||||
<NAME-ADDRESS Format="COM">
|
||||
<NAME>
|
||||
<Line-35>Camptocamp SA</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>StreetOne</Line-35>
|
||||
</STREET>
|
||||
<City>Lausanne</City>
|
||||
<Zip>1015</Zip>
|
||||
<Country>CH</Country>
|
||||
</NAME-ADDRESS>
|
||||
<BANK-INFO>
|
||||
<Acct-No>CH2130808001234567827</Acct-No>
|
||||
<BankId Type="IID" Country="CH">30808</BankId>
|
||||
</BANK-INFO>
|
||||
</BILLER>
|
||||
<PAYER>
|
||||
<PARTY-ID>
|
||||
<Pid>41010198248040391</Pid>
|
||||
</PARTY-ID>
|
||||
<NAME-ADDRESS Format="COM">
|
||||
<NAME>
|
||||
<Line-35>Test RAD Customer XML</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>Teststrasse 100</Line-35>
|
||||
<Line-35>This is a very long street name tha</Line-35>
|
||||
</STREET>
|
||||
<City>Fribourg</City>
|
||||
<Zip>1700</Zip>
|
||||
<Country>CH</Country>
|
||||
</NAME-ADDRESS>
|
||||
</PAYER>
|
||||
<DELIVERY-PARTY>
|
||||
<NAME-ADDRESS Format="COM">
|
||||
<NAME>
|
||||
<Line-35>Test RAD Customer XML</Line-35>
|
||||
<Line-35>The Shed in the yard</Line-35>
|
||||
</NAME>
|
||||
<STREET>
|
||||
<Line-35>Teststrasse 102</Line-35>
|
||||
</STREET>
|
||||
<City>Fribourg</City>
|
||||
<Zip>1700</Zip>
|
||||
<Country>CH</Country>
|
||||
</NAME-ADDRESS>
|
||||
</DELIVERY-PARTY>
|
||||
<!-- <ALLOWANCE-OR-CHARGE Type="C"> -->
|
||||
<!-- <Service-Code Type="FC"/> -->
|
||||
<!-- <SERVICE-TEXT> -->
|
||||
<!-- <Line-35>Porto + Verpackung</Line-35> -->
|
||||
<!-- </SERVICE-TEXT> -->
|
||||
<!-- <ALC-AMOUNT Print-Status="25"> -->
|
||||
<!-- <Amount Currency="CHF">9.70</Amount> -->
|
||||
<!-- </ALC-AMOUNT> -->
|
||||
<!-- <TAX> -->
|
||||
<!-- <Rate Category="S">7.70</Rate> -->
|
||||
<!-- <Amount Currency="CHF">0.75</Amount> -->
|
||||
<!-- </TAX> -->
|
||||
<!-- </ALLOWANCE-OR-CHARGE> -->
|
||||
</HEADER>
|
||||
<LINE-ITEM Line-Number="1">
|
||||
<ITEM-ID>
|
||||
<Item-Id Type="VN">370003021</Item-Id>
|
||||
<Item-Id Type="SA">370003021</Item-Id>
|
||||
</ITEM-ID>
|
||||
<ITEM-DESCRIPTION>
|
||||
<Item-Type-Code>1011</Item-Type-Code>
|
||||
<Line-35>Product One</Line-35>
|
||||
</ITEM-DESCRIPTION>
|
||||
<ITEM-REFERENCE Type="ON">
|
||||
<!-- TODO add linked sale order in test -->
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>CustomerRef</Reference-No>
|
||||
<Date Format="CCYYMMDD">20190601</Date>
|
||||
<!-- <Line-No>1</Line-No> -->
|
||||
</REFERENCE-DATE>
|
||||
</ITEM-REFERENCE>
|
||||
<Quantity Type="47" Units="PCE">4.0</Quantity>
|
||||
<Price Type="YYY">492.0</Price>
|
||||
<Price Type="AAA">492.0</Price>
|
||||
<Price Type="XXX">529.88</Price>
|
||||
<ITEM-AMOUNT Type="66">
|
||||
<Amount Currency="CHF">529.88</Amount>
|
||||
</ITEM-AMOUNT>
|
||||
<TAX>
|
||||
<Rate>7.7</Rate>
|
||||
<Amount Currency="CHF">37.88</Amount>
|
||||
</TAX>
|
||||
</LINE-ITEM>
|
||||
<LINE-ITEM Line-Number="2">
|
||||
<ITEM-ID>
|
||||
<Item-Id Type="VN">370003022</Item-Id>
|
||||
<Item-Id Type="SA">370003022</Item-Id>
|
||||
</ITEM-ID>
|
||||
<ITEM-DESCRIPTION>
|
||||
<Item-Type-Code>1011</Item-Type-Code>
|
||||
<Line-35>Product With a Very Long Name That </Line-35>
|
||||
<Line-35>Need To Be Truncated</Line-35>
|
||||
</ITEM-DESCRIPTION>
|
||||
<ITEM-REFERENCE Type="ON">
|
||||
<!-- TODO add linked sale order in test -->
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>CustomerRef</Reference-No>
|
||||
<Date Format="CCYYMMDD">20190601</Date>
|
||||
<!-- <Line-No>1</Line-No> -->
|
||||
</REFERENCE-DATE>
|
||||
</ITEM-REFERENCE>
|
||||
<Quantity Type="47" Units="PCE">1.0</Quantity>
|
||||
<Price Type="YYY">0.0</Price>
|
||||
<Price Type="AAA">0.0</Price>
|
||||
<Price Type="XXX">0.0</Price>
|
||||
<ITEM-AMOUNT Type="66">
|
||||
<Amount Currency="CHF">0.0</Amount>
|
||||
</ITEM-AMOUNT>
|
||||
<TAX>
|
||||
<Rate>7.7</Rate>
|
||||
<Amount Currency="CHF">0.0</Amount>
|
||||
</TAX>
|
||||
</LINE-ITEM>
|
||||
<LINE-ITEM Line-Number="3">
|
||||
<ITEM-DESCRIPTION>
|
||||
<Item-Type-Code>1011</Item-Type-Code>
|
||||
<Line-35>Phone support</Line-35>
|
||||
</ITEM-DESCRIPTION>
|
||||
<ITEM-REFERENCE Type="ON">
|
||||
<!-- TODO add linked sale order in test -->
|
||||
<REFERENCE-DATE>
|
||||
<Reference-No>CustomerRef</Reference-No>
|
||||
<Date Format="CCYYMMDD">20190601</Date>
|
||||
<!-- <Line-No>1</Line-No> -->
|
||||
</REFERENCE-DATE>
|
||||
</ITEM-REFERENCE>
|
||||
<Quantity Type="47" Units="PCE">4.0</Quantity>
|
||||
<Price Type="YYY">0.0</Price>
|
||||
<Price Type="AAA">0.0</Price>
|
||||
<Price Type="XXX">0.0</Price>
|
||||
<ITEM-AMOUNT Type="66">
|
||||
<Amount Currency="CHF">0.0</Amount>
|
||||
</ITEM-AMOUNT>
|
||||
<TAX>
|
||||
<Rate>0</Rate>
|
||||
</TAX>
|
||||
</LINE-ITEM>
|
||||
<SUMMARY>
|
||||
<INVOICE-AMOUNT Print-Status="25">
|
||||
<Amount Currency="CHF">529.88</Amount>
|
||||
</INVOICE-AMOUNT>
|
||||
<VAT-AMOUNT Print-Status="25">
|
||||
<!-- Should it not be the amount to be taxed ? -->
|
||||
<Amount Currency="CHF">37.88</Amount>
|
||||
</VAT-AMOUNT>
|
||||
<TAX>
|
||||
<TAX-BASIS>
|
||||
<Amount Currency="CHF">492.0</Amount>
|
||||
</TAX-BASIS>
|
||||
<Rate Category="S">7.7</Rate>
|
||||
<Amount Currency="CHF">37.88</Amount>
|
||||
</TAX>
|
||||
<PAYMENT-TERMS>
|
||||
<BASIC Payment-Type="QR" Terms-Type="5">
|
||||
<TERMS>
|
||||
<Date>20190701</Date>
|
||||
</TERMS>
|
||||
</BASIC>
|
||||
</PAYMENT-TERMS>
|
||||
</SUMMARY>
|
||||
</INVOICE>
|
||||
</XML-FSCM-INVOICE-2003A>
|
50
ebill_paynet/tests/fixtures/cassettes/test_getShipmentContent.yaml
vendored
Normal file
50
ebill_paynet/tests/fixtures/cassettes/test_getShipmentContent.yaml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '<?xml version=''1.0'' encoding=''utf-8''?>
|
||||
|
||||
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><ns0:ShipmentContentMsg
|
||||
xmlns:ns0="http://www.sap.com/DXPPShipmentExchange"><ns1:Authorization xmlns:ns1="http://www.sap.com/DXPPTypes"><ns1:UserName>Campt.System.TEST.7318</ns1:UserName><ns1:Password>CamptSystem&19</ns1:Password></ns1:Authorization><ns2:ShipmentID
|
||||
xmlns:ns2="http://www.sap.com/DXPPTypes">SC-00000000000020357011</ns2:ShipmentID></ns0:ShipmentContentMsg></soap-env:Body></soap-env:Envelope>'
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '544'
|
||||
Content-Type:
|
||||
- text/xml; charset=utf-8
|
||||
SOAPAction:
|
||||
- '"urn:#getShipmentContent"'
|
||||
User-Agent:
|
||||
- Zeep/3.4.0 (www.python-zeep.org)
|
||||
method: POST
|
||||
uri: https://dws-test.paynet.ch/DWS/DWS
|
||||
response:
|
||||
body:
|
||||
string: <env:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><dsx:ShipmentContentMsgReply
|
||||
xmlns:dsx="http://www.sap.com/DXPPShipmentExchange"><dxpp:Content xmlns:dxpp="http://www.sap.com/DXPPTypes">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iSVNPLTg4NTktMSI/Pgo8WE1MLUZTQ00tQ09OVFJMLTIwMDNBPgogIDxJTlRFUkNIQU5HRT4KICAgIDxJQy1TRU5ERVI+CiAgICAgIDxQaWQ+NDEwMTAxMDY3OTkzMDM3MzQ8L1BpZD4KICAgIDwvSUMtU0VOREVSPgogICAgPElDLVJFQ0VJVkVSPgogICAgICA8UGlkPjQxMDEwNzI2NzcyODUyNDgyPC9QaWQ+CiAgICA8L0lDLVJFQ0VJVkVSPgogICAgPElDLVJlZj4yNDYwMDAwNTgyODE8L0lDLVJlZj4KICA8L0lOVEVSQ0hBTkdFPgogIDxDT05UUkwgQWN0aW9uLUNvZGU9Ik5PSyI+CiAgICA8SUMtU0VOREVSPgogICAgICA8UGlkPjQxMDEwNzI2NzcyODUyNDgyPC9QaWQ+CiAgICA8L0lDLVNFTkRFUj4KICAgIDxJQy1SRUNFSVZFUj4KICAgICAgPFBpZD40MTAxMDEwNjc5OTMwMzczNDwvUGlkPgogICAgPC9JQy1SRUNFSVZFUj4KICAgIDxJQy1SZWY+U0EwMDAwMDAwMDAwMDM8L0lDLVJlZj4KICAgIDxFUlJPUi1JTkZPPgogICAgICA8RXJyb3ItQ29kZSBHZW5lcmF0b3I9IlBhcnNlciI+MDUwPC9FcnJvci1Db2RlPgogICAgICA8RXJyb3ItVGV4dD5GZWhsZXIgYmVpbSBwYXJzZW4gZGVyIFhNTCBNZWxkdW5nPC9FcnJvci1UZXh0PgogICAgICA8UE9TSVRJT04+CiAgICAgICAgPFBhdGg+RXJyb3I6IExpbmU9WzE0Ml0sIENvbHVtbj1bMjddLCBNZXNzYWdlPVtEYXRhdHlwZSBlcnJvcjogVHlwZTpJbnZhbGlkRGF0YXR5cGVWYWx1ZUV4Y2VwdGlvbiwgTWVzc2FnZTpWYWx1ZSAnCiAgICAgIAogICAgJyB3aXRoIGxlbmd0aCAnMTInIGlzIGxlc3MgdGhhbiBtaW5pbXVtIGxlbmd0aCBmYWNldCBvZiAnMTAwJyAuXTwvUGF0aD4KICAgICAgPC9QT1NJVElPTj4KICAgIDwvRVJST1ItSU5GTz4KICA8L0NPTlRSTD4KPC9YTUwtRlNDTS1DT05UUkwtMjAwM0E+Cg==</dxpp:Content><dxpp:ShipmentPriority
|
||||
xmlns:dxpp="http://www.sap.com/DXPPTypes">5</dxpp:ShipmentPriority></dsx:ShipmentContentMsgReply></env:Body></env:Envelope>
|
||||
headers:
|
||||
Connection:
|
||||
- close
|
||||
Content-Type:
|
||||
- text/xml;charset=UTF-8
|
||||
Date:
|
||||
- Tue, 02 Jul 2019 08:35:03 GMT
|
||||
Server:
|
||||
- Apache
|
||||
Set-Cookie:
|
||||
- JSESSIONID=DC90F21E1A3543168B5AA475FA1219F5;HttpOnly;Secure
|
||||
Vary:
|
||||
- Accept-Encoding,User-Agent
|
||||
content-length:
|
||||
- '1754'
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
49
ebill_paynet/tests/fixtures/cassettes/test_getShipmentList.yaml
vendored
Normal file
49
ebill_paynet/tests/fixtures/cassettes/test_getShipmentList.yaml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '<?xml version=''1.0'' encoding=''utf-8''?>
|
||||
|
||||
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><ns0:ShipmentListMsg
|
||||
xmlns:ns0="http://www.sap.com/DXPPShipmentExchange" fromEntry="1" maxEntries="100"><ns1:Authorization
|
||||
xmlns:ns1="http://www.sap.com/DXPPTypes"><ns1:UserName>Campt.System.TEST.7318</ns1:UserName><ns1:Password>CamptSystem&19</ns1:Password></ns1:Authorization></ns0:ShipmentListMsg></soap-env:Body></soap-env:Envelope>'
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '472'
|
||||
Content-Type:
|
||||
- text/xml; charset=utf-8
|
||||
SOAPAction:
|
||||
- '"urn:#getShipmentList"'
|
||||
User-Agent:
|
||||
- Zeep/3.3.1 (www.python-zeep.org)
|
||||
method: POST
|
||||
uri: https://dws-test.paynet.ch/DWS/DWS
|
||||
response:
|
||||
body:
|
||||
string: <env:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><dsx:ShipmentListMsgReply
|
||||
entriesFound="0" xmlns:dsx="http://www.sap.com/DXPPShipmentExchange"></dsx:ShipmentListMsgReply></env:Body></env:Envelope>
|
||||
headers:
|
||||
Connection:
|
||||
- close
|
||||
Content-Type:
|
||||
- text/xml;charset=UTF-8
|
||||
Date:
|
||||
- Tue, 04 Jun 2019 09:08:19 GMT
|
||||
Server:
|
||||
- Apache
|
||||
Set-Cookie:
|
||||
- JSESSIONID=47EE555F50C53CE8111DAEB074345902;HttpOnly;Secure
|
||||
Vary:
|
||||
- Accept-Encoding,User-Agent
|
||||
content-length:
|
||||
- '384'
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
49
ebill_paynet/tests/fixtures/cassettes/test_ping_service.yaml
vendored
Normal file
49
ebill_paynet/tests/fixtures/cassettes/test_ping_service.yaml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '<?xml version=''1.0'' encoding=''utf-8''?>
|
||||
|
||||
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><ns0:PingMsg
|
||||
xmlns:ns0="http://www.sap.com/DXPPTypes"/></soap-env:Body></soap-env:Envelope>'
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '223'
|
||||
Content-Type:
|
||||
- text/xml; charset=utf-8
|
||||
SOAPAction:
|
||||
- '"urn:#ping"'
|
||||
User-Agent:
|
||||
- Zeep/3.3.1 (www.python-zeep.org)
|
||||
method: POST
|
||||
uri: https://dws-test.paynet.ch/DWS/DWS
|
||||
response:
|
||||
body:
|
||||
string: <env:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><dxpp:PingMsgReply
|
||||
xmlns:dxpp="http://www.sap.com/DXPPTypes"><dxpp:State>OK</dxpp:State><dxpp:Timestamp>2019-06-04T09:08:19.232Z</dxpp:Timestamp><dxpp:Version>Not
|
||||
defined</dxpp:Version></dxpp:PingMsgReply></env:Body></env:Envelope>
|
||||
headers:
|
||||
Connection:
|
||||
- close
|
||||
Content-Type:
|
||||
- text/xml;charset=UTF-8
|
||||
Date:
|
||||
- Tue, 04 Jun 2019 09:08:19 GMT
|
||||
Server:
|
||||
- Apache
|
||||
Set-Cookie:
|
||||
- JSESSIONID=DF3F45FC6896B69CC213C431EF8928C8;HttpOnly;Secure
|
||||
Vary:
|
||||
- Accept-Encoding,User-Agent
|
||||
content-length:
|
||||
- '467'
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
49
ebill_paynet/tests/fixtures/cassettes/test_takeShipment.yaml
vendored
Normal file
49
ebill_paynet/tests/fixtures/cassettes/test_takeShipment.yaml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '<?xml version=''1.0'' encoding=''utf-8''?>
|
||||
|
||||
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><ns0:ShipmentDeliveryMsg
|
||||
xmlns:ns0="http://www.sap.com/DXPPShipmentExchange"><ns1:Authorization xmlns:ns1="http://www.sap.com/DXPPTypes"><ns1:UserName>Campt.System.TEST.7318</ns1:UserName><ns1:Password>CamptSystem&19</ns1:Password></ns1:Authorization><ns2:Content
|
||||
xmlns:ns2="http://www.sap.com/DXPPTypes">YldsbmNtRjBhVzl1SUhSbGMzUT0=</ns2:Content></ns0:ShipmentDeliveryMsg></soap-env:Body></soap-env:Envelope>'
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '545'
|
||||
Content-Type:
|
||||
- text/xml; charset=utf-8
|
||||
SOAPAction:
|
||||
- '"urn:#takeShipment"'
|
||||
User-Agent:
|
||||
- Zeep/3.3.1 (www.python-zeep.org)
|
||||
method: POST
|
||||
uri: https://dws-test.paynet.ch/DWS/DWS
|
||||
response:
|
||||
body:
|
||||
string: <env:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><dsx:ShipmentDeliveryMsgReply
|
||||
xmlns:dsx="http://www.sap.com/DXPPShipmentExchange"><dxpp:ShipmentID xmlns:dxpp="http://www.sap.com/DXPPTypes">SC-00000000000019511263</dxpp:ShipmentID></dsx:ShipmentDeliveryMsgReply></env:Body></env:Envelope>
|
||||
headers:
|
||||
Connection:
|
||||
- close
|
||||
Content-Type:
|
||||
- text/xml;charset=UTF-8
|
||||
Date:
|
||||
- Tue, 04 Jun 2019 09:08:19 GMT
|
||||
Server:
|
||||
- Apache
|
||||
Set-Cookie:
|
||||
- JSESSIONID=29CF38A55C7494D78865167496557BF4;HttpOnly;Secure
|
||||
Vary:
|
||||
- Accept-Encoding,User-Agent
|
||||
content-length:
|
||||
- '475'
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
141
ebill_paynet/tests/test_ebill_paynet.py
Normal file
141
ebill_paynet/tests/test_ebill_paynet.py
Normal file
@ -0,0 +1,141 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
|
||||
import os
|
||||
|
||||
from odoo.tests.common import SingleTransactionCase
|
||||
|
||||
from ..components.api import PayNetDWS
|
||||
from .common import recorder
|
||||
|
||||
|
||||
class TestEbillPaynet(SingleTransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
|
||||
# Invoice and account should be the same company
|
||||
cls.env.user.company_id = cls.env.ref("l10n_ch.demo_company_ch").id
|
||||
|
||||
cls.bank = cls.env.ref("base.res_bank_1")
|
||||
cls.bank.clearing = 777
|
||||
cls.partner_bank = cls.env["res.partner.bank"].create(
|
||||
{
|
||||
"bank_id": cls.bank.id,
|
||||
"acc_number": "300.300.300",
|
||||
"acc_holder_name": "AccountHolderName",
|
||||
"partner_id": cls.env.user.partner_id.id,
|
||||
"l10n_ch_qr_iban": "CH21 3080 8001 2345 6782 7",
|
||||
}
|
||||
)
|
||||
|
||||
cls.paynet = cls.env["paynet.service"].create(
|
||||
{
|
||||
"name": "Paynet Test Service",
|
||||
"use_test_service": True,
|
||||
"client_pid": os.getenv("PAYNET_ID", "123456789"),
|
||||
"service_type": "b2b",
|
||||
}
|
||||
)
|
||||
cls.dws = PayNetDWS(cls.paynet.url, True)
|
||||
cls.customer = cls.env["res.partner"].create(
|
||||
{"name": "Customer One", "customer_rank": 1}
|
||||
)
|
||||
cls.contract = cls.env["ebill.payment.contract"].create(
|
||||
{
|
||||
"partner_id": cls.customer.id,
|
||||
"paynet_account_number": "123123123",
|
||||
"state": "open",
|
||||
"paynet_service_id": cls.paynet.id,
|
||||
}
|
||||
)
|
||||
cls.account = cls.env["account.account"].search(
|
||||
[
|
||||
(
|
||||
"user_type_id",
|
||||
"=",
|
||||
cls.env.ref("account.data_account_type_revenue").id,
|
||||
)
|
||||
],
|
||||
limit=1,
|
||||
)
|
||||
cls.at_receivable = cls.env["account.account.type"].create(
|
||||
{
|
||||
"name": "Test receivable account",
|
||||
"type": "receivable",
|
||||
"internal_group": "asset",
|
||||
}
|
||||
)
|
||||
cls.a_receivable = cls.env["account.account"].create(
|
||||
{
|
||||
"name": "Test receivable account",
|
||||
"code": "TEST_RA",
|
||||
"user_type_id": cls.at_receivable.id,
|
||||
"reconcile": True,
|
||||
}
|
||||
)
|
||||
cls.product = cls.env["product.template"].create(
|
||||
{"name": "Product One", "list_price": 100.00}
|
||||
)
|
||||
|
||||
cls.invoice_1 = cls.env["account.move"].create(
|
||||
{
|
||||
"partner_id": cls.customer.id,
|
||||
# 'account_id': cls.account.id,
|
||||
"move_type": "out_invoice",
|
||||
"transmit_method_id": cls.env.ref(
|
||||
"ebill_paynet.paynet_transmit_method"
|
||||
).id,
|
||||
"invoice_line_ids": [
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"account_id": cls.account.id,
|
||||
"product_id": cls.product.product_variant_ids[:1].id,
|
||||
"name": "Product 1",
|
||||
"quantity": 1.0,
|
||||
"price_unit": 100.00,
|
||||
},
|
||||
)
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
@recorder.use_cassette
|
||||
def test_ping_service(self):
|
||||
"""Check the ping service testing purpose only."""
|
||||
self.dws.service.ping()
|
||||
|
||||
@recorder.use_cassette
|
||||
def test_takeShipment(self):
|
||||
"""Check sending a file to the service."""
|
||||
ch = self.env.ref("base.ch")
|
||||
attachment = self.env["ir.attachment"].search(
|
||||
[["res_model", "=", "res.country"], ["res_id", "=", ch.id]]
|
||||
)
|
||||
attachment = self.env.ref("mass_mailing.mass_mail_attach_1")
|
||||
shipment_id = self.paynet.take_shipment(attachment[0].datas.decode())
|
||||
self.assertTrue(shipment_id.startswith("SC"))
|
||||
# The shipment is not found on the server ?
|
||||
# self.paynet.get_shipment_content(shipment_id)
|
||||
|
||||
@recorder.use_cassette
|
||||
def test_getShipmentList(self):
|
||||
"""Check getting a list of file on the service."""
|
||||
res = self.paynet.get_shipment_list()
|
||||
self.assertTrue("entriesFound" in res)
|
||||
|
||||
@recorder.use_cassette
|
||||
def test_getShipmentContent(self):
|
||||
"""Check getting the content of a file.
|
||||
|
||||
This one is CONTRL NOK
|
||||
"""
|
||||
self.invoice_1.partner_bank_id = self.partner_bank.id
|
||||
message = self.invoice_1.create_paynet_message()
|
||||
message.ic_ref = "SA000000000003"
|
||||
res = self.paynet.get_shipment_content("SC-00000000000020357011")
|
||||
self.paynet.handle_received_shipment(res, "SC-00000000000020357011")
|
||||
self.assertEqual(message.state, "error")
|
48
ebill_paynet/tests/test_invoice_message.py
Normal file
48
ebill_paynet/tests/test_invoice_message.py
Normal file
@ -0,0 +1,48 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
|
||||
from string import Template
|
||||
|
||||
from freezegun import freeze_time
|
||||
|
||||
from odoo.tools import file_open
|
||||
|
||||
from .common import CommonCase
|
||||
|
||||
|
||||
@freeze_time("2019-06-07 09:06:00")
|
||||
class TestInvoiceMessage(CommonCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
def test_icref_generation(self):
|
||||
""" """
|
||||
message = self.invoice_1.create_paynet_message()
|
||||
message.ic_ref = message._get_ic_ref()
|
||||
self.assertEqual(message.ic_ref, "SA%012d" % message.id)
|
||||
|
||||
def test_invoice(self):
|
||||
""" Check XML payload genetated for an invoice."""
|
||||
self.invoice_1.name = "INV_TEST_01"
|
||||
# self.invoice_1.action_invoice_sent()
|
||||
# TODO set a due date different to create date
|
||||
# self.invoice_1.date_due = '2019-07-01'
|
||||
self.invoice_1.state = "posted"
|
||||
message = self.invoice_1.create_paynet_message()
|
||||
message.payload = message._generate_payload()
|
||||
# Remove the PDF file data from the XML to ease testing
|
||||
lines = message.payload.splitlines()
|
||||
for pos, line in enumerate(lines):
|
||||
if line.find("Back-Pack") != -1:
|
||||
lines.pop(pos + 1)
|
||||
break
|
||||
payload = "\n".join(lines).encode("utf8")
|
||||
# self.assertXmlDocument(payload)
|
||||
# Prepare the XML file that is expected
|
||||
expected_tmpl = Template(
|
||||
file_open("ebill_paynet/tests/examples/invoice_1.xml").read()
|
||||
)
|
||||
expected = expected_tmpl.substitute(IC_REF=message.ic_ref).encode("utf8")
|
||||
self.assertFalse(self.compare_xml_line_by_line(payload, expected))
|
||||
self.assertXmlEquivalentOutputs(payload, expected)
|
47
ebill_paynet/tests/test_invoice_message_b2b.py
Normal file
47
ebill_paynet/tests/test_invoice_message_b2b.py
Normal file
@ -0,0 +1,47 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
|
||||
from string import Template
|
||||
|
||||
from freezegun import freeze_time
|
||||
|
||||
from odoo.tools import file_open
|
||||
|
||||
from .common import CommonCase
|
||||
|
||||
|
||||
@freeze_time("2019-06-21 09:06:00")
|
||||
class TestInvoiceMessage(CommonCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
|
||||
def test_invoice(self):
|
||||
""" Check XML payload genetated for an invoice."""
|
||||
self.invoice.name = "INV_TEST_01"
|
||||
self.invoice.invoice_date_due = "2019-07-01"
|
||||
message = self.invoice.create_paynet_message()
|
||||
message.payload = message._generate_payload()
|
||||
# Remove the PDF file data from the XML to ease testing
|
||||
lines = message.payload.splitlines()
|
||||
for pos, line in enumerate(lines):
|
||||
if line.find("Back-Pack") != -1:
|
||||
lines.pop(pos)
|
||||
break
|
||||
payload = "\n".join(lines).encode("utf8")
|
||||
self.assertXmlDocument(payload)
|
||||
# Prepare the XML file that is expected
|
||||
expected_tmpl = Template(
|
||||
file_open("ebill_paynet/tests/examples/invoice_b2b.xml").read()
|
||||
)
|
||||
expected = expected_tmpl.substitute(IC_REF=message.ic_ref).encode("utf8")
|
||||
# Remove the comments in the expected xml
|
||||
expected_nocomment = [
|
||||
line
|
||||
for line in expected.split(b"\n")
|
||||
if not line.lstrip().startswith(b"<!--")
|
||||
]
|
||||
expected_nocomment = b"\n".join(expected_nocomment)
|
||||
self.assertFalse(self.compare_xml_line_by_line(payload, expected_nocomment))
|
||||
# self.assertXmlEquivalentOutputs(payload, expected_nocomment)
|
30
ebill_paynet/views/ebill_payment_contract.xml
Normal file
30
ebill_paynet/views/ebill_payment_contract.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="ebill_payment_contract_form_view">
|
||||
<field name="name">ebill.payment.contract.form (in ebill_panyet)</field>
|
||||
<field name="model">ebill.payment.contract</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="base_ebill_payment_contract.ebill_payment_contract_form_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="main" position="after">
|
||||
<group name="paynet" position="after">
|
||||
<field
|
||||
name="paynet_service_id"
|
||||
attrs="{'invisible': [('is_paynet_contract', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="paynet_account_number"
|
||||
attrs="{'invisible': [('is_paynet_contract', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="payment_type"
|
||||
attrs="{'invisible': [('is_paynet_contract', '=', False)]}"
|
||||
/>
|
||||
<field name="is_paynet_contract" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
8
ebill_paynet/views/message_template.xml
Normal file
8
ebill_paynet/views/message_template.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template id="dws_reject_invoice">
|
||||
<div>
|
||||
<p>The Paynet system rejected the eBill that was send.</p>
|
||||
</div>
|
||||
</template>
|
||||
</odoo>
|
53
ebill_paynet/views/paynet_invoice_message.xml
Normal file
53
ebill_paynet/views/paynet_invoice_message.xml
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="paynet_invoice_message_form_view">
|
||||
<field name="name">paynet.invoice.message.form</field>
|
||||
<field name="model">paynet.invoice.message</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
</header>
|
||||
<sheet>
|
||||
<button type="object" name="send_to_paynet">Resend</button>
|
||||
<group>
|
||||
<field name="service_id" />
|
||||
<field name="invoice_id" />
|
||||
<field name="state" />
|
||||
<field name="ic_ref" />
|
||||
<field name="response" />
|
||||
<field name="shipment_id" />
|
||||
<field name="payload" />
|
||||
<field name="attachment_id" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="paynet_invoice_message_search_view">
|
||||
<field name="name">paynet.invoice.message.search</field>
|
||||
<field name="model">paynet.invoice.message</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<filter
|
||||
name="in_error"
|
||||
string="In Error"
|
||||
domain="[('state', '=', 'error')]"
|
||||
/>
|
||||
<field name="state" />
|
||||
<field name="invoice_id" />
|
||||
<field name="shipment_id" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="paynet_invoice_message_tree_view">
|
||||
<field name="name">paynet.invoice.message.tree</field>
|
||||
<field name="model">paynet.invoice.message</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree create="false">
|
||||
<field name="invoice_id" />
|
||||
<field name="state" />
|
||||
<field name="shipment_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
134
ebill_paynet/views/paynet_service.xml
Normal file
134
ebill_paynet/views/paynet_service.xml
Normal file
@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="message_from_service" model="ir.actions.act_window">
|
||||
<field name="name">Paynet Messages</field>
|
||||
<field name="res_model">paynet.invoice.message</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="domain">[('service_id', '=', active_id)]</field>
|
||||
<field name="context">{'default_service_id': active_id}</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<record id="contract_for_service" model="ir.actions.act_window">
|
||||
<field name="name">Paynet Contracts</field>
|
||||
<field name="res_model">ebill.payment.contract</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="domain">[('paynet_service_id', '=', active_id)]</field>
|
||||
<field name="context">{'default_paynet_service_id': active_id}</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="paynet_service_form_view">
|
||||
<field name="name">paynet.service.form</field>
|
||||
<field name="model">paynet.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
type="object"
|
||||
name="test_ping"
|
||||
string="Test connection"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
name="check_shipments"
|
||||
string="Check for shipments"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="%(contract_for_service)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
icon="fa-handshake-o"
|
||||
>
|
||||
Contracts
|
||||
</button>
|
||||
<button
|
||||
name="%(message_from_service)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
icon="fa-envelope-o"
|
||||
>
|
||||
Messages
|
||||
</button>
|
||||
<button
|
||||
name="toggle_active"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-archive"
|
||||
>
|
||||
<field
|
||||
name="active"
|
||||
widget="boolean_button"
|
||||
options="{"terminology": "disabled"}"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h2>
|
||||
<field name="name" class="oe_inline" />
|
||||
</h2>
|
||||
<group>
|
||||
<group>
|
||||
<field name="url" />
|
||||
<field name="service_type" />
|
||||
<field name="use_test_service" />
|
||||
<field name="client_pid" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="username" />
|
||||
<field name="password" />
|
||||
<field
|
||||
name="partner_bank_id"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="paynet_service_search_view">
|
||||
<field name="name">paynet.service.search</field>
|
||||
<field name="model">paynet.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="partner_bank_id"/>
|
||||
<filter
|
||||
name="all_service"
|
||||
string="All"
|
||||
domain="['|', ('active', '=', True), ('active', '=', False)]"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="paynet_service_tree_view">
|
||||
<field name="name">paynet.service.tree</field>
|
||||
<field name="model">paynet.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="use_test_service" />
|
||||
<field name="url" />
|
||||
<field name="client_pid" />
|
||||
<field name="active" invisible="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="paynet_service_act_window">
|
||||
<field name="name">Paynet Service</field>
|
||||
<field name="res_model">paynet.service</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{'search_default_all_service': 1}</field>
|
||||
</record>
|
||||
<record model="ir.ui.menu" id="paynet_service_config_menu">
|
||||
<field name="name">Paynet Service</field>
|
||||
<field name="parent_id" ref="account.root_payment_menu" />
|
||||
<field name="action" ref="paynet_service_act_window" />
|
||||
<field name="sequence" eval="16" />
|
||||
</record>
|
||||
</odoo>
|
94
l10n_ch_account_tags/README.rst
Normal file
94
l10n_ch_account_tags/README.rst
Normal file
@ -0,0 +1,94 @@
|
||||
========================
|
||||
Switzerland Account Tags
|
||||
========================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! 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%2Fl10n--switzerland-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/l10n-switzerland/tree/13.0/l10n_ch_account_tags
|
||||
:alt: OCA/l10n-switzerland
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/l10n-switzerland-13-0/l10n-switzerland-13-0-l10n_ch_account_tags
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/125/13.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module adds tags and the account templates for the Switzerland chart of accounts
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need to:
|
||||
|
||||
1. Install this module
|
||||
|
||||
Changelog
|
||||
=========
|
||||
|
||||
13.0.1.0.0 (30.09.2019)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Migration to version 13.0
|
||||
|
||||
11.0.1.0.0 (05.07.2018)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Adding the module
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/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/l10n-switzerland/issues/new?body=module:%20l10n_ch_account_tags%0Aversion:%2013.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 SA
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Panarin Mykhailo <m.panarin@mobilunity.com>
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||
|
||||
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/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/13.0/l10n_ch_account_tags>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
0
l10n_ch_account_tags/__init__.py
Normal file
0
l10n_ch_account_tags/__init__.py
Normal file
18
l10n_ch_account_tags/__manifest__.py
Normal file
18
l10n_ch_account_tags/__manifest__.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||
|
||||
{
|
||||
"name": "Switzerland Account Tags",
|
||||
"category": "Localisation",
|
||||
"summary": "",
|
||||
"version": "14.0.1.0.1",
|
||||
"author": "Camptocamp SA, Odoo Community Association (OCA),2BIT GmbH",
|
||||
"website": "https://github.com/OCA/l10n-switzerland",
|
||||
"license": "AGPL-3",
|
||||
"depends": ["l10n_ch"],
|
||||
"data": [
|
||||
"data/new/account.account.tag.csv",
|
||||
"data/new/account.account.template.csv",
|
||||
"data/update/account.account.template.csv",
|
||||
],
|
||||
}
|
34
l10n_ch_account_tags/data/new/account.account.tag.csv
Normal file
34
l10n_ch_account_tags/data/new/account.account.tag.csv
Normal file
@ -0,0 +1,34 @@
|
||||
id,name,applicability,color
|
||||
account_tag_ch_60,Autres charges d‘exploitation (CH_60),accounts,4
|
||||
account_tag_ch_280,Capital social ou capital de fondation (CH_280),accounts,4
|
||||
account_tag_ch_68,Amortissements sur immobilisations corporelles (CH_68),accounts,4
|
||||
account_tag_ch_69,Résultat financier (CH_69),accounts,4
|
||||
account_tag_ch_180,Capital non versé : capital social - capital de fondation (CH_180),accounts,4
|
||||
account_tag_ch_148,Participations (CH_148),accounts,4
|
||||
account_tag_ch_220,Autres dettes à court terme (CH_220),accounts,4
|
||||
account_tag_ch_160,Immobilisations corporelles immeubles CH_160),accounts,4
|
||||
account_tag_ch_140,Immobilisations financières (CH_140),accounts,4
|
||||
account_tag_ch_89,Impôts directs (CH_89),accounts,4
|
||||
account_tag_ch_150,Immobilisations corporelles meubles (CH_150),accounts,4
|
||||
account_tag_ch_130,Actifs de régularisation (transitoires) (CH_130),accounts,4
|
||||
account_tag_ch_80,Résultat hors-exploitation (CH_80),accounts,4
|
||||
account_tag_ch_210,Dettes à court terme rémunérés (CH_210),accounts,4
|
||||
account_tag_ch_114,Autres créances à court terme (CH_114),accounts,4
|
||||
account_tag_ch_85,Résultat extraordinaires (CH_85),accounts,4
|
||||
account_tag_ch_110,Créances résultant de livraisons et prestations (CH_110),accounts,4
|
||||
account_tag_ch_297,Résultat de l'exercice (CH_297),accounts,4
|
||||
account_tag_ch_290,Réserves / bénéfices et pertes reportés (CH_290),accounts,4
|
||||
account_tag_ch_170,Immobilisations incorporelles (CH_170),accounts,4
|
||||
account_tag_ch_230,Passifs de régularisation (transitoires) et provisions à court terme (CH_230),accounts,4
|
||||
account_tag_ch_7,Résultat des activités annexes d'exploitation (CH_7),accounts,4
|
||||
account_tag_ch_5,Charges de personnel (CH_5),accounts,4
|
||||
account_tag_ch_4,Charges de marchandises et de matériel (CH_4),accounts,4
|
||||
account_tag_ch_200,Dettes à court terme résultant d’achats et de prestations de services (CH_200),accounts,4
|
||||
account_tag_ch_260,Provisions à long termes et provisions légales (CH_260),accounts,4
|
||||
account_tag_ch_120,Stocks et prestations non facturées (CH_120),accounts,4
|
||||
account_tag_ch_100,Trésorerie (CH_100),accounts,4
|
||||
account_tag_ch_106,Actifs à court terme cotés en bourse (CH_106),accounts,4
|
||||
account_tag_ch_240,Dettes à long terme rémunérées (CH_240),accounts,4
|
||||
account_tag_ch_39,Variation des stocks (CH_39),accounts,4
|
||||
account_tag_ch_250,Autres dettes à long terme (CH_250),accounts,4
|
||||
account_tag_ch_30,Chiffre d'affaires (CH_30),accounts,4
|
|
@ -0,0 +1,2 @@
|
||||
id,name,code,tag_ids/id,user_type_id/id
|
||||
1_transfer_account_id,Transfer,1090,account_tag_ch_106,account.data_account_type_current_assets
|
|
168
l10n_ch_account_tags/data/update/account.account.template.csv
Normal file
168
l10n_ch_account_tags/data/update/account.account.template.csv
Normal file
@ -0,0 +1,168 @@
|
||||
id,tag_ids/id
|
||||
l10n_ch.ch_coa_1060,account_tag_ch_106
|
||||
l10n_ch.ch_coa_1069,account_tag_ch_106
|
||||
l10n_ch.ch_coa_1091,account_tag_ch_106
|
||||
l10n_ch.ch_coa_1099,account_tag_ch_106
|
||||
l10n_ch.ch_coa_1100,account_tag_ch_110
|
||||
l10n_ch.ch_coa_1109,account_tag_ch_110
|
||||
l10n_ch.ch_coa_1140,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1149,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1170,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1171,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1176,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1180,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1189,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1190,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1199,account_tag_ch_114
|
||||
l10n_ch.ch_coa_1200,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1207,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1208,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1209,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1210,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1217,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1218,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1219,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1220,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1230,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1250,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1260,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1267,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1269,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1270,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1277,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1279,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1280,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1287,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1289,account_tag_ch_120
|
||||
l10n_ch.ch_coa_1300,account_tag_ch_130
|
||||
l10n_ch.ch_coa_1301,account_tag_ch_130
|
||||
l10n_ch.ch_coa_1400,account_tag_ch_140
|
||||
l10n_ch.ch_coa_1409,account_tag_ch_140
|
||||
l10n_ch.ch_coa_1440,account_tag_ch_140
|
||||
l10n_ch.ch_coa_1441,account_tag_ch_140
|
||||
l10n_ch.ch_coa_1449,account_tag_ch_140
|
||||
l10n_ch.ch_coa_1480,account_tag_ch_148
|
||||
l10n_ch.ch_coa_1489,account_tag_ch_148
|
||||
l10n_ch.ch_coa_1500,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1509,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1510,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1519,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1520,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1529,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1530,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1539,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1540,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1549,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1550,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1559,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1570,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1579,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1590,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1599,account_tag_ch_150
|
||||
l10n_ch.ch_coa_1600,account_tag_ch_160
|
||||
l10n_ch.ch_coa_1609,account_tag_ch_160
|
||||
l10n_ch.ch_coa_1700,account_tag_ch_170
|
||||
l10n_ch.ch_coa_1709,account_tag_ch_170
|
||||
l10n_ch.ch_coa_1770,account_tag_ch_170
|
||||
l10n_ch.ch_coa_1779,account_tag_ch_170
|
||||
l10n_ch.ch_coa_1850,account_tag_ch_180
|
||||
l10n_ch.ch_coa_2000,account_tag_ch_200
|
||||
l10n_ch.ch_coa_2030,account_tag_ch_200
|
||||
l10n_ch.ch_coa_2100,account_tag_ch_210
|
||||
l10n_ch.ch_coa_2120,account_tag_ch_210
|
||||
l10n_ch.ch_coa_2140,account_tag_ch_210
|
||||
l10n_ch.ch_coa_2160,account_tag_ch_210
|
||||
l10n_ch.ch_coa_2200,account_tag_ch_220
|
||||
l10n_ch.ch_coa_2201,account_tag_ch_220
|
||||
l10n_ch.ch_coa_2206,account_tag_ch_220
|
||||
l10n_ch.ch_coa_2208,account_tag_ch_220
|
||||
l10n_ch.ch_coa_2210,account_tag_ch_220
|
||||
l10n_ch.ch_coa_2261,account_tag_ch_220
|
||||
l10n_ch.ch_coa_2270,account_tag_ch_220
|
||||
l10n_ch.ch_coa_2279,account_tag_ch_220
|
||||
l10n_ch.ch_coa_2300,account_tag_ch_230
|
||||
l10n_ch.ch_coa_2301,account_tag_ch_230
|
||||
l10n_ch.ch_coa_2330,account_tag_ch_230
|
||||
l10n_ch.ch_coa_2400,account_tag_ch_240
|
||||
l10n_ch.ch_coa_2420,account_tag_ch_240
|
||||
l10n_ch.ch_coa_2430,account_tag_ch_240
|
||||
l10n_ch.ch_coa_2450,account_tag_ch_240
|
||||
l10n_ch.ch_coa_2451,account_tag_ch_240
|
||||
l10n_ch.ch_coa_2500,account_tag_ch_250
|
||||
l10n_ch.ch_coa_2600,account_tag_ch_260
|
||||
l10n_ch.ch_coa_2800,account_tag_ch_280
|
||||
l10n_ch.ch_coa_2900,account_tag_ch_290
|
||||
l10n_ch.ch_coa_2940,account_tag_ch_290
|
||||
l10n_ch.ch_coa_2950,account_tag_ch_290
|
||||
l10n_ch.ch_coa_2960,account_tag_ch_290
|
||||
l10n_ch.ch_coa_2970,account_tag_ch_290
|
||||
l10n_ch.ch_coa_2979,account_tag_ch_297
|
||||
l10n_ch.ch_coa_2980,account_tag_ch_290
|
||||
l10n_ch.ch_coa_3000,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3009,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3200,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3400,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3600,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3700,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3710,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3800,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3801,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3802,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3803,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3804,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3805,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3806,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3807,account_tag_ch_30
|
||||
l10n_ch.ch_coa_3900,account_tag_ch_39
|
||||
l10n_ch.ch_coa_3901,account_tag_ch_39
|
||||
l10n_ch.ch_coa_3940,account_tag_ch_39
|
||||
l10n_ch.ch_coa_4000,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4008,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4009,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4070,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4071,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4072,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4080,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4086,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4092,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4200,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4400,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4500,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4510,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4520,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4521,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4530,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4540,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4800,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4801,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4900,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4901,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4903,account_tag_ch_4
|
||||
l10n_ch.ch_coa_4906,account_tag_ch_4
|
||||
l10n_ch.ch_coa_5000,account_tag_ch_5
|
||||
l10n_ch.ch_coa_5700,account_tag_ch_5
|
||||
l10n_ch.ch_coa_5800,account_tag_ch_5
|
||||
l10n_ch.ch_coa_5900,account_tag_ch_5
|
||||
l10n_ch.ch_coa_6000,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6100,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6105,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6200,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6260,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6300,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6400,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6500,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6570,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6600,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6700,account_tag_ch_60
|
||||
l10n_ch.ch_coa_6800,account_tag_ch_68
|
||||
l10n_ch.ch_coa_6900,account_tag_ch_69
|
||||
l10n_ch.ch_coa_6950,account_tag_ch_69
|
||||
l10n_ch.ch_coa_7000,account_tag_ch_7
|
||||
l10n_ch.ch_coa_7010,account_tag_ch_7
|
||||
l10n_ch.ch_coa_7500,account_tag_ch_7
|
||||
l10n_ch.ch_coa_7510,account_tag_ch_7
|
||||
l10n_ch.ch_coa_8000,account_tag_ch_80
|
||||
l10n_ch.ch_coa_8100,account_tag_ch_80
|
||||
l10n_ch.ch_coa_8500,account_tag_ch_85
|
||||
l10n_ch.ch_coa_8510,account_tag_ch_85
|
||||
l10n_ch.ch_coa_8900,account_tag_ch_89
|
|
188
l10n_ch_account_tags/i18n/de.po
Normal file
188
l10n_ch_account_tags/i18n/de.po
Normal file
@ -0,0 +1,188 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_ch_account_tags
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: de\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"
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_130
|
||||
msgid "Actifs de régularisation (transitoires) (CH_130)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_106
|
||||
msgid "Actifs à court terme cotés en bourse (CH_106)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_68
|
||||
msgid "Amortissements sur immobilisations corporelles (CH_68)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_60
|
||||
msgid "Autres charges d‘exploitation (CH_60)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_114
|
||||
msgid "Autres créances à court terme (CH_114)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_220
|
||||
msgid "Autres dettes à court terme (CH_220)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_250
|
||||
msgid "Autres dettes à long terme (CH_250)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_180
|
||||
msgid "Capital non versé : capital social - capital de fondation (CH_180)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_280
|
||||
msgid "Capital social ou capital de fondation (CH_280)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_4
|
||||
msgid "Charges de marchandises et de matériel (CH_4)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_5
|
||||
msgid "Charges de personnel (CH_5)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_30
|
||||
msgid "Chiffre d'affaires (CH_30)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_110
|
||||
msgid "Créances résultant de livraisons et prestations (CH_110)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_210
|
||||
msgid "Dettes à court terme rémunérés (CH_210)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_200
|
||||
msgid ""
|
||||
"Dettes à court terme résultant d’achats et de prestations de services "
|
||||
"(CH_200)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_240
|
||||
msgid "Dettes à long terme rémunérées (CH_240)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_160
|
||||
msgid "Immobilisations corporelles immeubles CH_160)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_150
|
||||
msgid "Immobilisations corporelles meubles (CH_150)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_140
|
||||
msgid "Immobilisations financières (CH_140)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_170
|
||||
msgid "Immobilisations incorporelles (CH_170)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_89
|
||||
msgid "Impôts directs (CH_89)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_148
|
||||
msgid "Participations (CH_148)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_230
|
||||
msgid ""
|
||||
"Passifs de régularisation (transitoires) et provisions à court terme (CH_230)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_260
|
||||
msgid "Provisions à long termes et provisions légales (CH_260)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_290
|
||||
msgid "Réserves / bénéfices et pertes reportés (CH_290)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_297
|
||||
msgid "Résultat de l'exercice (CH_297)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_7
|
||||
msgid "Résultat des activités annexes d'exploitation (CH_7)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_85
|
||||
msgid "Résultat extraordinaires (CH_85)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_69
|
||||
msgid "Résultat financier (CH_69)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_80
|
||||
msgid "Résultat hors-exploitation (CH_80)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_120
|
||||
msgid "Stocks et prestations non facturées (CH_120)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.template,name:l10n_ch_account_tags.1_transfer_account_id
|
||||
msgid "Transfer"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_100
|
||||
msgid "Trésorerie (CH_100)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_39
|
||||
msgid "Variation des stocks (CH_39)"
|
||||
msgstr ""
|
188
l10n_ch_account_tags/i18n/l10n_ch_account_tags.pot
Normal file
188
l10n_ch_account_tags/i18n/l10n_ch_account_tags.pot
Normal file
@ -0,0 +1,188 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_ch_account_tags
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.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: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_130
|
||||
msgid "Actifs de régularisation (transitoires) (CH_130)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_106
|
||||
msgid "Actifs à court terme cotés en bourse (CH_106)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_68
|
||||
msgid "Amortissements sur immobilisations corporelles (CH_68)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_60
|
||||
msgid "Autres charges d‘exploitation (CH_60)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_114
|
||||
msgid "Autres créances à court terme (CH_114)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_220
|
||||
msgid "Autres dettes à court terme (CH_220)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_250
|
||||
msgid "Autres dettes à long terme (CH_250)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_180
|
||||
msgid "Capital non versé : capital social - capital de fondation (CH_180)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_280
|
||||
msgid "Capital social ou capital de fondation (CH_280)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_4
|
||||
msgid "Charges de marchandises et de matériel (CH_4)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_5
|
||||
msgid "Charges de personnel (CH_5)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_30
|
||||
msgid "Chiffre d'affaires (CH_30)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_110
|
||||
msgid "Créances résultant de livraisons et prestations (CH_110)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_210
|
||||
msgid "Dettes à court terme rémunérés (CH_210)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_200
|
||||
msgid ""
|
||||
"Dettes à court terme résultant d’achats et de prestations de services "
|
||||
"(CH_200)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_240
|
||||
msgid "Dettes à long terme rémunérées (CH_240)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_160
|
||||
msgid "Immobilisations corporelles immeubles CH_160)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_150
|
||||
msgid "Immobilisations corporelles meubles (CH_150)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_140
|
||||
msgid "Immobilisations financières (CH_140)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_170
|
||||
msgid "Immobilisations incorporelles (CH_170)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_89
|
||||
msgid "Impôts directs (CH_89)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_148
|
||||
msgid "Participations (CH_148)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_230
|
||||
msgid ""
|
||||
"Passifs de régularisation (transitoires) et provisions à court terme "
|
||||
"(CH_230)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_260
|
||||
msgid "Provisions à long termes et provisions légales (CH_260)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_290
|
||||
msgid "Réserves / bénéfices et pertes reportés (CH_290)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_297
|
||||
msgid "Résultat de l'exercice (CH_297)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_7
|
||||
msgid "Résultat des activités annexes d'exploitation (CH_7)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_85
|
||||
msgid "Résultat extraordinaires (CH_85)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_69
|
||||
msgid "Résultat financier (CH_69)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_80
|
||||
msgid "Résultat hors-exploitation (CH_80)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_120
|
||||
msgid "Stocks et prestations non facturées (CH_120)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.template,name:l10n_ch_account_tags.1_transfer_account_id
|
||||
msgid "Transfer"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_100
|
||||
msgid "Trésorerie (CH_100)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_account_tags
|
||||
#: model:account.account.tag,name:l10n_ch_account_tags.account_tag_ch_39
|
||||
msgid "Variation des stocks (CH_39)"
|
||||
msgstr ""
|
2
l10n_ch_account_tags/readme/CONTRIBUTORS.rst
Normal file
2
l10n_ch_account_tags/readme/CONTRIBUTORS.rst
Normal file
@ -0,0 +1,2 @@
|
||||
* Panarin Mykhailo <m.panarin@mobilunity.com>
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
1
l10n_ch_account_tags/readme/DESCRIPTION.rst
Normal file
1
l10n_ch_account_tags/readme/DESCRIPTION.rst
Normal file
@ -0,0 +1 @@
|
||||
This module adds tags and the account templates for the Switzerland chart of accounts
|
13
l10n_ch_account_tags/readme/HISTORY.rst
Normal file
13
l10n_ch_account_tags/readme/HISTORY.rst
Normal file
@ -0,0 +1,13 @@
|
||||
14.0.1.0.0 (28.06.2021)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Migration to version 14.0
|
||||
13.0.1.0.0 (30.09.2019)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Migration to version 13.0
|
||||
|
||||
11.0.1.0.0 (05.07.2018)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Adding the module
|
0
l10n_ch_account_tags/readme/ROADMAP.rst
Normal file
0
l10n_ch_account_tags/readme/ROADMAP.rst
Normal file
3
l10n_ch_account_tags/readme/USAGE.rst
Normal file
3
l10n_ch_account_tags/readme/USAGE.rst
Normal file
@ -0,0 +1,3 @@
|
||||
To use this module, you need to:
|
||||
|
||||
1. Install this module
|
BIN
l10n_ch_account_tags/static/description/icon.png
Normal file
BIN
l10n_ch_account_tags/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
450
l10n_ch_account_tags/static/description/index.html
Normal file
450
l10n_ch_account_tags/static/description/index.html
Normal file
@ -0,0 +1,450 @@
|
||||
<?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>Switzerland Account Tags</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="switzerland-account-tags">
|
||||
<h1 class="title">Switzerland Account Tags</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/l10n-switzerland/tree/13.0/l10n_ch_account_tags"><img alt="OCA/l10n-switzerland" src="https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-switzerland-13-0/l10n-switzerland-13-0-l10n_ch_account_tags"><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/125/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module adds tags and the account templates for the Switzerland chart of accounts</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="id3">Usage</a></li>
|
||||
<li><a class="reference internal" href="#changelog" id="id4">Changelog</a><ul>
|
||||
<li><a class="reference internal" href="#id1" id="id5">13.0.1.0.0 (30.09.2019)</a></li>
|
||||
<li><a class="reference internal" href="#id2" id="id6">11.0.1.0.0 (05.07.2018)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id7">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id8">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id9">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id10">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id11">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id3">Usage</a></h1>
|
||||
<p>To use this module, you need to:</p>
|
||||
<blockquote>
|
||||
<ol class="arabic simple">
|
||||
<li>Install this module</li>
|
||||
</ol>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="section" id="changelog">
|
||||
<h1><a class="toc-backref" href="#id4">Changelog</a></h1>
|
||||
<div class="section" id="id1">
|
||||
<h2><a class="toc-backref" href="#id5">13.0.1.0.0 (30.09.2019)</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Migration to version 13.0</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id2">
|
||||
<h2><a class="toc-backref" href="#id6">11.0.1.0.0 (05.07.2018)</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Adding the module</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id7">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-switzerland/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/l10n-switzerland/issues/new?body=module:%20l10n_ch_account_tags%0Aversion:%2013.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="#id8">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id9">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Camptocamp SA</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id10">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Panarin Mykhailo <<a class="reference external" href="mailto:m.panarin@mobilunity.com">m.panarin@mobilunity.com</a>></li>
|
||||
<li>Yannick Vaucher <<a class="reference external" href="mailto:yannick.vaucher@camptocamp.com">yannick.vaucher@camptocamp.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id11">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/l10n-switzerland/tree/13.0/l10n_ch_account_tags">OCA/l10n-switzerland</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>
|
122
l10n_ch_base_bank/README.rst
Normal file
122
l10n_ch_base_bank/README.rst
Normal file
@ -0,0 +1,122 @@
|
||||
=======================
|
||||
Switzerland - Bank type
|
||||
=======================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! 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%2Fl10n--switzerland-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/l10n-switzerland/tree/14.0/l10n_ch_base_bank
|
||||
:alt: OCA/l10n-switzerland
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/l10n-switzerland-14-0/l10n-switzerland-14-0-l10n_ch_base_bank
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/125/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This addon extend the features of l10n_ch.
|
||||
|
||||
Most of the former features have been moved in l10n_ch module.
|
||||
|
||||
|
||||
Features:
|
||||
|
||||
Improve UX with onchanges:
|
||||
|
||||
- automatically set bank based on clearing part of IBAN
|
||||
- allow direct entry of l10n_ch_postal which will fill acc_number
|
||||
- search invoices by ISR, with or without spaces
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
In partner bank account the type will be discovered automatically.
|
||||
|
||||
* For IBAN accounts fill account number with IBAN.
|
||||
* if the IBAN is an IBAN from PostFinance it will fill the Postal account number
|
||||
* For Postal accounts:
|
||||
* fill the account number with a postal account number 9 digits format (e.g. 10-8060-7).
|
||||
* or fill the "Swiss postal account" with a postal account number 9 digits format (e.g. 10-8060-7).
|
||||
|
||||
Entering a postal number of 9 digits will auto-complete the bank with PostFinance. (You might create it if you haven't installed `l10n_ch_bank`)
|
||||
|
||||
* For ISR subscription numbers (postal account starting with 01 or 03):
|
||||
* fill the account number with a postal account number 9 digits format (e.g. 01-23456-1).
|
||||
* or fill the "Swiss postal account" with a postal account number 9 digits format (e.g. 01-23456-1).
|
||||
|
||||
It will automatically change the content of account number by adding "ISR" and the partner name to avoid
|
||||
duplicates with partner using the same ISR subscription number owned by a bank (ISR-B).
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/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/l10n-switzerland/issues/new?body=module:%20l10n_ch_base_bank%0Aversion:%2014.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
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Nicolas Bessi (Camptocamp)
|
||||
* Vincent Renaville <vincent.renaville@camptocamp.com>
|
||||
* Joël Grand-Guillaume <joel.grandguillaume@camptocamp.com>
|
||||
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||
* Paul Catinean <paulcatinean@gmail.com>
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||
* Akim Juillerat <akim.juillerat@camptocamp.com>
|
||||
* Iryna Vyshnevska <i.vyshnevska@mobilunity.com>
|
||||
* Simone Vanin <simone.vanin@agilebg.com>
|
||||
|
||||
Other credits
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
|
||||
* Hasa SA
|
||||
* Open Net SA
|
||||
* Prisme Solutions Informatique SA
|
||||
* Quod SA
|
||||
|
||||
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/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/14.0/l10n_ch_base_bank>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
2
l10n_ch_base_bank/__init__.py
Normal file
2
l10n_ch_base_bank/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
from . import models
|
||||
from . import postfinance
|
16
l10n_ch_base_bank/__manifest__.py
Normal file
16
l10n_ch_base_bank/__manifest__.py
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright 2012-2019 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Switzerland - Bank type",
|
||||
"summary": "Types and number validation for swiss electronic pmnt. DTA, ESR",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "Camptocamp,Odoo Community Association (OCA)",
|
||||
"category": "Localization",
|
||||
"website": "https://github.com/OCA/l10n-switzerland",
|
||||
"license": "AGPL-3",
|
||||
"depends": ["base_iban", "l10n_ch"],
|
||||
"data": ["views/bank.xml"],
|
||||
"auto_install": False,
|
||||
"installable": True,
|
||||
}
|
139
l10n_ch_base_bank/i18n/de.po
Normal file
139
l10n_ch_base_bank/i18n/de.po
Normal file
@ -0,0 +1,139 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_ch_base_bank
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-12-16 06:26+0000\n"
|
||||
"PO-Revision-Date: 2018-11-24 20:10+0000\n"
|
||||
"Last-Translator: chrispi-ch <chris@okc.ch>\n"
|
||||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
|
||||
"Language: de\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 3.2.2\n"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_res_bank
|
||||
msgid "Bank"
|
||||
msgstr "Bank"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_res_partner_bank
|
||||
msgid "Bank Accounts"
|
||||
msgstr "Bankkonten"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num
|
||||
msgid "Bank ISR adherent number"
|
||||
msgstr "ESR-Teilnehmernummer der Bank"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:248
|
||||
#, python-format
|
||||
msgid "Bank/CCP Undefined"
|
||||
msgstr "Bank/Postkonto nicht definiert"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:246
|
||||
#, python-format
|
||||
msgid "Bank/CCP {}"
|
||||
msgstr "Bank/Postkonto {}"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.ui.view,arch_db:l10n_ch_base_bank.view_bank_search
|
||||
msgid "Banks"
|
||||
msgstr "Banken"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_ccp
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_ccp
|
||||
msgid "CCP/CP-Konto"
|
||||
msgstr "Postkonto"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_ccp
|
||||
msgid "CCP/CP-Konto of the bank"
|
||||
msgstr "Postkonto der Bank"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_clearing
|
||||
msgid "Clearing number"
|
||||
msgstr "Clearingnummer"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_code
|
||||
msgid "Code"
|
||||
msgstr "Code"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_country_code
|
||||
msgid "Country code"
|
||||
msgstr "Ländercode"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_code
|
||||
msgid "Internal reference"
|
||||
msgstr "Interne Referenz"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_account_invoice
|
||||
msgid "Invoice"
|
||||
msgstr "Rechnung"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:115
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:233
|
||||
#, python-format
|
||||
msgid "Please enter a correct postal number. (01-23456-1 or 12345)"
|
||||
msgstr ""
|
||||
"Bitte geben Sie eine korrekte Postkonto-Nummer ein (01-23456-1 oder 12345)"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.ui.view,arch_db:l10n_ch_base_bank.view_bank_search
|
||||
msgid "PostFinance"
|
||||
msgstr "PostFinance"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_clearing
|
||||
msgid "Swiss unique bank identifier also used in IBAN number"
|
||||
msgstr "Instituts-Identifikation (IID; früher Clearingnummer)"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_country_code
|
||||
msgid ""
|
||||
"The ISO country code in two chars. \n"
|
||||
"You can use this field for quick search."
|
||||
msgstr ""
|
||||
"Der zweistellige ISO Ländercode. \n"
|
||||
"Sie können dieses Feld für die Schnellsuche verwenden."
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: sql_constraint:res.partner.bank:0
|
||||
msgid "The ISR adherent number must be unique !"
|
||||
msgstr "Die zugehörige ESR-Nummer muss eindeutig sein!"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num
|
||||
msgid ""
|
||||
"Your Bank adherent number to be printed in references of your ISR. This "
|
||||
"is not a postal account number."
|
||||
msgstr ""
|
||||
"Die ESR-Teilnehmernummer, welche in der Codierzeile des Einzahlungsscheins "
|
||||
"gedruckt wird. Hinweis: Dies ist kein Postkonto."
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:220
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Your bank ISR adherent number must contain only digits!\n"
|
||||
"Please check your company bank account."
|
||||
msgstr ""
|
||||
"Die ESR-Teilnehmernummer Ihrer Bank darf nur Ziffern enthalten.\n"
|
||||
"Bitte überprüfen Sie das Bankkonto Ihres Unternehmens."
|
140
l10n_ch_base_bank/i18n/fr.po
Normal file
140
l10n_ch_base_bank/i18n/fr.po
Normal file
@ -0,0 +1,140 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_ch_base_bank
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
# Yannick Vaucher <yannick.vaucher@camptocamp.com>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-16 07:11+0000\n"
|
||||
"PO-Revision-Date: 2019-08-14 09:44+0000\n"
|
||||
"Last-Translator: Valaeys Stéphane <svalaeys@fiefmanage.ch>\n"
|
||||
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
|
||||
"Language: fr\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 3.7.1\n"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_res_bank
|
||||
msgid "Bank"
|
||||
msgstr "Banque"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_res_partner_bank
|
||||
msgid "Bank Accounts"
|
||||
msgstr "Comptes bancaires"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num
|
||||
msgid "Bank ISR adherent number"
|
||||
msgstr "Numéro d'adhérent BVR"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:248
|
||||
#, python-format
|
||||
msgid "Bank/CCP Undefined"
|
||||
msgstr "Banque / CCP indéfini"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:246
|
||||
#, python-format
|
||||
msgid "Bank/CCP {}"
|
||||
msgstr "Banque / CCP {}"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.ui.view,arch_db:l10n_ch_base_bank.view_bank_search
|
||||
msgid "Banks"
|
||||
msgstr "Banques"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_ccp
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_ccp
|
||||
msgid "CCP/CP-Konto"
|
||||
msgstr "Compte CCP/CP"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_ccp
|
||||
msgid "CCP/CP-Konto of the bank"
|
||||
msgstr "Compte CCP/CP de la banque"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_clearing
|
||||
msgid "Clearing number"
|
||||
msgstr "Numéro de clearing"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_code
|
||||
msgid "Code"
|
||||
msgstr "Code"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_country_code
|
||||
msgid "Country code"
|
||||
msgstr "Code pays"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_code
|
||||
msgid "Internal reference"
|
||||
msgstr "Référence interne"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_account_invoice
|
||||
msgid "Invoice"
|
||||
msgstr "Facture"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:115
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:233
|
||||
#, python-format
|
||||
msgid "Please enter a correct postal number. (01-23456-1 or 12345)"
|
||||
msgstr "Merci d'entrer un numéro postal correct (01-23456-1 ou 12345)"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.ui.view,arch_db:l10n_ch_base_bank.view_bank_search
|
||||
msgid "PostFinance"
|
||||
msgstr "PostFinance"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_clearing
|
||||
msgid "Swiss unique bank identifier also used in IBAN number"
|
||||
msgstr "Identifiant Suisse unique de la banque, utilisé dans le numéro IBAN"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_country_code
|
||||
msgid ""
|
||||
"The ISO country code in two chars. \n"
|
||||
"You can use this field for quick search."
|
||||
msgstr ""
|
||||
"Le code pays ISO a deux caractères.\n"
|
||||
"Vous pouvez l'utiliser pour des recherches rapides."
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: sql_constraint:res.partner.bank:0
|
||||
msgid "The ISR adherent number must be unique !"
|
||||
msgstr "Le numéro d'adhérent BVR doit être unique !"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num
|
||||
msgid ""
|
||||
"Your Bank adherent number to be printed in references of your ISR. This "
|
||||
"is not a postal account number."
|
||||
msgstr ""
|
||||
"Votre numéro d'adhérent BVR qui sera imprimé sur vos BVRs. Ce n'est pas un "
|
||||
"numéro de compte postal."
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:220
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Your bank ISR adherent number must contain only digits!\n"
|
||||
"Please check your company bank account."
|
||||
msgstr ""
|
||||
"Votre numéro d'adhérent BVR de votre banque ne doit contenir que des "
|
||||
"chiffres!\n"
|
||||
"Veuillez vérifier le compte bancaire de votre société."
|
132
l10n_ch_base_bank/i18n/it.po
Normal file
132
l10n_ch_base_bank/i18n/it.po
Normal file
@ -0,0 +1,132 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_ch_base_bank
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
# Stefano <stefano.sforzi@agilebg.com>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-16 07:11+0000\n"
|
||||
"PO-Revision-Date: 2018-01-16 07:11+0000\n"
|
||||
"Last-Translator: Stefano <stefano.sforzi@agilebg.com>, 2018\n"
|
||||
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
|
||||
"Language: it\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"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_res_bank
|
||||
msgid "Bank"
|
||||
msgstr "Banca"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_res_partner_bank
|
||||
msgid "Bank Accounts"
|
||||
msgstr "Conto Bancario"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num
|
||||
msgid "Bank ISR adherent number"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:248
|
||||
#, python-format
|
||||
msgid "Bank/CCP Undefined"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:246
|
||||
#, python-format
|
||||
msgid "Bank/CCP {}"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.ui.view,arch_db:l10n_ch_base_bank.view_bank_search
|
||||
msgid "Banks"
|
||||
msgstr "Banche"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_ccp
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_ccp
|
||||
msgid "CCP/CP-Konto"
|
||||
msgstr "Conto CCP/CP"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_ccp
|
||||
msgid "CCP/CP-Konto of the bank"
|
||||
msgstr "Conto CCP/CP per la Banca"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_clearing
|
||||
msgid "Clearing number"
|
||||
msgstr "Numero Clearing"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_code
|
||||
msgid "Code"
|
||||
msgstr "Codice"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank_country_code
|
||||
msgid "Country code"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_code
|
||||
msgid "Internal reference"
|
||||
msgstr "Riferimento interno"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_account_invoice
|
||||
msgid "Invoice"
|
||||
msgstr "Fattura"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:115
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:233
|
||||
#, python-format
|
||||
msgid "Please enter a correct postal number. (01-23456-1 or 12345)"
|
||||
msgstr "Inserire un conto postale corretto. (01-23456-1 or 12345)"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.ui.view,arch_db:l10n_ch_base_bank.view_bank_search
|
||||
msgid "PostFinance"
|
||||
msgstr "PostFinance"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_clearing
|
||||
msgid "Swiss unique bank identifier also used in IBAN number"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank_country_code
|
||||
msgid ""
|
||||
"The ISO country code in two chars. \n"
|
||||
"You can use this field for quick search."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: sql_constraint:res.partner.bank:0
|
||||
msgid "The ISR adherent number must be unique !"
|
||||
msgstr "Il numero di adesione PVR deve essere univoco"
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num
|
||||
msgid ""
|
||||
"Your Bank adherent number to be printed in references of your ISR. This "
|
||||
"is not a postal account number."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/bank.py:220
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Your bank ISR adherent number must contain only digits!\n"
|
||||
"Please check your company bank account."
|
||||
msgstr ""
|
128
l10n_ch_base_bank/i18n/l10n_ch_base_bank.pot
Normal file
128
l10n_ch_base_bank/i18n/l10n_ch_base_bank.pot
Normal file
@ -0,0 +1,128 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_ch_base_bank
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.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: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_res_bank
|
||||
msgid "Bank"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_res_partner_bank
|
||||
msgid "Bank Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/invoice.py:0
|
||||
#, python-format
|
||||
msgid "Bank account must contain a subscription number for ISR ref type."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/invoice.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Bank account shouldn't be empty, for ISR ref type, you can set it manually "
|
||||
"or set appropriate payment mode."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ch_base_bank.view_bank_search
|
||||
msgid "Banks"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank__city
|
||||
msgid "City"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank__city
|
||||
msgid "City of the bank"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank__clearing
|
||||
msgid "Clearing number"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank__code
|
||||
msgid "Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank__country_code
|
||||
msgid "Country code"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_account_move__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_account_move__id
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank__id
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/partner_bank.py:0
|
||||
#, python-format
|
||||
msgid "ISR {}"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: code:addons/l10n_ch_base_bank/models/partner_bank.py:0
|
||||
#, python-format
|
||||
msgid "ISR {} {}"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank__code
|
||||
msgid "Internal reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model,name:l10n_ch_base_bank.model_account_move
|
||||
msgid "Journal Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_account_move____last_update
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_bank____last_update
|
||||
#: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ch_base_bank.view_bank_search
|
||||
msgid "PostFinance"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank__clearing
|
||||
msgid "Swiss unique bank identifier also used in IBAN number"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_ch_base_bank
|
||||
#: model:ir.model.fields,help:l10n_ch_base_bank.field_res_bank__country_code
|
||||
msgid ""
|
||||
"The ISO country code in two chars. \n"
|
||||
"You can use this field for quick search."
|
||||
msgstr ""
|
3
l10n_ch_base_bank/models/__init__.py
Normal file
3
l10n_ch_base_bank/models/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from . import bank
|
||||
from . import partner_bank
|
||||
from . import invoice
|
54
l10n_ch_base_bank/models/bank.py
Normal file
54
l10n_ch_base_bank/models/bank.py
Normal file
@ -0,0 +1,54 @@
|
||||
# Copyright 2012-2019 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import api, fields, models
|
||||
|
||||
from .. import postfinance
|
||||
|
||||
|
||||
class Bank(models.Model):
|
||||
"""Inherit res.bank class in order to add swiss specific field"""
|
||||
|
||||
_inherit = "res.bank"
|
||||
|
||||
code = fields.Char(string="Code", help="Internal reference")
|
||||
clearing = fields.Char(
|
||||
string="Clearing number",
|
||||
help="Swiss unique bank identifier also used in IBAN number",
|
||||
)
|
||||
city = fields.Char(string="City", help="City of the bank")
|
||||
country_code = fields.Char(
|
||||
string="Country code", related="country.code", readonly=True
|
||||
)
|
||||
|
||||
def is_swiss_post(self):
|
||||
return self.bic == postfinance.BIC
|
||||
|
||||
def name_get(self):
|
||||
"""Format displayed name"""
|
||||
res = []
|
||||
cols = ("bic", "name", "street", "city")
|
||||
for bank in self:
|
||||
vals = (bank[x] for x in cols if bank[x])
|
||||
res.append((bank.id, " - ".join(vals)))
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def name_search(self, name, args=None, operator="ilike", limit=80):
|
||||
"""Extends to look on bank code, bic, name, street and city"""
|
||||
if args is None:
|
||||
args = []
|
||||
ids = []
|
||||
cols = ("code", "bic", "name", "street", "city")
|
||||
if name:
|
||||
for val in name.split(" "):
|
||||
for col in cols:
|
||||
tmp_ids = self.search([(col, "ilike", val)] + args, limit=limit)
|
||||
if tmp_ids:
|
||||
ids += tmp_ids.ids
|
||||
break
|
||||
else:
|
||||
ids = self.search(args, limit=limit).ids
|
||||
# we sort by occurrence
|
||||
to_ret_ids = list(set(ids))
|
||||
to_ret_ids = sorted(to_ret_ids, key=lambda x: ids.count(x), reverse=True)
|
||||
return self.browse(to_ret_ids).name_get()
|
117
l10n_ch_base_bank/models/invoice.py
Normal file
117
l10n_ch_base_bank/models/invoice.py
Normal file
@ -0,0 +1,117 @@
|
||||
# Copyright 2012-2019 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import _, api, exceptions, models
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
|
||||
_inherit = "account.move"
|
||||
|
||||
def _search(
|
||||
self,
|
||||
args,
|
||||
offset=0,
|
||||
limit=None,
|
||||
order=None,
|
||||
count=False,
|
||||
access_rights_uid=None,
|
||||
):
|
||||
domain = []
|
||||
for arg in args:
|
||||
if not isinstance(arg, (tuple, list)) or len(arg) != 3:
|
||||
domain.append(arg)
|
||||
continue
|
||||
field, operator, value = arg
|
||||
if field != "ref":
|
||||
domain.append(arg)
|
||||
continue
|
||||
if operator not in (
|
||||
"like",
|
||||
"ilike",
|
||||
"=like",
|
||||
"=ilike",
|
||||
"not like",
|
||||
"not ilike",
|
||||
):
|
||||
domain.append(arg)
|
||||
continue
|
||||
if value:
|
||||
value = value.replace(" ", "")
|
||||
if not value:
|
||||
# original value contains only spaces, the query
|
||||
# would return all rows, so avoid a costly search
|
||||
# and drop the domain triplet
|
||||
continue
|
||||
# add wildcards for the like search, except if the operator
|
||||
# is =like of =ilike because they are supposed to be there yet
|
||||
if operator.startswith("="):
|
||||
operator = operator[1:]
|
||||
else:
|
||||
value = "%{}%".format(value)
|
||||
# add filtered operator to query
|
||||
query_op = (
|
||||
"SELECT id FROM account_move "
|
||||
"WHERE REPLACE(ref, ' ', '') %s %%s" % (operator,)
|
||||
)
|
||||
# avoid pylint check on no-sql-injection query_op is safe
|
||||
query = query_op
|
||||
self.env.cr.execute(query, (value,))
|
||||
ids = [t[0] for t in self.env.cr.fetchall()]
|
||||
domain.append(("id", "in", ids))
|
||||
|
||||
return super()._search(
|
||||
domain,
|
||||
offset=offset,
|
||||
limit=limit,
|
||||
order=order,
|
||||
count=count,
|
||||
access_rights_uid=access_rights_uid,
|
||||
)
|
||||
|
||||
@api.constrains("ref", "payment_reference")
|
||||
def _check_bank_type_for_type_isr(self):
|
||||
"""Compatibility with module `account_payment_partner`"""
|
||||
for move in self:
|
||||
if move.move_type == "out_invoice" and move._has_isr_ref():
|
||||
if hasattr(super(), "partner_banks_to_show"):
|
||||
bank_acc = move.partner_banks_to_show()
|
||||
else:
|
||||
bank_acc = move.partner_bank_id
|
||||
if not bank_acc:
|
||||
raise exceptions.ValidationError(
|
||||
_(
|
||||
"Bank account shouldn't be empty, for ISR ref"
|
||||
" type, you can set it manually or set appropriate"
|
||||
" payment mode."
|
||||
)
|
||||
)
|
||||
if (
|
||||
bank_acc.acc_type != "qr-iban"
|
||||
and (
|
||||
move.currency_id.name == "CHF"
|
||||
and not bank_acc.l10n_ch_isr_subscription_chf
|
||||
)
|
||||
or (
|
||||
move.currency_id.name == "EUR"
|
||||
and not bank_acc.l10n_ch_isr_subscription_eur
|
||||
)
|
||||
):
|
||||
raise exceptions.ValidationError(
|
||||
_(
|
||||
"Bank account must contain a subscription number for"
|
||||
" ISR ref type."
|
||||
)
|
||||
)
|
||||
return True
|
||||
|
||||
def partner_banks_to_show(self):
|
||||
"""
|
||||
Extend method from account_payment_partner to add specific
|
||||
logic for switzerland bank payments if base method does not give
|
||||
a result
|
||||
"""
|
||||
res = super().partner_banks_to_show()
|
||||
if not res:
|
||||
if self.journal_id:
|
||||
return self.journal_id.bank_account_id
|
||||
return res
|
131
l10n_ch_base_bank/models/partner_bank.py
Normal file
131
l10n_ch_base_bank/models/partner_bank.py
Normal file
@ -0,0 +1,131 @@
|
||||
# Copyright 2012-2019 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import _, api, models
|
||||
|
||||
|
||||
class ResPartnerBank(models.Model):
|
||||
"""Inherit res.partner.bank class in order to add swiss specific fields
|
||||
and state controls
|
||||
|
||||
Statements:
|
||||
acc_type could be of 3 types:
|
||||
- postal
|
||||
- iban
|
||||
- bank
|
||||
|
||||
if account has postal number and acc_type = 'postal' we dropped acc_number
|
||||
and compute it based on postal number, and partner
|
||||
|
||||
if acc_number given in 'iban' format just transform to iban format, but no
|
||||
further modification on it, and acc_type = 'iban'
|
||||
|
||||
it means that postal number in account is a number directly identifying
|
||||
the partner acc_number can contains the postal number
|
||||
|
||||
if given bank account is 'bank' and l10n_ch_postal is set
|
||||
if given bank type is a 'bank' then postal number in account should be
|
||||
acc_number recomputed
|
||||
acc_number in this case recomputed by as partner_name + l10n_ch_postal
|
||||
|
||||
"""
|
||||
|
||||
_inherit = "res.partner.bank"
|
||||
|
||||
def is_isr_issuer(self):
|
||||
"""Supplier will provide ISR/QRR reference numbers in two cases:
|
||||
|
||||
- postal account number starting by 01 or 03
|
||||
- QR-IBAN
|
||||
"""
|
||||
# acc_type can be bank for isrb
|
||||
if self.acc_type in ["bank", "postal"] and self.l10n_ch_postal:
|
||||
return self.l10n_ch_postal[:2] in ["01", "03"]
|
||||
return self.acc_type == "iban" and self._is_qr_iban()
|
||||
|
||||
def _get_ch_bank_from_iban(self):
|
||||
"""Extract clearing number from CH iban to find the bank"""
|
||||
if self.acc_type != "iban" and self.acc_number[:2] != "CH":
|
||||
return False
|
||||
clearing = self.sanitized_acc_number[4:9].lstrip("0")
|
||||
return clearing and self.env["res.bank"].search(
|
||||
[("clearing", "=", clearing)], limit=1
|
||||
)
|
||||
|
||||
@api.onchange("acc_number", "acc_type")
|
||||
def _onchange_acc_number_set_swiss_bank(self):
|
||||
"""Deduce information from IBAN
|
||||
|
||||
Bank is defined as:
|
||||
- Found bank by clearing when using iban
|
||||
"""
|
||||
bank = self.bank_id
|
||||
if self.acc_type == "iban":
|
||||
bank = self._get_ch_bank_from_iban()
|
||||
self.bank_id = bank
|
||||
|
||||
@api.onchange("l10n_ch_postal")
|
||||
def _onchange_postal_set_acc_number(self):
|
||||
"""Set acc_number from postal field"""
|
||||
if self.acc_type != "iban" and self.l10n_ch_postal:
|
||||
self._update_acc_number()
|
||||
|
||||
@api.onchange("partner_id")
|
||||
def onchange_partner_set_acc_number(self):
|
||||
# When acc_number was computed automatically we call regeneration
|
||||
# as partner name is part of acc_number
|
||||
# This is only required for ISR subscription numbers
|
||||
if self.l10n_ch_postal and self.l10n_ch_postal[:2] in ["01", "03"]:
|
||||
self._update_acc_number()
|
||||
|
||||
def _update_acc_number(self):
|
||||
"""Compute value for field acc_number
|
||||
based on an postal account or ISR subscription number"""
|
||||
part_name = self.partner_id.name
|
||||
if not part_name and self.env.context.get("default_partner_id"):
|
||||
partner_id = self.env.context.get("default_partner_id")
|
||||
part_name = self.env["res.partner"].browse(partner_id)[0].name
|
||||
self.acc_number = self._compute_name_from_postal_number(
|
||||
part_name, self.l10n_ch_postal
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _compute_name_from_postal_number(self, partner_name, postal_number):
|
||||
"""This method makes sure to generate a unique name"""
|
||||
if postal_number and postal_number[:2] in ["01", "03"]:
|
||||
if partner_name:
|
||||
acc_name = _("ISR {} {}").format(postal_number, partner_name)
|
||||
else:
|
||||
acc_name = _("ISR {}").format(postal_number)
|
||||
else:
|
||||
return postal_number
|
||||
|
||||
exist_count = self.env["res.partner.bank"].search_count(
|
||||
[("acc_number", "=like", acc_name)]
|
||||
)
|
||||
# if acc_number not unique iterate on bank_accounts while not get
|
||||
# unique number
|
||||
if exist_count:
|
||||
name_exist = exist_count
|
||||
while name_exist:
|
||||
new_name = acc_name + " #{}".format(exist_count)
|
||||
name_exist = self.env["res.partner.bank"].search_count(
|
||||
[("acc_number", "=", new_name)]
|
||||
)
|
||||
exist_count += 1
|
||||
acc_name = new_name
|
||||
return acc_name
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
"""
|
||||
acc_number is mandatory for model, but in localization it could be not
|
||||
mandatory when we have postal number, so we compute acc_number in
|
||||
onchange methods and check it here also
|
||||
"""
|
||||
if not vals.get("acc_number") and vals.get("l10n_ch_postal"):
|
||||
partner = self.env["res.partner"].browse(vals.get("partner_id"))
|
||||
vals["acc_number"] = self._compute_name_from_postal_number(
|
||||
partner.name, vals["l10n_ch_postal"]
|
||||
)
|
||||
return super().create(vals)
|
5
l10n_ch_base_bank/postfinance.py
Normal file
5
l10n_ch_base_bank/postfinance.py
Normal file
@ -0,0 +1,5 @@
|
||||
# Copyright 2020 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
CLEARING = "09000"
|
||||
BIC = "POFICHBEXXX"
|
9
l10n_ch_base_bank/readme/CONTRIBUTORS.rst
Normal file
9
l10n_ch_base_bank/readme/CONTRIBUTORS.rst
Normal file
@ -0,0 +1,9 @@
|
||||
* Nicolas Bessi (Camptocamp)
|
||||
* Vincent Renaville <vincent.renaville@camptocamp.com>
|
||||
* Joël Grand-Guillaume <joel.grandguillaume@camptocamp.com>
|
||||
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||
* Paul Catinean <paulcatinean@gmail.com>
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||
* Akim Juillerat <akim.juillerat@camptocamp.com>
|
||||
* Iryna Vyshnevska <i.vyshnevska@mobilunity.com>
|
||||
* Simone Vanin <simone.vanin@agilebg.com>
|
6
l10n_ch_base_bank/readme/CREDITS.rst
Normal file
6
l10n_ch_base_bank/readme/CREDITS.rst
Normal file
@ -0,0 +1,6 @@
|
||||
The development of this module has been financially supported by:
|
||||
|
||||
* Hasa SA
|
||||
* Open Net SA
|
||||
* Prisme Solutions Informatique SA
|
||||
* Quod SA
|
12
l10n_ch_base_bank/readme/DESCRIPTION.rst
Normal file
12
l10n_ch_base_bank/readme/DESCRIPTION.rst
Normal file
@ -0,0 +1,12 @@
|
||||
This addon extend the features of l10n_ch.
|
||||
|
||||
Most of the former features have been moved in l10n_ch module.
|
||||
|
||||
|
||||
Features:
|
||||
|
||||
Improve UX with onchanges:
|
||||
|
||||
- automatically set bank based on clearing part of IBAN
|
||||
- allow direct entry of l10n_ch_postal which will fill acc_number
|
||||
- search invoices by ISR, with or without spaces
|
16
l10n_ch_base_bank/readme/USAGE.rst
Normal file
16
l10n_ch_base_bank/readme/USAGE.rst
Normal file
@ -0,0 +1,16 @@
|
||||
In partner bank account the type will be discovered automatically.
|
||||
|
||||
* For IBAN accounts fill account number with IBAN.
|
||||
* if the IBAN is an IBAN from PostFinance it will fill the Postal account number
|
||||
* For Postal accounts:
|
||||
* fill the account number with a postal account number 9 digits format (e.g. 10-8060-7).
|
||||
* or fill the "Swiss postal account" with a postal account number 9 digits format (e.g. 10-8060-7).
|
||||
|
||||
Entering a postal number of 9 digits will auto-complete the bank with PostFinance. (You might create it if you haven't installed `l10n_ch_bank`)
|
||||
|
||||
* For ISR subscription numbers (postal account starting with 01 or 03):
|
||||
* fill the account number with a postal account number 9 digits format (e.g. 01-23456-1).
|
||||
* or fill the "Swiss postal account" with a postal account number 9 digits format (e.g. 01-23456-1).
|
||||
|
||||
It will automatically change the content of account number by adding "ISR" and the partner name to avoid
|
||||
duplicates with partner using the same ISR subscription number owned by a bank (ISR-B).
|
BIN
l10n_ch_base_bank/static/description/icon.png
Normal file
BIN
l10n_ch_base_bank/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
466
l10n_ch_base_bank/static/description/index.html
Normal file
466
l10n_ch_base_bank/static/description/index.html
Normal file
@ -0,0 +1,466 @@
|
||||
<?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>Switzerland - Bank type</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="switzerland-bank-type">
|
||||
<h1 class="title">Switzerland - Bank type</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/l10n-switzerland/tree/14.0/l10n_ch_base_bank"><img alt="OCA/l10n-switzerland" src="https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-switzerland-14-0/l10n-switzerland-14-0-l10n_ch_base_bank"><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/125/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This addon extend the features of l10n_ch.</p>
|
||||
<p>Most of the former features have been moved in l10n_ch module.</p>
|
||||
<p>Features:</p>
|
||||
<p>Improve UX with onchanges:</p>
|
||||
<ul class="simple">
|
||||
<li>automatically set bank based on clearing part of IBAN</li>
|
||||
<li>allow direct entry of l10n_ch_postal which will fill acc_number</li>
|
||||
<li>search invoices by ISR, with or without spaces</li>
|
||||
</ul>
|
||||
<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="#other-credits" id="id6">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
|
||||
<p>In partner bank account the type will be discovered automatically.</p>
|
||||
<ul class="simple">
|
||||
<li>For IBAN accounts fill account number with IBAN.
|
||||
* if the IBAN is an IBAN from PostFinance it will fill the Postal account number</li>
|
||||
<li>For Postal accounts:
|
||||
* fill the account number with a postal account number 9 digits format (e.g. 10-8060-7).
|
||||
* or fill the “Swiss postal account” with a postal account number 9 digits format (e.g. 10-8060-7).</li>
|
||||
</ul>
|
||||
<p>Entering a postal number of 9 digits will auto-complete the bank with PostFinance. (You might create it if you haven’t installed <cite>l10n_ch_bank</cite>)</p>
|
||||
<ul class="simple">
|
||||
<li>For ISR subscription numbers (postal account starting with 01 or 03):
|
||||
* fill the account number with a postal account number 9 digits format (e.g. 01-23456-1).
|
||||
* or fill the “Swiss postal account” with a postal account number 9 digits format (e.g. 01-23456-1).</li>
|
||||
</ul>
|
||||
<p>It will automatically change the content of account number by adding “ISR” and the partner name to avoid
|
||||
duplicates with partner using the same ISR subscription number owned by a bank (ISR-B).</p>
|
||||
</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/l10n-switzerland/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/l10n-switzerland/issues/new?body=module:%20l10n_ch_base_bank%0Aversion:%2014.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>Nicolas Bessi (Camptocamp)</li>
|
||||
<li>Vincent Renaville <<a class="reference external" href="mailto:vincent.renaville@camptocamp.com">vincent.renaville@camptocamp.com</a>></li>
|
||||
<li>Joël Grand-Guillaume <<a class="reference external" href="mailto:joel.grandguillaume@camptocamp.com">joel.grandguillaume@camptocamp.com</a>></li>
|
||||
<li>Guewen Baconnier <<a class="reference external" href="mailto:guewen.baconnier@camptocamp.com">guewen.baconnier@camptocamp.com</a>></li>
|
||||
<li>Paul Catinean <<a class="reference external" href="mailto:paulcatinean@gmail.com">paulcatinean@gmail.com</a>></li>
|
||||
<li>Yannick Vaucher <<a class="reference external" href="mailto:yannick.vaucher@camptocamp.com">yannick.vaucher@camptocamp.com</a>></li>
|
||||
<li>Akim Juillerat <<a class="reference external" href="mailto:akim.juillerat@camptocamp.com">akim.juillerat@camptocamp.com</a>></li>
|
||||
<li>Iryna Vyshnevska <<a class="reference external" href="mailto:i.vyshnevska@mobilunity.com">i.vyshnevska@mobilunity.com</a>></li>
|
||||
<li>Simone Vanin <<a class="reference external" href="mailto:simone.vanin@agilebg.com">simone.vanin@agilebg.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#id6">Other credits</a></h2>
|
||||
<p>The development of this module has been financially supported by:</p>
|
||||
<ul class="simple">
|
||||
<li>Hasa SA</li>
|
||||
<li>Open Net SA</li>
|
||||
<li>Prisme Solutions Informatique SA</li>
|
||||
<li>Quod SA</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id7">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/l10n-switzerland/tree/14.0/l10n_ch_base_bank">OCA/l10n-switzerland</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>
|
4
l10n_ch_base_bank/tests/__init__.py
Normal file
4
l10n_ch_base_bank/tests/__init__.py
Normal file
@ -0,0 +1,4 @@
|
||||
from . import test_bank
|
||||
from . import test_bank_type
|
||||
from . import test_create_invoice
|
||||
from . import test_search_invoice
|
400
l10n_ch_base_bank/tests/test_bank.py
Normal file
400
l10n_ch_base_bank/tests/test_bank.py
Normal file
@ -0,0 +1,400 @@
|
||||
# Copyright 2014-2015 Nicolas Bessi (Azure Interior SA)
|
||||
# Copyright 2015-2019 Yannick Vaucher (Camptocamp SA)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import exceptions
|
||||
from odoo.tests import tagged
|
||||
from odoo.tests.common import Form, SavepointCase
|
||||
from odoo.tools import mute_logger
|
||||
|
||||
CH_SUBSCRIPTION = "01-162-8" # partner ISR subsr num we register under postal
|
||||
CH_SUBSCRIPTION_9DIGITS = "010001628" # same ISR subsr num in 9 digits format
|
||||
CH_POSTAL = "10-8060-7"
|
||||
CH_IBAN = "CH15 3881 5158 3845 3843 7"
|
||||
CH_POSTFINANCE_IBAN = "CH09 0900 0000 1000 8060 7"
|
||||
FR_IBAN = "FR83 8723 4133 8709 9079 4002 530"
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestBank(SavepointCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.partner = cls.env.ref("base.res_partner_12")
|
||||
cls.bank = cls.env["res.bank"].create(
|
||||
{
|
||||
"name": "Alternative Bank Schweiz AG",
|
||||
"bic": "ALSWCH21XXX",
|
||||
"clearing": "38815",
|
||||
}
|
||||
)
|
||||
cls.post_bank = cls.env["res.bank"].search([("bic", "=", "POFICHBEXXX")])
|
||||
if not cls.post_bank:
|
||||
cls.post_bank = cls.env["res.bank"].create(
|
||||
{"name": "PostFinance AG", "bic": "POFICHBEXXX", "clearing": "9000"}
|
||||
)
|
||||
|
||||
def new_form(self):
|
||||
form = Form(
|
||||
self.env["res.partner.bank"],
|
||||
view="l10n_ch.isr_partner_bank_form",
|
||||
)
|
||||
form.partner_id = self.partner
|
||||
return form
|
||||
|
||||
def new_empty_form(self):
|
||||
# in some cases we need form without partner
|
||||
form = Form(
|
||||
self.env["res.partner.bank"],
|
||||
view="l10n_ch.isr_partner_bank_form",
|
||||
)
|
||||
return form
|
||||
|
||||
def test_bank_iban(self):
|
||||
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_IBAN.replace(" ", "")
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.bank)
|
||||
self.assertEqual(account.acc_number, CH_IBAN)
|
||||
self.assertFalse(account.l10n_ch_postal)
|
||||
self.assertEqual(account.acc_type, "iban")
|
||||
|
||||
def test_bank_iban_with_spaces(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_IBAN
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.bank)
|
||||
self.assertEqual(account.acc_number, CH_IBAN)
|
||||
self.assertFalse(account.l10n_ch_postal)
|
||||
self.assertEqual(account.acc_type, "iban")
|
||||
|
||||
def test_bank_iban_lower_case(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_IBAN.lower()
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.bank)
|
||||
self.assertEqual(account.acc_number, CH_IBAN.lower())
|
||||
self.assertFalse(account.l10n_ch_postal)
|
||||
self.assertEqual(account.acc_type, "iban")
|
||||
|
||||
def test_bank_iban_foreign(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = FR_IBAN
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertFalse(account.bank_id)
|
||||
self.assertEqual(account.acc_number, FR_IBAN)
|
||||
self.assertFalse(account.l10n_ch_postal)
|
||||
self.assertEqual(account.acc_type, "iban")
|
||||
|
||||
def test_bank_postal(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_SUBSCRIPTION
|
||||
bank_acc.bank_id = self.bank
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.bank)
|
||||
self.assertEqual(
|
||||
account.acc_number,
|
||||
"ISR {} Azure Interior".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_SUBSCRIPTION)
|
||||
self.assertEqual(account.acc_type, "bank")
|
||||
|
||||
def test_postal_set_bank_post(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_POSTAL
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertFalse(account.bank_id)
|
||||
# if acc_number given by user don't update it
|
||||
self.assertEqual(
|
||||
account.acc_number,
|
||||
CH_POSTAL,
|
||||
)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(account.acc_type, "postal")
|
||||
|
||||
bank_acc.bank_id = self.post_bank
|
||||
bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.post_bank)
|
||||
self.assertEqual(account.acc_number, CH_POSTAL)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(account.acc_type, "postal")
|
||||
|
||||
def test_postal_with_bank(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_POSTAL
|
||||
bank_acc.bank_id = self.post_bank
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.post_bank)
|
||||
self.assertEqual(account.acc_number, CH_POSTAL)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(account.acc_type, "postal")
|
||||
|
||||
def test_postal_without_bank(self):
|
||||
"""It doesn't start with 01 or 03
|
||||
it is a postal account"""
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_POSTAL
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertFalse(account.bank_id)
|
||||
self.assertEqual(account.acc_number, CH_POSTAL)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(account.acc_type, "postal")
|
||||
|
||||
def test_iban_postal(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_POSTFINANCE_IBAN.replace(" ", "")
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.post_bank)
|
||||
self.assertEqual(account.acc_number, CH_POSTFINANCE_IBAN)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(account.acc_type, "iban")
|
||||
|
||||
def test_iban_postal_with_spaces(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_POSTFINANCE_IBAN
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.post_bank)
|
||||
self.assertEqual(account.acc_number, CH_POSTFINANCE_IBAN)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(account.acc_type, "iban")
|
||||
|
||||
def test_iban_postal_lower_case(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_POSTFINANCE_IBAN.lower()
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.post_bank)
|
||||
self.assertEqual(account.acc_number, CH_POSTFINANCE_IBAN.lower())
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(account.acc_type, "iban")
|
||||
|
||||
def test_other_bank(self):
|
||||
bank_acc = self.new_form()
|
||||
# the sequence is important
|
||||
bank_acc.bank_id = self.bank
|
||||
bank_acc.acc_number = "R 12312123"
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.bank_id, self.bank)
|
||||
self.assertEqual(account.acc_number, "R 12312123")
|
||||
self.assertEqual(account.l10n_ch_postal, False)
|
||||
self.assertEqual(account.acc_type, "bank")
|
||||
|
||||
def test_set_postal_bank(self):
|
||||
# we create bank account
|
||||
# action runs in UI before creation
|
||||
bank_acc = self.new_form()
|
||||
# bank_acc.acc_number = None
|
||||
bank_acc.l10n_ch_postal = CH_POSTAL
|
||||
bank_acc.bank_id = self.bank
|
||||
account = bank_acc.save()
|
||||
|
||||
# in result we should get new ccp number as we have bank_id and
|
||||
# this he has ccp, new acc_number
|
||||
|
||||
self.assertEqual(account.acc_number, CH_POSTAL)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(account.bank_id, self.bank)
|
||||
|
||||
def test_constraint_postal(self):
|
||||
with self.assertRaises(exceptions.ValidationError):
|
||||
with mute_logger():
|
||||
self.env["res.partner.bank"].create(
|
||||
{
|
||||
"partner_id": self.partner.id,
|
||||
"bank_id": self.bank.id,
|
||||
"acc_number": "R 12312123",
|
||||
"l10n_ch_postal": "520-54025-54054",
|
||||
}
|
||||
)
|
||||
|
||||
def test_constraint_subscription_number(self):
|
||||
with self.assertRaises(exceptions.ValidationError):
|
||||
with mute_logger():
|
||||
self.env["res.partner.bank"].create(
|
||||
{
|
||||
"partner_id": self.partner.id,
|
||||
"acc_number": "12312123",
|
||||
"l10n_ch_isr_subscription_chf": "Not a valid number",
|
||||
}
|
||||
)
|
||||
|
||||
self.env["res.partner.bank"].create(
|
||||
{
|
||||
"partner_id": self.partner.id,
|
||||
"acc_number": "12312123",
|
||||
"l10n_ch_isr_subscription_chf": CH_SUBSCRIPTION,
|
||||
}
|
||||
)
|
||||
|
||||
self.env["res.partner.bank"].create(
|
||||
{
|
||||
"partner_id": self.partner.id,
|
||||
"acc_number": "12312124",
|
||||
"l10n_ch_isr_subscription_chf": CH_SUBSCRIPTION_9DIGITS,
|
||||
}
|
||||
)
|
||||
|
||||
def test_create_bank_default_acc_number(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.bank_id = self.bank
|
||||
bank_acc.l10n_ch_postal = CH_SUBSCRIPTION
|
||||
account = bank_acc.save()
|
||||
|
||||
# account number set based on ccp
|
||||
self.assertEqual(
|
||||
account.acc_number,
|
||||
"ISR {} Azure Interior".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_SUBSCRIPTION)
|
||||
|
||||
def test_onchange_post_bank_acc_number(self):
|
||||
"""Check postal is copied to acc_number"""
|
||||
bank_acc = self.new_empty_form()
|
||||
bank_acc.bank_id = self.post_bank
|
||||
bank_acc.l10n_ch_postal = CH_POSTAL
|
||||
|
||||
# if it's postal, copy the value in acc_number
|
||||
self.assertEqual(bank_acc.l10n_ch_postal, CH_POSTAL)
|
||||
self.assertEqual(bank_acc.acc_number, CH_POSTAL)
|
||||
|
||||
# if it's ISR subscription, copy ISR + value in acc_number
|
||||
bank_acc.l10n_ch_postal = CH_SUBSCRIPTION
|
||||
self.assertEqual(
|
||||
bank_acc.acc_number,
|
||||
"ISR {}".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
|
||||
# if it's ISR subscription, copy ISR + value in acc_number
|
||||
# In this case we have the partner set
|
||||
bank_acc.partner_id = self.partner
|
||||
self.assertEqual(
|
||||
bank_acc.acc_number,
|
||||
"ISR {} Azure Interior".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
self.assertEqual(bank_acc.l10n_ch_postal, CH_SUBSCRIPTION)
|
||||
|
||||
def test_onchange_post_bank_isr_in_acc_number(self):
|
||||
"""On entering ISR in acc_number
|
||||
|
||||
Check acc_number is rewritten
|
||||
and ISR subscription number is copied in l10n_ch_postal
|
||||
|
||||
"""
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_SUBSCRIPTION
|
||||
bank_acc.bank_id = self.post_bank
|
||||
|
||||
self.assertEqual(bank_acc.l10n_ch_postal, CH_SUBSCRIPTION)
|
||||
self.assertEqual(
|
||||
bank_acc.acc_number,
|
||||
"ISR {} Azure Interior".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
|
||||
def test_name_search(self):
|
||||
self.bank.bic = "BBAVBEBB"
|
||||
result = self.env["res.bank"].name_search("BBAVBEBB")
|
||||
self.assertEqual(result and result[0][0], self.bank.id)
|
||||
self.bank.code = "CODE123"
|
||||
result = self.env["res.bank"].name_search("CODE123")
|
||||
self.assertEqual(result and result[0][0], self.bank.id)
|
||||
self.bank.street = "Route de Neuchâtel"
|
||||
result = self.env["res.bank"].name_search("Route de Neuchâtel")
|
||||
self.assertEqual(result and result[0][0], self.bank.id)
|
||||
self.bank.city = "Lausanne-Centre"
|
||||
result = self.env["res.bank"].name_search("Lausanne-Centre")
|
||||
self.assertEqual(result and result[0][0], self.bank.id)
|
||||
|
||||
def test_multiple_postal_number_for_same_partner(self):
|
||||
bank_acc = self.new_form()
|
||||
bank_acc.acc_number = CH_SUBSCRIPTION
|
||||
bank_acc.save()
|
||||
bank_acc_2 = self.new_form()
|
||||
bank_acc_2.acc_number = CH_SUBSCRIPTION
|
||||
account2 = bank_acc_2.save()
|
||||
|
||||
self.assertFalse(account2.bank_id)
|
||||
self.assertEqual(
|
||||
account2.acc_number,
|
||||
"ISR {} Azure Interior #1".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
self.assertEqual(account2.acc_type, "bank")
|
||||
|
||||
bank_acc_3 = self.new_form()
|
||||
bank_acc_3.acc_number = CH_SUBSCRIPTION
|
||||
account3 = bank_acc_3.save()
|
||||
|
||||
# no bank matches
|
||||
self.assertFalse(account3.bank_id)
|
||||
self.assertEqual(
|
||||
account3.acc_number,
|
||||
"ISR {} Azure Interior #2".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
self.assertEqual(account3.acc_type, "bank")
|
||||
account3.unlink()
|
||||
# next acc_numbers properly generated
|
||||
|
||||
# after deletion reuse same number
|
||||
bank_acc_4 = self.new_form()
|
||||
bank_acc_4.acc_number = CH_SUBSCRIPTION
|
||||
account4 = bank_acc_4.save()
|
||||
|
||||
self.assertEqual(
|
||||
account4.acc_number,
|
||||
"ISR {} Azure Interior #2".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
|
||||
def test_acc_name_generation(self):
|
||||
# this test runs directly with object and onchange methods as Form
|
||||
# class has constrains to flash required field as partner_id is
|
||||
# once is set we can only replace on other partner but in view form
|
||||
# we can make such actions
|
||||
|
||||
# we test only proper name generation in different conditions
|
||||
account = self.env["res.partner.bank"].new(
|
||||
{
|
||||
"acc_number": CH_SUBSCRIPTION,
|
||||
"partner_id": False,
|
||||
"l10n_ch_postal": False,
|
||||
}
|
||||
)
|
||||
# acc_number is ok in first
|
||||
self.assertEqual(account.acc_number, CH_SUBSCRIPTION)
|
||||
# but if some onchange trigger recompilation of name we flash any name
|
||||
# only it's not iban type
|
||||
account._update_acc_number()
|
||||
self.assertFalse(account.acc_number)
|
||||
# still no name
|
||||
account.partner_id = self.partner
|
||||
account._update_acc_number()
|
||||
self.assertFalse(account.acc_number)
|
||||
account.l10n_ch_postal = CH_SUBSCRIPTION
|
||||
account._update_acc_number()
|
||||
self.assertEqual(
|
||||
account.acc_number,
|
||||
"ISR {} Azure Interior".format(CH_SUBSCRIPTION),
|
||||
)
|
||||
# remove partner name
|
||||
account.partner_id = ""
|
||||
account._update_acc_number()
|
||||
self.assertEqual(account.acc_number, "ISR {}".format(CH_SUBSCRIPTION))
|
||||
# no changes for bank changes
|
||||
account.bank_id = self.bank
|
||||
account._update_acc_number()
|
||||
self.assertEqual(account.acc_number, "ISR {}".format(CH_SUBSCRIPTION))
|
||||
# everything cleanup
|
||||
account.l10n_ch_postal = ""
|
||||
account._update_acc_number()
|
||||
self.assertEqual(account.acc_number, "")
|
43
l10n_ch_base_bank/tests/test_bank_type.py
Normal file
43
l10n_ch_base_bank/tests/test_bank_type.py
Normal file
@ -0,0 +1,43 @@
|
||||
# Copyright 2012-2019 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo.tests import common
|
||||
|
||||
CH_POSTAL = "10-8060-7"
|
||||
CH_SUBSCRIPTION = "01-162-8"
|
||||
|
||||
|
||||
class TestBankType(common.SavepointCase):
|
||||
def test_is_bank_account_with_isr_issuer(self):
|
||||
bank = self.env["res.bank"].create(
|
||||
{"name": "BCV", "bic": "BCVLCH2LXXX", "clearing": "234234"}
|
||||
)
|
||||
bank_account = self.env["res.partner.bank"].create(
|
||||
{
|
||||
"partner_id": self.partner.id,
|
||||
"bank_id": bank.id,
|
||||
"acc_number": "ISR 01-1234-1",
|
||||
"l10n_ch_postal": CH_SUBSCRIPTION,
|
||||
}
|
||||
)
|
||||
self.assertEqual(bank_account.acc_type, "bank")
|
||||
|
||||
def test_is_postal_account(self):
|
||||
bank = self.env["res.bank"].create(
|
||||
{"name": "BCV", "bic": "BCVLCH2LXXX", "clearing": "234234"}
|
||||
)
|
||||
bank_account = self.env["res.partner.bank"].create(
|
||||
{
|
||||
"partner_id": self.partner.id,
|
||||
"bank_id": bank.id,
|
||||
"acc_number": CH_POSTAL,
|
||||
"l10n_ch_postal": CH_POSTAL,
|
||||
}
|
||||
)
|
||||
self.assertEqual(bank_account.acc_type, "postal")
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.company = cls.env.ref("base.main_company")
|
||||
cls.partner = cls.env.ref("base.main_partner")
|
101
l10n_ch_base_bank/tests/test_create_invoice.py
Normal file
101
l10n_ch_base_bank/tests/test_create_invoice.py
Normal file
@ -0,0 +1,101 @@
|
||||
# Copyright 2012-2019 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import exceptions
|
||||
from odoo.tests.common import Form, SavepointCase
|
||||
|
||||
|
||||
class TestCreateMove(SavepointCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.company = cls.env.ref("base.main_company")
|
||||
cls.partner = cls.env.ref("base.res_partner_12")
|
||||
bank = cls.env["res.bank"].create(
|
||||
{"name": "BCV", "bic": "BBRUBEBB", "clearing": "234234"}
|
||||
)
|
||||
# define company bank account
|
||||
cls.bank_journal = cls.env["account.journal"].create(
|
||||
{
|
||||
"company_id": cls.company.id,
|
||||
"type": "bank",
|
||||
"code": "BNK42",
|
||||
"bank_id": bank.id,
|
||||
"bank_acc_number": "01-1234-1",
|
||||
}
|
||||
)
|
||||
cls.bank_acc = cls.bank_journal.bank_account_id
|
||||
cls.bank_acc.write({"l10n_ch_isr_subscription_chf": "01-162-8", "sequence": 1})
|
||||
fields_list = ["company_id", "user_id", "currency_id", "journal_id"]
|
||||
cls.inv_values = cls.env["account.move"].default_get(fields_list)
|
||||
|
||||
def new_form(self):
|
||||
inv = Form(
|
||||
self.env["account.move"].with_context(default_move_type="out_invoice")
|
||||
)
|
||||
# Form(
|
||||
# self.env['account.move'],
|
||||
# view='account.view_move_form'
|
||||
# )
|
||||
inv.partner_id = self.partner
|
||||
inv.journal_id = self.bank_journal
|
||||
return inv
|
||||
|
||||
def test_emit_move_with_isr_ref(self):
|
||||
inv_form = self.new_form()
|
||||
move = inv_form.save()
|
||||
self.assertFalse(move._has_isr_ref())
|
||||
|
||||
inv_form.ref = "132000000000000000000000014"
|
||||
inv_form.save()
|
||||
self.assertTrue(move._has_isr_ref())
|
||||
|
||||
def test_emit_move_with_isr_ref_15_pos(self):
|
||||
inv_form = self.new_form()
|
||||
move = inv_form.save()
|
||||
|
||||
self.assertFalse(move._has_isr_ref())
|
||||
|
||||
move.ref = "132000000000004"
|
||||
# We consider such ref to be unstructured
|
||||
# and we shouldn't generate such refs
|
||||
self.assertFalse(move._has_isr_ref())
|
||||
|
||||
# and save
|
||||
inv_form.save()
|
||||
|
||||
def test_emit_move_with_non_isr_ref(self):
|
||||
inv_form = self.new_form()
|
||||
move = inv_form.save()
|
||||
|
||||
self.assertFalse(move._has_isr_ref())
|
||||
|
||||
move.ref = "Not a ISR ref with 27 chars"
|
||||
self.assertFalse(move._has_isr_ref())
|
||||
|
||||
def test_emit_move_with_missing_isr_ref(self):
|
||||
inv_form = self.new_form()
|
||||
inv_form.save()
|
||||
inv_form.ref = False
|
||||
# and save
|
||||
move = inv_form.save()
|
||||
|
||||
self.assertFalse(move._has_isr_ref())
|
||||
|
||||
def test_emit_move_with_isr_ref_missing_subscr_num(self):
|
||||
inv_form = self.new_form()
|
||||
move = inv_form.save()
|
||||
self.assertFalse(move._has_isr_ref())
|
||||
inv_form.partner_bank_id = self.env["res.partner.bank"]
|
||||
with self.assertRaises(exceptions.ValidationError):
|
||||
inv_form.ref = "132000000000000000000000014"
|
||||
inv_form.save()
|
||||
|
||||
def test_emit_move_with_isr_ref_subscr_num_wrong_currency(self):
|
||||
inv_form = self.new_form()
|
||||
move = inv_form.save()
|
||||
self.assertFalse(move._has_isr_ref())
|
||||
move.currency_id = self.env.ref("base.EUR")
|
||||
with self.assertRaises(exceptions.ValidationError):
|
||||
inv_form.ref = "132000000000000000000000014"
|
||||
inv_form.save()
|
116
l10n_ch_base_bank/tests/test_search_invoice.py
Normal file
116
l10n_ch_base_bank/tests/test_search_invoice.py
Normal file
@ -0,0 +1,116 @@
|
||||
# Copyright 2017 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||
|
||||
from odoo.tests import common, tagged
|
||||
from odoo.tests.common import Form
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestSearchmove(common.SavepointCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.company = cls.env.ref("base.main_company")
|
||||
bank = cls.env["res.bank"].create(
|
||||
{"name": "BCV", "bic": "BBRUBEBB", "clearing": "234234"}
|
||||
)
|
||||
cls.env["res.partner.bank"].create(
|
||||
{
|
||||
"partner_id": cls.company.partner_id.id,
|
||||
"bank_id": bank.id,
|
||||
"acc_number": "ISR",
|
||||
"l10n_ch_isr_subscription_chf": "01-162-8",
|
||||
"sequence": 1,
|
||||
}
|
||||
)
|
||||
cls.partner = cls.env["res.partner"].create({"name": "Test"})
|
||||
cls.bank_journal = cls.env["account.journal"].create(
|
||||
{
|
||||
"company_id": cls.company.id,
|
||||
"type": "bank",
|
||||
"code": "BNK42",
|
||||
"bank_id": bank.id,
|
||||
"bank_acc_number": "10-8060-7",
|
||||
}
|
||||
)
|
||||
|
||||
def new_form(self):
|
||||
inv = Form(self.env["account.move"].with_context(default_type="out_invoice"))
|
||||
# inv = Form(
|
||||
# self.env['account.move'],
|
||||
# view='account.view_move_form'
|
||||
# )
|
||||
inv.partner_id = self.partner
|
||||
inv.journal_id = self.bank_journal
|
||||
return inv
|
||||
|
||||
def assert_find_ref(self, ref, operator, value):
|
||||
inv_form = self.new_form()
|
||||
inv_form.ref = ref
|
||||
|
||||
invoice = inv_form.save()
|
||||
|
||||
found = self.env["account.move"].search([("ref", operator, value)])
|
||||
self.assertEqual(invoice, found)
|
||||
|
||||
def assert_not_find_ref(self, ref, operator, value):
|
||||
inv_form = self.new_form()
|
||||
inv_form.ref = ref
|
||||
inv_form.save()
|
||||
|
||||
found = self.env["account.move"].search([("ref", operator, value)])
|
||||
self.assertFalse(found)
|
||||
|
||||
def test_search_equal_strict(self):
|
||||
self.assert_find_ref(
|
||||
"27 29990 00000 00001 70400 25019", "=", "27 29990 00000 00001 70400 25019"
|
||||
)
|
||||
|
||||
def test_search_equal_whitespace_right(self):
|
||||
self.assert_not_find_ref(
|
||||
"272999000000000017040025019", "=", "27 29990 00000 00001 70400 25019"
|
||||
)
|
||||
|
||||
def test_search_equal_whitespace_left(self):
|
||||
self.assert_not_find_ref(
|
||||
"27 29990 00000 00001 70400 25019", "=", "272999000000000017040025019"
|
||||
)
|
||||
|
||||
def test_search_like_whitespace_right(self):
|
||||
self.assert_find_ref("272999000000000017040025019", "like", "1 70400 25")
|
||||
|
||||
def test_search_like_whitespace_left(self):
|
||||
self.assert_find_ref("27 29990 00000 00001 70400 25019", "like", "17040025")
|
||||
|
||||
def test_search_like_whitespace_both(self):
|
||||
self.assert_find_ref("27 29990 00000 00001 70400 25019", "like", "17 040025 01")
|
||||
|
||||
def test_search_eqlike_whitespace_raw(self):
|
||||
self.assert_not_find_ref(
|
||||
"27 29990 00000 00001 70400 25019", "=like", "17 040025 01"
|
||||
)
|
||||
|
||||
def test_search_eqlike_whitespace_wildcards(self):
|
||||
self.assert_find_ref(
|
||||
"27 29990 00000 00001 70400 25019", "=like", "%17 040025 01%"
|
||||
)
|
||||
|
||||
def test_search_different(self):
|
||||
self.assert_not_find_ref("27 29990 00000 00001 70400 25019", "like", "4273473")
|
||||
|
||||
def test_search_other_field(self):
|
||||
inv_form = self.new_form()
|
||||
inv_form.ref = "27 29990 00000 00001 70400 25019"
|
||||
move = inv_form.save()
|
||||
|
||||
found = self.env["account.move"].search([("partner_id", "=", self.partner.id)])
|
||||
self.assertEqual(move, found)
|
||||
|
||||
def test_search_unary_operator(self):
|
||||
inv_form = self.new_form()
|
||||
inv_form.ref = "27 29990 00000 00001 70400 25019"
|
||||
move = inv_form.save()
|
||||
|
||||
found = self.env["account.move"].search([("ref", "like", "2999000000")])
|
||||
self.assertEqual(move, found)
|
61
l10n_ch_base_bank/views/bank.xml
Normal file
61
l10n_ch_base_bank/views/bank.xml
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="view_bank_search" model="ir.ui.view">
|
||||
<field name="name">res.bank.search</field>
|
||||
<field name="model">res.bank</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Banks">
|
||||
<filter
|
||||
name="Postfinance"
|
||||
string="PostFinance"
|
||||
domain="[('bic', '=', 'POFICHBEXXX')]"
|
||||
help="PostFinance"
|
||||
/>
|
||||
<field name="name" />
|
||||
<field name="code" />
|
||||
<field name="street" />
|
||||
<field name="city" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<!-- 'POFICHBEXXX' corresponds to Postfinance bic -->
|
||||
<record model="ir.ui.view" id="add_custom_fields_on_bank">
|
||||
<field name="name">add custom fields on bank</field>
|
||||
<field name="model">res.bank</field>
|
||||
<field name="inherit_id" ref="base.view_res_bank_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="bic" position="after">
|
||||
<field name="code" />
|
||||
<field name="clearing" />
|
||||
</field>
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="country_code" invisible="True" />
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='city']" position="attributes">
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'required': [('country_code', '=', 'CH')]}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='bic']" position="attributes">
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'required': [('country_code', '=', 'CH')]}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="add_custom_fields_on_bank_list">
|
||||
<field name="name">add custom fields on bank list</field>
|
||||
<field name="model">res.bank</field>
|
||||
<field name="inherit_id" ref="base.view_res_bank_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="bic" position="after">
|
||||
<field name="code" />
|
||||
<field name="clearing" />
|
||||
<field name="street" />
|
||||
<field name="city" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
78
l10n_ch_invoice_reports/README.rst
Normal file
78
l10n_ch_invoice_reports/README.rst
Normal file
@ -0,0 +1,78 @@
|
||||
=================================================
|
||||
Switzerland - Invoice Reports with payment option
|
||||
=================================================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! 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%2Fl10n--switzerland-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/l10n-switzerland/tree/13.0/l10n_ch_invoice_reports
|
||||
:alt: OCA/l10n-switzerland
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/l10n-switzerland-13-0/l10n-switzerland-13-0-l10n_ch_invoice_reports
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/125/13.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module adds possibility to print invoice report together with ISR and/or QR code
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Print report using one of 3 additional print actions in Accounting
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/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/l10n-switzerland/issues/new?body=module:%20l10n_ch_invoice_reports%0Aversion:%2013.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
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Anna Janiszewska <anna.janiszewska@camptocamp.com>
|
||||
|
||||
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/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/13.0/l10n_ch_invoice_reports>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user