Swiss Postfinance File Delivery Services

l10n_ch_fds_postfinance
REPOSITORY
REPOSITORYOCA/l10n-switzerland
GIT
GIThttps://github.com/OCA/l10n-switzerland.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-switzerland/tree/11.0/l10n_ch_fds_postfinance
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Compassion CH
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Compassion CH
COMMITTERS
COMMITTERSOCA Transbot, oca-travis, Weblate, Benoît Schopfer
WEBSITE
WEBSITEhttp://www.compassion.ch/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:03
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - analytic
    - web_planner
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Crypto
pysftp
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (10)
XML IDNameModelTypeStatus
fds_authentication_keys_form FDS authentication keys form fds.authentication.keys form New
fds_postfinance_file_search fds.postfinance.file.select fds.postfinance.file search New
fds_postfinance_file_tree fds.postfinance.file.tree fds.postfinance.file tree New
fds_postfinance_files_form FDS PostFinance file form fds.postfinance.file form New
view_fds_files_import_tobankstatments_wizard_form Download FDS Files fds.files.import.tobankstatments.wizard form New
view_fds_key_clone_wizard_form FDS key clone wizard view fds.key.clone.wizard form New
view_fds_key_generator_wizard_form FDS key generator wizard view fds.key.generator.wizard form New
view_fds_key_import_wizard_form FDS key import wizard view fds.key.import.wizard form New
view_fds_postfinance_account_form fds.postfinance.account.form fds.postfinance.account form New
view_fds_postfinance_account_tree fds.postfinance.account.tree fds.postfinance.account tree New
Models touched (8)

New fields (7)
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' ondelete='restrict' readonly=True string='FDS account'
  • key_active Boolean
    default=True
  • ppk_filename Char
    readonly=True string='Private key filename'
  • private_key_crypted Binary
    readonly=True
  • pub_filename Char
    readonly=True string='Public key filename'
  • public_key Binary
    readonly=True
  • user_id Many2one → res.users
    comodel_name='res.users' ondelete='restrict' readonly=True string='User'
Public methods (4)
  • clone_key_to(self, user)
    @api.multi
    create a new record with the same key :params record: of model res.users :return record: of model fds.authentication.key
  • config(self)
    @api.multi
    Configuration RSA: password to encrypt the private key. Note: the password must be add in the odoo config file (ie. ssh_pwd = *****) :returns str: the pass key that allow to decrypt the private key
  • generate_pairkey(self, bits=4096)
    @api.multi
    generate the RSA key pair. :returns (str, str): public key and private key crypted
  • import_pairkey(self, public_key, private_key)
    @api.multi
    import and crypt private key. :returns (str, str): public key and private key crypted

New fields (6)
  • fds_account_id Many2one → fds.postfinance.account
    default=<expr> required=True args: 'fds.postfinance.account', 'FDS Account'
  • msg_exist_file Char
    default='' readonly=True args: 'Files already existing'
  • msg_file_imported Char
    default='' readonly=True args: 'Imported files'
  • msg_import_file_fail Char
    default='' readonly=True args: 'File import failures'
  • msg_import_file_ignore Char
    default='' readonly=True args: 'Files ignored'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('done', 'Done'), ('error', 'Error Permission'), ('errorSFTP', 'Error SFTP')]
Public methods (1)
  • import_button(self)
    @api.multi
    download the file from the sftp where the directories were selected in the FDS configuration, and if possible import to bank Statments. Called by pressing import button. :returns action: configuration for the next wizard's view

New fields (3)
  • des_user_id Many2one → res.users
    comodel_name='res.users' help='assign the key to the user selected' required=True string='To:'
  • src_user_key_id Many2one → fds.authentication.keys
    comodel_name='fds.authentication.keys' help='select one key' required=True string='Copy authentication key:'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('done', 'Done')]
Public methods (2)
  • back_button(self)
    @api.multi
    go back to copy view. Called by pressing "Make another copy" button. :returns action: configuration for the next wizard's view
  • copy_button(self)
    @api.multi
    copy an authentication key to another user. Called by pressing copy button. :returns action: configuration for the next wizard's view

New fields (8)
  • fds_authentication_keys_id Many2one → fds.authentication.keys
    comodel_name='fds.authentication.keys' help='[info] keep one recored of the model fds_authentication_key' readonly=True string='FDS authentication keys'
  • ppk_filename Char
    help='private key filename' readonly=True related='fds_authentication_keys_id.ppk_filename' string='Private key Filename'
  • private_key_crypted Binary
    help='private key crypted generated' readonly=True related='fds_authentication_keys_id.private_key_crypted'
  • pub_filename Char
    help='public key filename' readonly=True related='fds_authentication_keys_id.pub_filename' string='Public key Filename'
  • public_key Binary
    help='public key generated' readonly=True related='fds_authentication_keys_id.public_key'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('generate', 'Generate'), ('done', 'Done')]
  • user_id Many2one → res.users
    comodel_name='res.users' help='assign the key to the user selected' required=True string='User'
  • user_name Char
    help='user previously selected' readonly=True related='fds_authentication_keys_id.user_id.name'
Public methods (6)
  • cancel_keys_button(self)
    @api.multi
    Remove public and private key saved in the database. Called by pressing cancel button. :returns action: close the wizard's view
  • confirm_keys_button(self)
    @api.multi
    Confirm the generated keys. Called by pressing confirm button. :returns action: configuration for the next wizard's view
  • generate_keys_button(self)
    @api.multi
    Generate public and private crypted key then save in the database. Called by pressing generate button. :returns action: configuration for the next wizard's view
  • savekeys(self, public_key, private_key_crypted)
    @api.multi
    Save in the database the public and private creyted key :param str public_key: generate by RSA :param str private_key_crypted: generate and crypted by RSA :returns action: None :raises Warning: - if the state of the wizard do not exist - if more than one FDS account selected
  • send_keys_button(self)
    @api.multi
    Send the public key to the FDS Postfinance by mail which will allow the selected user to connect to the SFTP using his private key. Called by pressing send button.
  • userkey_exist(self)
    @api.multi
    check if the authentication key already exist for the selected user :returns record: record of the model fds.authentication.keys :raises Warning: if user has already a key

New fields (4)
  • private_key_import_file Binary
    help='select one file that contain your private key' string='Private key'
  • private_key_import_txt Text
    help='copy/paste your private key' string='Private key'
  • public_key_import_file Binary
    help='select one file that contain your public key' string='Public key'
  • public_key_import_txt Text
    help='copy/paste your public key' string='Public key'
Public methods (1)
  • import_keys_button(self)
    @api.multi
    Import public and private key then save in the database. Called by pressing import button. :returns action: configuration for the next wizard's view :raises Warning: if missing input information

New fields (8)
  • authentication_key_ids One2many → fds.authentication.keys
    comodel_name='fds.authentication.keys' inverse_name='fds_account_id' string='Authentication keys'
  • directory_ids One2many → fds.postfinance.directory
    comodel_name='fds.postfinance.directory' inverse_name='fds_account_id' string='FDS postfinance directories'
  • fds_file_ids One2many → fds.postfinance.file
    comodel_name='fds.postfinance.file' help='downloaded files from sftp' inverse_name='fds_account_id' readonly=True string='FDS Postfinance files'
  • hostname Char
    default='fdsbc.post.ch' required=True string='SFTP Hostname'
  • name Char
    required=True
  • postfinance_email Char
    default='fds@post.ch' help='E-mail of FDS Postfinance' required=True
  • user_id Many2one → res.users
    comodel_name='res.users' help='Owner must have the rights to register new key pairs for this account. Its e-mail address will be used to send the keys of new users to PostFinance' ondelete='restrict' required=True string='Account Owner'
  • username Char
    required=True string='SFTP Username'
Public methods (5)
  • copy_key_button(self)
    @api.multi
    copy an authentication key to another user. :returns action: popup fds key clone wizard
  • import_files_cron(self)
    @api.model
    Import files for all Accounts defined. :return: True
  • import_key_button(self)
    @api.multi
    import an authentication key to a user. :returns action: popup fds key import wizard
  • newKey_button(self)
    @api.multi
    generate a new authentication key to a user. :returns action: popup fds key generator wizard
  • verify_directories_button(self)
    @api.multi
    test connection and verify if directories are the same in the DB :returns None: :raises Warning: - if current user do not have key - if unable to connect to sftp

New fields (6)
  • allow_download_file Boolean
    default=False help='check it to allow download files from this FDS directory' string='Allow download file?'
  • allow_upload_file Boolean
    default=False help='check it to allow upload files to this FDS directory' string='Allow upload file?'
  • excluded_files Char
    default='camt052' help="Semicolon (;) separated patterns. If a filename matches one of the given patterns, the file won't be downloaded from the remote directory."
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' ondelete='restrict' readonly=True string='FDS account'
  • name Char
    readonly=True string='Directory name'
  • still_on_server Boolean
    default=True help='[info] if the directory still exist on the FDS sftp' readonly=True string='Directory still on server?'
Public methods (0)

No public methods.

New fields (7)
  • bank_statement_id Many2one → account.bank.statement
    comodel_name='account.bank.statement' ondelete='restrict' readonly=True string='Bank Statement'
  • data Binary
    help='the downloaded file data' readonly=True
  • directory_id Many2one → fds.postfinance.directory
    ondelete='restrict' readonly=True string='Directory' args: 'fds.postfinance.directory'
  • error_message Text
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' help='related FDS account' ondelete='restrict' readonly=True string='FDS account'
  • filename Char
    readonly=True
  • state Selection
    default='draft' help='state of file' readonly=True selection=[('draft', 'Draft'), ('done', 'Done'), ('error', 'Error'), ('cancel', 'Cancelled')]
Public methods (5)
  • change2cancel_button(self)
    @api.multi
    Put file in cancel state. Called by pressing 'cancel' button. :return None:
  • change2draft_button(self)
    @api.multi
    undo the file is corrupt to state draft. Called by pressing 'cancel corrupt file' button. :return None:
  • change2error_button(self)
    @api.multi
    change the state of the file to error because the file is corrupt. Called by pressing 'corrupt file?' button. :return None:
  • import2bankStatements(self)
    @api.multi
    convert the file to a record of model bankStatment. :returns bool: - True if the convert was succeed - False otherwise
  • import_button(self)
    @api.multi
    convert the file to record of model bankStatment. Called by pressing import button. :return None:
REPOSITORY
REPOSITORYOCA/l10n-switzerland
GIT
GIThttps://github.com/OCA/l10n-switzerland.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-switzerland/tree/10.0/l10n_ch_fds_postfinance
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Compassion CH
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Compassion CH
COMMITTERS
COMMITTERSPedro M. Baeza, Akim Juillerat, OCA Transbot, Emanuel Cino, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttp://www.compassion.ch/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:20:04
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - report
    - analytic
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Crypto
pysftp
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (10)
XML IDNameModelTypeStatus
fds_authentication_keys_form FDS authentication keys form fds.authentication.keys form New
fds_postfinance_file_search fds.postfinance.file.select fds.postfinance.file search New
fds_postfinance_file_tree fds.postfinance.file.tree fds.postfinance.file tree New
fds_postfinance_files_form FDS PostFinance file form fds.postfinance.file form New
view_fds_files_import_tobankstatments_wizard_form Download FDS Files fds.files.import.tobankstatments.wizard form New
view_fds_key_clone_wizard_form FDS key clone wizard view fds.key.clone.wizard form New
view_fds_key_generator_wizard_form FDS key generator wizard view fds.key.generator.wizard form New
view_fds_key_import_wizard_form FDS key import wizard view fds.key.import.wizard form New
view_fds_postfinance_account_form fds.postfinance.account.form fds.postfinance.account form New
view_fds_postfinance_account_tree fds.postfinance.account.tree fds.postfinance.account tree New
Models touched (8)

New fields (7)
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' ondelete='restrict' readonly=True string='FDS account'
  • key_active Boolean
    default=True
  • ppk_filename Char
    readonly=True string='Private key filename'
  • private_key_crypted Binary
    readonly=True string='Private key crypted'
  • pub_filename Char
    readonly=True string='Public key filename'
  • public_key Binary
    readonly=True
  • user_id Many2one → res.users
    comodel_name='res.users' ondelete='restrict' readonly=True string='User'
Public methods (4)
  • clone_key_to(self, user)
    @api.multi
    create a new record with the same key :params record: of model res.users :return record: of model fds.authentication.key
  • config(self)
    @api.multi
    Configuration RSA: password to encrypt the private key. Note: the password must be add in the odoo config file (ie. ssh_pwd = *****) :returns str: the pass key that allow to decrypt the private key
  • generate_pairkey(self, bits=4096)
    @api.multi
    generate the RSA key pair. :returns (str, str): public key and private key crypted
  • import_pairkey(self, public_key, private_key)
    @api.multi
    import and crypte private key. :returns (str, str): public key and private key crypted

New fields (6)
  • fds_account_id Many2one → fds.postfinance.account
    default=<expr> required=True args: 'fds.postfinance.account', 'FDS Account'
  • msg_exist_file Char
    default='' readonly=True args: 'Files already existing'
  • msg_file_imported Char
    default='' readonly=True args: 'Imported files'
  • msg_import_file_fail Char
    default='' readonly=True args: 'File import failures'
  • msg_import_file_ignore Char
    default='' readonly=True args: 'Files ignored'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('done', 'Done'), ('error', 'Error Permission'), ('errorSFTP', 'Error SFTP')]
Public methods (1)
  • import_button(self)
    @api.multi
    download the file from the sftp where the directories were selected in the FDS configuration, and if possible import to bank Statments. Called by pressing import button. :returns action: configuration for the next wizard's view

New fields (3)
  • des_user_id Many2one → res.users
    comodel_name='res.users' help='assign the key to the user selected' required=True string='To:'
  • src_user_key_id Many2one → fds.authentication.keys
    comodel_name='fds.authentication.keys' help='select one key' required=True string='Copy authentication key:'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('done', 'Done')]
Public methods (2)
  • back_button(self)
    @api.multi
    go back to copy view. Called by pressing "Make another copy" button. :returns action: configuration for the next wizard's view
  • copy_button(self)
    @api.multi
    copy an authentication key to another user. Called by pressing copy button. :returns action: configuration for the next wizard's view

New fields (8)
  • fds_authentication_keys_id Many2one → fds.authentication.keys
    comodel_name='fds.authentication.keys' help='[info] keep one recored of the model fds_authentication_key' readonly=True string='FDS authentication keys'
  • ppk_filename Char
    help='private key filename' readonly=True related='fds_authentication_keys_id.ppk_filename' string='Private key Filename'
  • private_key_crypted Binary
    help='private key crypted generated' readonly=True related='fds_authentication_keys_id.private_key_crypted' string='Private key crypted'
  • pub_filename Char
    help='public key filename' readonly=True related='fds_authentication_keys_id.pub_filename' string='Public key Filename'
  • public_key Binary
    help='public key generated' readonly=True related='fds_authentication_keys_id.public_key' string='Public key'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('generate', 'Generate'), ('done', 'Done')]
  • user_id Many2one → res.users
    comodel_name='res.users' help='assign the key to the user selected' required=True string='User'
  • user_name Char
    help='user previously selected' readonly=True related='fds_authentication_keys_id.user_id.name'
Public methods (6)
  • cancel_keys_button(self)
    @api.multi
    Remove public and private key saved in the database. Called by pressing cancel button. :returns action: close the wizard's view
  • confirm_keys_button(self)
    @api.multi
    Confirm the generated keys. Called by pressing confirm button. :returns action: configuration for the next wizard's view
  • generate_keys_button(self)
    @api.multi
    Generate public and private crypted key then save in the database. Called by pressing generate button. :returns action: configuration for the next wizard's view
  • savekeys(self, publicKey, private_key_crypted)
    @api.multi
    Save in the database the public and private creyted key :param str publicKey: generate by RSA :param str private_key_crypted: generate and crypted by RSA :returns action: None :raises Warning: - if the state of the wizard do not exist - if more than one FDS account selected
  • send_keys_button(self)
    @api.multi
    Send the public key to the FDS Postfinance by mail which will allow the selected user to connect to the SFTP using his private key. Called by pressing send button.
  • userkey_exist(self)
    @api.multi
    check if the authentication key already exist for the selected user :returns record: record of the model fds.authentication.keys :raises Warning: if user has already a key

New fields (4)
  • private_key_import_file Binary
    help='select one file that contain your private key' string='Private key'
  • private_key_import_txt Text
    help='copy/paste your private key' string='Private key'
  • public_key_import_file Binary
    help='select one file that contain your public key' string='Public key'
  • public_key_import_txt Text
    help='copy/paste your public key' string='Public key'
Public methods (1)
  • import_keys_button(self)
    @api.multi
    Import public and private key then save in the database. Called by pressing import button. :returns action: configuration for the next wizard's view :raises Warning: if missing input information

New fields (8)
  • authentication_key_ids One2many → fds.authentication.keys
    comodel_name='fds.authentication.keys' inverse_name='fds_account_id' string='Authentication keys'
  • directory_ids One2many → fds.postfinance.directory
    comodel_name='fds.postfinance.directory' inverse_name='fds_account_id' string='FDS postfinance directories'
  • fds_file_ids One2many → fds.postfinance.file
    comodel_name='fds.postfinance.file' help='downloaded files from sftp' inverse_name='fds_account_id' readonly=True string='FDS Postfinance files'
  • hostname Char
    default='fdsbc.post.ch' required=True string='SFTP Hostname'
  • name Char
    required=True
  • postfinance_email Char
    default='fds@post.ch' help='E-mail of FDS Postfinance' required=True
  • user_id Many2one → res.users
    comodel_name='res.users' help='Owner must have the rights to register new key pairs for this account. Its e-mail address will be used to send the keys of new users to PostFinance' ondelete='restrict' required=True string='Account Owner'
  • username Char
    required=True string='SFTP Username'
Public methods (5)
  • copy_key_button(self)
    @api.multi
    copy an authentication key to another user. :returns action: popup fds key clone wizard
  • import_files_cron(self)
    @api.model
    Import files for all Accounts defined. :return: True
  • import_key_button(self)
    @api.multi
    import an authentication key to a user. :returns action: popup fds key import wizard
  • newKey_button(self)
    @api.multi
    generate a new authentication key to a user. :returns action: popup fds key generator wizard
  • verify_directories_button(self)
    @api.multi
    test connection and verify if directories are the same in the DB :returns None: :raises Warning: - if current user do not have key - if unable to connect to sftp

New fields (6)
  • allow_download_file Boolean
    default=False help='check it to allow download files from this FDS directory' string='Allow download file?'
  • allow_upload_file Boolean
    default=False help='check it to allow upload files to this FDS directory' string='Allow upload file?'
  • excluded_files Char
    default='camt052' help="Semicolon (;) separated patterns. If a filename matches one of the given patterns, the file won't be downloaded from the remote directory."
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' ondelete='restrict' readonly=True string='FDS account'
  • name Char
    readonly=True string='Directory name'
  • still_on_server Boolean
    default=True help='[info] if the directory still exist on the FDS sftp' readonly=True string='Directory still on server?'
Public methods (0)

No public methods.

New fields (7)
  • bank_statement_id Many2one → account.bank.statement
    comodel_name='account.bank.statement' ondelete='restrict' readonly=True string='Bank Statement'
  • data Binary
    help='the downloaded file data' readonly=True
  • directory_id Many2one → fds.postfinance.directory
    ondelete='restrict' readonly=True string='Directory' args: 'fds.postfinance.directory'
  • error_message Text
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' help='related FDS account' ondelete='restrict' readonly=True string='FDS account'
  • filename Char
    readonly=True
  • state Selection
    default='draft' help='state of file' readonly=True selection=[('draft', 'Draft'), ('done', 'Done'), ('error', 'Error'), ('cancel', 'Cancelled')]
Public methods (5)
  • change2cancel_button(self)
    @api.multi
    Put file in cancel state. Called by pressing 'cancel' button. :return None:
  • change2draft_button(self)
    @api.multi
    undo the file is corrupt to state draft. Called by pressing 'cancel corrupt file' button. :return None:
  • change2error_button(self)
    @api.multi
    change the state of the file to error because the file is corrupt. Called by pressing 'corrupt file?' button. :return None:
  • import2bankStatements(self)
    @api.multi
    convert the file to a record of model bankStatment. :returns bool: - True if the convert was succeed - False otherwise
  • import_button(self)
    @api.multi
    convert the file to record of model bankStatment. Called by pressing import button. :return None:
REPOSITORY
REPOSITORYOCA/l10n-switzerland
GIT
GIThttps://github.com/OCA/l10n-switzerland.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-switzerland/tree/9.0/l10n_ch_fds_postfinance
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Compassion CH
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Compassion CH
COMMITTERS
COMMITTERSStéphane Bidoul (ACSONE), OCA Transbot, Emanuel Cino, oca-travis, Weblate, OCA-git-bot, Philipp Hug
WEBSITE
WEBSITEhttp://www.compassion.ch/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - report
    - analytic
    - web_tip
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Crypto
pysftp
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (10)
XML IDNameModelTypeStatus
fds_authentication_keys_form FDS authentication keys form fds.authentication.keys form New
fds_postfinance_file_search fds.postfinance.file.select fds.postfinance.file search New
fds_postfinance_file_tree fds.postfinance.file.tree fds.postfinance.file tree New
fds_postfinance_files_form FDS PostFinance file form fds.postfinance.file form New
view_fds_files_import_tobankstatments_wizard_form Download FDS Files fds.files.import.tobankstatments.wizard form New
view_fds_key_clone_wizard_form FDS key clone wizard view fds.key.clone.wizard form New
view_fds_key_generator_wizard_form FDS key generator wizard view fds.key.generator.wizard form New
view_fds_key_import_wizard_form FDS key import wizard view fds.key.import.wizard form New
view_fds_postfinance_account_form fds.postfinance.account.form fds.postfinance.account form New
view_fds_postfinance_account_tree fds.postfinance.account.tree fds.postfinance.account tree New
Models touched (8)

New fields (7)
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' ondelete='restrict' readonly=True string='FDS account'
  • key_active Boolean
    default=True
  • ppk_filename Char
    readonly=True string='Private key filename'
  • private_key_crypted Binary
    readonly=True string='Private key crypted'
  • pub_filename Char
    readonly=True string='Public key filename'
  • public_key Binary
    readonly=True
  • user_id Many2one → res.users
    comodel_name='res.users' ondelete='restrict' readonly=True string='User'
Public methods (4)
  • clone_key_to(self, user)
    @api.multi
    create a new record with the same key :params record: of model res.users :return record: of model fds.authentication.key
  • config(self)
    @api.multi
    Configuration RSA: password to encrypt the private key. Note: the password must be add in the odoo config file (ie. ssh_pwd = *****) :returns str: the pass key that allow to decrypt the private key
  • generate_pairkey(self, bits=4096)
    @api.multi
    generate the RSA key pair. :returns (str, str): public key and private key crypted
  • import_pairkey(self, public_key, private_key)
    @api.multi
    import and crypte private key. :returns (str, str): public key and private key crypted

New fields (6)
  • fds_account_id Many2one → fds.postfinance.account
    default=<expr> required=True args: 'fds.postfinance.account', 'FDS Account'
  • msg_exist_file Char
    default='' readonly=True args: 'Files already existing'
  • msg_file_imported Char
    default='' readonly=True args: 'Imported files'
  • msg_import_file_fail Char
    default='' readonly=True args: 'File import failures'
  • msg_import_file_ignore Char
    default='' readonly=True args: 'Files ignored'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('done', 'Done'), ('error', 'Error Permission'), ('errorSFTP', 'Error SFTP')]
Public methods (1)
  • import_button(self)
    @api.multi
    download the file from the sftp where the directories were selected in the FDS configuration, and if possible import to bank Statments. Called by pressing import button. :returns action: configuration for the next wizard's view

New fields (3)
  • des_user_id Many2one → res.users
    comodel_name='res.users' help='assign the key to the user selected' required=True string='To:'
  • src_user_key_id Many2one → fds.authentication.keys
    comodel_name='fds.authentication.keys' help='select one key' required=True string='Copy authentication key:'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('done', 'Done')]
Public methods (2)
  • back_button(self)
    @api.multi
    go back to copy view. Called by pressing "Make another copy" button. :returns action: configuration for the next wizard's view
  • copy_button(self)
    @api.multi
    copy an authentication key to another user. Called by pressing copy button. :returns action: configuration for the next wizard's view

New fields (8)
  • fds_authentication_keys_id Many2one → fds.authentication.keys
    comodel_name='fds.authentication.keys' help='[info] keep one recored of the model fds_authentication_key' readonly=True string='FDS authentication keys'
  • ppk_filename Char
    help='private key filename' readonly=True related='fds_authentication_keys_id.ppk_filename' string='Private key Filename'
  • private_key_crypted Binary
    help='private key crypted generated' readonly=True related='fds_authentication_keys_id.private_key_crypted' string='Private key crypted'
  • pub_filename Char
    help='public key filename' readonly=True related='fds_authentication_keys_id.pub_filename' string='Public key Filename'
  • public_key Binary
    help='public key generated' readonly=True related='fds_authentication_keys_id.public_key' string='Public key'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('generate', 'Generate'), ('done', 'Done')]
  • user_id Many2one → res.users
    comodel_name='res.users' help='assign the key to the user selected' required=True string='User'
  • user_name Char
    help='user previously selected' readonly=True related='fds_authentication_keys_id.user_id.name'
Public methods (6)
  • cancel_keys_button(self)
    @api.multi
    Remove public and private key saved in the database. Called by pressing cancel button. :returns action: close the wizard's view
  • confirm_keys_button(self)
    @api.multi
    Confirm the generated keys. Called by pressing confirm button. :returns action: configuration for the next wizard's view
  • generate_keys_button(self)
    @api.multi
    Generate public and private crypted key then save in the database. Called by pressing generate button. :returns action: configuration for the next wizard's view
  • savekeys(self, publicKey, private_key_crypted)
    @api.multi
    Save in the database the public and private creyted key :param str publicKey: generate by RSA :param str private_key_crypted: generate and crypted by RSA :returns action: None :raises Warning: - if the state of the wizard do not exist - if more than one FDS account selected
  • send_keys_button(self)
    @api.multi
    Send the public key to the FDS Postfinance by mail which will allow the selected user to connect to the SFTP using his private key. Called by pressing send button.
  • userkey_exist(self)
    @api.multi
    check if the authentication key already exist for the selected user :returns record: record of the model fds.authentication.keys :raises Warning: if user has already a key

New fields (4)
  • private_key_import_file Binary
    help='select one file that contain your private key' string='Private key'
  • private_key_import_txt Text
    help='copy/paste your private key' string='Private key'
  • public_key_import_file Binary
    help='select one file that contain your public key' string='Public key'
  • public_key_import_txt Text
    help='copy/paste your public key' string='Public key'
Public methods (1)
  • import_keys_button(self)
    @api.multi
    Import public and private key then save in the database. Called by pressing import button. :returns action: configuration for the next wizard's view :raises Warning: if missing input information

New fields (8)
  • authentication_key_ids One2many → fds.authentication.keys
    comodel_name='fds.authentication.keys' inverse_name='fds_account_id' string='Authentication keys'
  • directory_ids One2many → fds.postfinance.directory
    comodel_name='fds.postfinance.directory' inverse_name='fds_account_id' string='FDS postfinance directories'
  • fds_file_ids One2many → fds.postfinance.file
    comodel_name='fds.postfinance.file' help='downloaded files from sftp' inverse_name='fds_account_id' readonly=True string='FDS Postfinance files'
  • hostname Char
    default='fdsbc.post.ch' required=True string='SFTP Hostname'
  • name Char
    required=True
  • postfinance_email Char
    default='fds@post.ch' help='E-mail of FDS Postfinance' required=True
  • user_id Many2one → res.users
    comodel_name='res.users' help='Owner must have the rights to register new key pairs for this account. Its e-mail address will be used to send the keys of new users to PostFinance' ondelete='restrict' required=True string='Account Owner'
  • username Char
    required=True string='SFTP Username'
Public methods (5)
  • copy_key_button(self)
    @api.multi
    copy an authentication key to another user. :returns action: popup fds key clone wizard
  • import_files_cron(self)
    @api.model
    Import files for all Accounts defined. :return: True
  • import_key_button(self)
    @api.multi
    import an authentication key to a user. :returns action: popup fds key import wizard
  • newKey_button(self)
    @api.multi
    generate a new authentication key to a user. :returns action: popup fds key generator wizard
  • verify_directories_button(self)
    @api.multi
    test connection and verify if directories are the same in the DB :returns None: :raises Warning: - if current user do not have key - if unable to connect to sftp

New fields (6)
  • allow_download_file Boolean
    default=False help='check it to allow download files from this FDS directory' string='Allow download file?'
  • allow_upload_file Boolean
    default=False help='check it to allow upload files to this FDS directory' string='Allow upload file?'
  • excluded_files Char
    default='camt052' help="Semicolon (;) separated patterns. If a filename matches one of the given patterns, the file won't be downloaded from the remote directory."
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' ondelete='restrict' readonly=True string='FDS account'
  • name Char
    readonly=True string='Directory name'
  • still_on_server Boolean
    default=True help='[info] if the directory still exist on the FDS sftp' readonly=True string='Directory still on server?'
Public methods (0)

No public methods.

New fields (6)
  • bank_statement_id Many2one → account.bank.statement
    comodel_name='account.bank.statement' ondelete='restrict' readonly=True string='Bank Statement'
  • data Binary
    help='the downloaded file data' readonly=True
  • directory_id Many2one → fds.postfinance.directory
    ondelete='restrict' readonly=True string='Directory' args: 'fds.postfinance.directory'
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' help='related FDS account' ondelete='restrict' readonly=True string='FDS account'
  • filename Char
    readonly=True
  • state Selection
    default='draft' help='state of file' readonly=True selection=[('draft', 'Draft'), ('done', 'Done'), ('error', 'Error'), ('cancel', 'Cancelled')]
Public methods (5)
  • change2cancel_button(self)
    @api.multi
    Put file in cancel state. Called by pressing 'cancel' button. :return None:
  • change2draft_button(self)
    @api.multi
    undo the file is corrupt to state draft. Called by pressing 'cancel corrupt file' button. :return None:
  • change2error_button(self)
    @api.multi
    change the state of the file to error because the file is corrupt. Called by pressing 'corrupt file?' button. :return None:
  • import2bankStatements(self)
    @api.multi
    convert the file to a record of model bankStatment. :returns bool: - True if the convert was succeed - False otherwise
  • import_button(self)
    @api.multi
    convert the file to record of model bankStatment. Called by pressing import button. :return None:
REPOSITORY
REPOSITORYOCA/l10n-switzerland
GIT
GIThttps://github.com/OCA/l10n-switzerland.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-switzerland/tree/8.0/l10n_ch_fds_postfinance
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Compassion CH
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Compassion CH
COMMITTERS
COMMITTERSGitHub, Stéphane Bidoul (ACSONE), OCA Transbot, Emanuel Cino, OCA-git-bot
WEBSITE
WEBSITEhttp://www.compassion.ch/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:28
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/bank-statement-import:
    - account_bank_statement_import_camt
    - account_bank_statement_import
OCA/l10n-switzerland:
    - l10n_ch_account_statement_base_import
odoo/odoo:
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - report
    - analytic
    - board
    - edi
    - email_template
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Crypto
pysftp
wand
xlrd
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (10)
XML IDNameModelTypeStatus
fds_authentication_keys_form FDS authentication keys form fds.authentication.keys form New
fds_postfinance_file_search fds.postfinance.file.select fds.postfinance.file search New
fds_postfinance_file_tree fds.postfinance.file.tree fds.postfinance.file tree New
fds_postfinance_files_form FDS PostFinance file form fds.postfinance.file form New
view_fds_files_import_tobankstatments_wizard_form Download FDS Files fds.files.import.tobankstatments.wizard form New
view_fds_key_clone_wizard_form FDS key clone wizard view fds.key.clone.wizard form New
view_fds_key_generator_wizard_form FDS key generator wizard view fds.key.generator.wizard form New
view_fds_key_import_wizard_form FDS key import wizard view fds.key.import.wizard form New
view_fds_postfinance_account_form fds.postfinance.account.form fds.postfinance.account form New
view_fds_postfinance_account_tree fds.postfinance.account.tree fds.postfinance.account tree New
Models touched (8)

New fields (7)
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' ondelete='restrict' readonly=True string='FDS account'
  • key_active Boolean
    default=True
  • ppk_filename Char
    readonly=True string='Private key filename'
  • private_key_crypted Binary
    readonly=True string='Private key crypted'
  • pub_filename Char
    readonly=True string='Public key filename'
  • public_key Binary
    readonly=True
  • user_id Many2one → res.users
    comodel_name='res.users' ondelete='restrict' readonly=True string='User'
Public methods (4)
  • clone_key_to(self, user)
    @api.multi
    create a new record with the same key :params record: of model res.users :return record: of model fds.authentication.key
  • config(self)
    @api.multi
    Configuration RSA: password to encrypt the private key. Note: the password must be add in the odoo config file (ie. ssh_pwd = *****) :returns str: the pass key that allow to decrypt the private key
  • generate_pairkey(self, bits=4096)
    @api.multi
    generate the RSA key pair. :returns (str, str): public key and private key crypted
  • import_pairkey(self, public_key, private_key)
    @api.multi
    import and crypte private key. :returns (str, str): public key and private key crypted

New fields (6)
  • fds_account_id Many2one → fds.postfinance.account
    default=<expr> required=True args: 'fds.postfinance.account', 'FDS Account'
  • msg_exist_file Char
    default='' readonly=True args: 'Files already existing'
  • msg_file_imported Char
    default='' readonly=True args: 'Imported files'
  • msg_import_file_fail Char
    default='' readonly=True args: 'File import failures'
  • msg_import_file_ignore Char
    default='' readonly=True args: 'Files ignored'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('done', 'Done'), ('error', 'Error Permission'), ('errorSFTP', 'Error SFTP')]
Public methods (1)
  • import_button(self)
    @api.multi
    download the file from the sftp where the directories were selected in the FDS configuration, and if possible import to bank Statments. Called by pressing import button. :returns action: configuration for the next wizard's view

New fields (3)
  • des_user_id Many2one → res.users
    comodel_name='res.users' help='assign the key to the user selected' required=True string='To:'
  • src_user_key_id Many2one → fds.authentication.keys
    comodel_name='fds.authentication.keys' help='select one key' required=True string='Copy authentication key:'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('done', 'Done')]
Public methods (2)
  • back_button(self)
    @api.multi
    go back to copy view. Called by pressing "Make another copy" button. :returns action: configuration for the next wizard's view
  • copy_button(self)
    @api.multi
    copy an authentication key to another user. Called by pressing copy button. :returns action: configuration for the next wizard's view

New fields (8)
  • fds_authentication_keys_id Many2one → fds.authentication.keys
    comodel_name='fds.authentication.keys' help='[info] keep one recored of the model fds_authentication_key' readonly=True string='FDS authentication keys'
  • ppk_filename Char
    help='private key filename' readonly=True related='fds_authentication_keys_id.ppk_filename' string='Private key Filename'
  • private_key_crypted Binary
    help='private key crypted generated' readonly=True related='fds_authentication_keys_id.private_key_crypted' string='Private key crypted'
  • pub_filename Char
    help='public key filename' readonly=True related='fds_authentication_keys_id.pub_filename' string='Public key Filename'
  • public_key Binary
    help='public key generated' readonly=True related='fds_authentication_keys_id.public_key' string='Public key'
  • state Selection
    default='default' help='[Info] keep state of the wizard' readonly=True selection=[('default', 'Default'), ('generate', 'Generate'), ('done', 'Done')]
  • user_id Many2one → res.users
    comodel_name='res.users' help='assign the key to the user selected' required=True string='User'
  • user_name Char
    help='user previously selected' readonly=True related='fds_authentication_keys_id.user_id.name'
Public methods (6)
  • cancel_keys_button(self)
    @api.multi
    Remove public and private key saved in the database. Called by pressing cancel button. :returns action: close the wizard's view
  • confirm_keys_button(self)
    @api.multi
    Confirm the generated keys. Called by pressing confirm button. :returns action: configuration for the next wizard's view
  • generate_keys_button(self)
    @api.multi
    Generate public and private crypted key then save in the database. Called by pressing generate button. :returns action: configuration for the next wizard's view
  • savekeys(self, publicKey, private_key_crypted)
    @api.multi
    Save in the database the public and private creyted key :param str publicKey: generate by RSA :param str private_key_crypted: generate and crypted by RSA :returns action: None :raises Warning: - if the state of the wizard do not exist - if more than one FDS account selected
  • send_keys_button(self)
    @api.multi
    Send the public key to the FDS Postfinance by mail which will allow the selected user to connect to the SFTP using his private key. Called by pressing send button.
  • userkey_exist(self)
    @api.multi
    check if the authentication key already exist for the selected user :returns record: record of the model fds.authentication.keys :raises Warning: if user has already a key

New fields (4)
  • private_key_import_file Binary
    help='select one file that contain your private key' string='Private key'
  • private_key_import_txt Text
    help='copy/paste your private key' string='Private key'
  • public_key_import_file Binary
    help='select one file that contain your public key' string='Public key'
  • public_key_import_txt Text
    help='copy/paste your public key' string='Public key'
Public methods (1)
  • import_keys_button(self)
    @api.multi
    Import public and private key then save in the database. Called by pressing import button. :returns action: configuration for the next wizard's view :raises Warning: if missing input information

New fields (8)
  • authentication_key_ids One2many → fds.authentication.keys
    comodel_name='fds.authentication.keys' inverse_name='fds_account_id' string='Authentication keys'
  • directory_ids One2many → fds.postfinance.directory
    comodel_name='fds.postfinance.directory' inverse_name='fds_account_id' string='FDS postfinance directories'
  • fds_file_ids One2many → fds.postfinance.file
    comodel_name='fds.postfinance.file' help='downloaded files from sftp' inverse_name='fds_account_id' readonly=True string='FDS Postfinance files'
  • hostname Char
    default='fdsbc.post.ch' required=True string='SFTP Hostname'
  • name Char
    required=True
  • postfinance_email Char
    default='fds@post.ch' help='E-mail of FDS Postfinance' required=True
  • user_id Many2one → res.users
    comodel_name='res.users' help='Owner must have the rights to register new key pairs for this account. Its e-mail address will be used to send the keys of new users to PostFinance' ondelete='restrict' required=True string='Account Owner'
  • username Char
    required=True string='SFTP Username'
Public methods (4)
  • copy_key_button(self)
    @api.multi
    copy an authentication key to another user. :returns action: popup fds key clone wizard
  • import_key_button(self)
    @api.multi
    import an authentication key to a user. :returns action: popup fds key import wizard
  • newKey_button(self)
    @api.multi
    generate a new authentication key to a user. :returns action: popup fds key generator wizard
  • verify_directories_button(self)
    @api.multi
    test connection and verify if directories are the same in the DB :returns None: :raises Warning: - if current user do not have key - if unable to connect to sftp

New fields (7)
  • allow_download_file Boolean
    default=False help='check it to allow download files from this FDS directory' string='Allow download file?'
  • allow_upload_file Boolean
    default=False help='check it to allow upload files to this FDS directory' string='Allow upload file?'
  • excluded_files Char
    default='' help="Semicolon (;) separated patterns. If a filename matches one of the given patterns, the file won't be downloaded from the remote directory."
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' ondelete='restrict' readonly=True string='FDS account'
  • journal_id Many2one → account.journal
    comodel_name='account.journal' help='default journal needed to import to bank statements' string='Journal'
  • name Char
    readonly=True string='Directory name'
  • still_on_server Boolean
    default=True help='[info] if the directory still exist on the FDS sftp' readonly=True string='Directory still on server?'
Public methods (0)

No public methods.

New fields (7)
  • bank_statement_id Many2one → account.bank.statement
    comodel_name='account.bank.statement' ondelete='restrict' readonly=True string='Bank Statement'
  • data Binary
    help='the downloaded file data' readonly=True
  • directory_id Many2one → fds.postfinance.directory
    ondelete='restrict' readonly=True string='Directory' args: 'fds.postfinance.directory'
  • fds_account_id Many2one → fds.postfinance.account
    comodel_name='fds.postfinance.account' help='related FDS account' ondelete='restrict' readonly=True string='FDS account'
  • filename Char
    readonly=True
  • journal_id Many2one → account.journal
    comodel_name='account.journal' help='default journal for this file' ondelete='restrict' related='directory_id.journal_id' string='journal'
  • state Selection
    default='draft' help='state of file' readonly=True selection=[('draft', 'Draft'), ('done', 'Done'), ('error', 'Error'), ('cancel', 'Cancelled')]
Public methods (5)
  • change2cancel_button(self)
    @api.multi
    Put file in cancel state. Called by pressing 'cancel' button. :return None:
  • change2draft_button(self)
    @api.multi
    undo the file is corrupt to state draft. Called by pressing 'cancel corrupt file' button. :return None:
  • change2error_button(self)
    @api.multi
    change the state of the file to error because the file is corrupt. Called by pressing 'corrupt file?' button. :return None:
  • import2bankStatements(self)
    @api.one
    convert the file to a record of model bankStatment. :returns bool: - True if the convert was succeed - False otherwise
  • import_button(self)
    @api.multi
    convert the file to record of model bankStatment. Called by pressing import button. :return None: