mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
131
account_statement_import_online/README.rst
Normal file
131
account_statement_import_online/README.rst
Normal file
@@ -0,0 +1,131 @@
|
||||
======================
|
||||
Online Bank Statements
|
||||
======================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Beta
|
||||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import_online
|
||||
:alt: OCA/bank-statement-import
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/bank-statement-import-14-0/bank-statement-import-14-0-account_statement_import_online
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/174/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module provides base for building online bank statements providers.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
To configure online bank statements provider:
|
||||
|
||||
#. Go to *Invoicing > Configuration > Bank Accounts*
|
||||
#. Open bank account to configure and edit it
|
||||
#. Set *Bank Feeds* to *Online*
|
||||
#. Select online bank statements provider in *Online Bank Statements (OCA)*
|
||||
section
|
||||
#. Save the bank account
|
||||
#. Click on provider and configure provider-specific settings.
|
||||
|
||||
or, alternatively:
|
||||
|
||||
#. Go to *Invoicing > Overview*
|
||||
#. Open settings of the corresponding journal account
|
||||
#. Switch to *Bank Account* tab
|
||||
#. Set *Bank Feeds* to *Online*
|
||||
#. Select online bank statements provider in *Online Bank Statements (OCA)*
|
||||
section
|
||||
#. Save the bank account
|
||||
#. Click on provider and configure provider-specific settings.
|
||||
|
||||
If you want to allow empty bank statements to be created every time the
|
||||
information is pulled, you can check the option "Allow empty statements"
|
||||
at the provider configuration level.
|
||||
|
||||
**NOTE**: To access these features, user needs to belong to
|
||||
*Show Full Accounting Features* group.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To pull historical bank statements:
|
||||
|
||||
#. Go to *Invoicing > Configuration > Bank Accounts*
|
||||
#. Select specific bank accounts
|
||||
#. Launch *Actions > Online Bank Statements Pull Wizard*
|
||||
#. Configure date interval and click *Pull*
|
||||
|
||||
**NOTE**: To access these features, user needs to belong to
|
||||
*Show Full Accounting Features* group.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-statement-import/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_online%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
|
||||
~~~~~~~
|
||||
|
||||
* CorporateHub
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* `CorporateHub <https://corporatehub.eu/>`__
|
||||
|
||||
* Alexey Pelykh <alexey.pelykh@corphub.eu>
|
||||
|
||||
* `Therp BV <https://therp.nl/>`__
|
||||
|
||||
* Ronald Portier <ronald@therp.nl>
|
||||
|
||||
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.
|
||||
|
||||
.. |maintainer-alexey-pelykh| image:: https://github.com/alexey-pelykh.png?size=40px
|
||||
:target: https://github.com/alexey-pelykh
|
||||
:alt: alexey-pelykh
|
||||
|
||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-alexey-pelykh|
|
||||
|
||||
This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import_online>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
4
account_statement_import_online/__init__.py
Normal file
4
account_statement_import_online/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import models
|
||||
from . import wizards
|
||||
31
account_statement_import_online/__manifest__.py
Normal file
31
account_statement_import_online/__manifest__.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
# Copyright 2020 CorporateHub (https://corporatehub.eu)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Online Bank Statements",
|
||||
"version": "15.0.1.0.0",
|
||||
"author": "CorporateHub, Odoo Community Association (OCA)",
|
||||
"maintainers": ["alexey-pelykh"],
|
||||
"website": "https://github.com/OCA/bank-statement-import",
|
||||
"license": "AGPL-3",
|
||||
"category": "Accounting",
|
||||
"summary": "Online bank statements update",
|
||||
"external_dependencies": {"python": ["odoo_test_helper"]},
|
||||
"depends": [
|
||||
"account",
|
||||
"account_statement_import",
|
||||
"web_widget_dropdown_dynamic",
|
||||
],
|
||||
"data": [
|
||||
"data/account_statement_import_online.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"security/online_bank_statement_provider.xml",
|
||||
"wizards/online_bank_statement_pull_wizard.xml",
|
||||
"views/actions.xml",
|
||||
"views/account_journal.xml",
|
||||
"views/account_bank_statement_line.xml",
|
||||
"views/online_bank_statement_provider.xml",
|
||||
],
|
||||
"installable": True,
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
|
||||
Copyright 2019 Dataplug (https://dataplug.io)
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo noupdate="1">
|
||||
<record model="ir.cron" id="ir_cron_account_pull_online_bank_statements">
|
||||
<field name="name">Pull Online Bank Statements</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">hours</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="state">code</field>
|
||||
<field name="nextcall">2019-01-01 00:10:00</field>
|
||||
<field name="doall" eval="False" />
|
||||
<field
|
||||
name="model_id"
|
||||
ref="account_statement_import_online.model_online_bank_statement_provider"
|
||||
/>
|
||||
<field name="code">model._scheduled_pull()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,520 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_statement_import_online
|
||||
#
|
||||
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: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "%(number)s %(type)s"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_needaction
|
||||
msgid "Action Needed"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__active
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__allow_empty_statements
|
||||
msgid "Allow empty statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__api_base
|
||||
msgid "Api Base"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Archived"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_attachment_count
|
||||
msgid "Attachment Count"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_account_bank_statement_line
|
||||
msgid "Bank Statement Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_pull_wizard_form
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate
|
||||
msgid "Certificate"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_chain
|
||||
msgid "Certificate Chain"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_private_key
|
||||
msgid "Certificate Private Key"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_public_key
|
||||
msgid "Certificate Public Key"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__company_id
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__company_id
|
||||
msgid "Company related to this journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__create_uid
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__create_uid
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__create_date
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__create_date
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__currency_id
|
||||
msgid "Currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__daily
|
||||
msgid "Daily statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__days
|
||||
msgid "Day(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Failed to obtain statement data for period since %s until %s: %s. See server"
|
||||
" logs for more details."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_follower_ids
|
||||
msgid "Followers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_channel_ids
|
||||
msgid "Followers (Channels)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_partner_ids
|
||||
msgid "Followers (Partners)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__date_since
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__hours
|
||||
msgid "Hour(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_needaction
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_unread
|
||||
msgid "If checked, new messages require your attention."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_error
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_sms_error
|
||||
msgid "If checked, some messages have a delivery error."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
#, python-format
|
||||
msgid "Inactive"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__interval_type
|
||||
msgid "Interval Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_is_follower
|
||||
msgid "Is Follower"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "Issue with Online Bank Statement Provider"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_account_journal
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__journal_id
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__key
|
||||
msgid "Key"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__write_uid
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__write_date
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__last_successful_run
|
||||
msgid "Last successful pull"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_main_attachment_id
|
||||
msgid "Main Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_error
|
||||
msgid "Message Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_ids
|
||||
msgid "Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__minutes
|
||||
msgid "Minute(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__monthly
|
||||
msgid "Monthly statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "N/A"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__name
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__next_run
|
||||
msgid "Next scheduled pull"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_needaction_counter
|
||||
msgid "Number of Actions"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_error_counter
|
||||
msgid "Number of errors"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_needaction_counter
|
||||
msgid "Number of messages which requires an action"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_error_counter
|
||||
msgid "Number of messages with delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_unread_counter
|
||||
msgid "Number of unread messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/account_journal.py:0
|
||||
#, python-format
|
||||
msgid "Online (OCA)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_online_bank_statement_provider
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__online_bank_statement_provider
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Online Bank Statement Provider"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.act_window,name:account_statement_import_online.online_bank_statement_provider_action
|
||||
#: model:ir.ui.menu,name:account_statement_import_online.online_bank_statement_provider_menu
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
msgid "Online Bank Statement Providers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_online_bank_statement_pull_wizard
|
||||
msgid "Online Bank Statement Pull Wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Online Bank Statements (OCA)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.act_window,name:account_statement_import_online.action_online_bank_statements_pull_wizard
|
||||
msgid "Online Bank Statements Pull Wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__online_raw_data
|
||||
msgid "Online Raw Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.constraint,message:account_statement_import_online.constraint_online_bank_statement_provider_journal_id_uniq
|
||||
msgid "Only one online banking statement provider per journal!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__origin
|
||||
msgid "Origin"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__passphrase
|
||||
msgid "Passphrase"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__password
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Provider"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__provider_ids
|
||||
msgid "Providers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_pull_wizard_form
|
||||
msgid "Pull"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Pull Online Bank Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.server,name:account_statement_import_online.ir_cron_account_pull_online_bank_statements_ir_actions_server
|
||||
#: model:ir.cron,cron_name:account_statement_import_online.ir_cron_account_pull_online_bank_statements
|
||||
#: model:ir.cron,name:account_statement_import_online.ir_cron_account_pull_online_bank_statements
|
||||
msgid "Pull Online Bank Statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_bank_statement_line_form
|
||||
msgid "Raw Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_sms_error
|
||||
msgid "SMS Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__account_number
|
||||
msgid "Sanitized Account Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Scheduled Pull"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__interval_number
|
||||
msgid "Scheduled update interval"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.constraint,message:account_statement_import_online.constraint_online_bank_statement_provider_valid_interval_number
|
||||
msgid "Scheduled update interval must be greater than zero!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_journal__online_bank_statement_provider_id
|
||||
msgid ""
|
||||
"Select the actual instance of a configured provider (a record).\n"
|
||||
"Selecting a type of provider will automatically create a provider record linked to this journal."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_journal__online_bank_statement_provider
|
||||
msgid "Select the type of service provider (a model)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__service
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
msgid "Service"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__statement_creation_mode
|
||||
msgid "Statement Creation Mode"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__online_bank_statement_provider_id
|
||||
msgid "Statement Provider"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_bank_statement_line__online_raw_data
|
||||
msgid "The complete data retrieved online for this transaction"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__currency_id
|
||||
msgid "The currency used to enter statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__tz
|
||||
msgid "Timezone"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__tz
|
||||
msgid ""
|
||||
"Timezone to convert transaction timestamps to prior being saved into a "
|
||||
"statement."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__date_until
|
||||
msgid "To"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_unread
|
||||
msgid "Unread Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_unread_counter
|
||||
msgid "Unread Messages Counter"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__update_schedule
|
||||
msgid "Update Schedule"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__username
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__website_message_ids
|
||||
msgid "Website Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__website_message_ids
|
||||
msgid "Website communication history"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__weeks
|
||||
msgid "Week(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__weekly
|
||||
msgid "Weekly statements"
|
||||
msgstr ""
|
||||
524
account_statement_import_online/i18n/it.po
Normal file
524
account_statement_import_online/i18n/it.po
Normal file
@@ -0,0 +1,524 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_statement_import_online
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2021-11-25 17:36+0000\n"
|
||||
"Last-Translator: Sergio Zanchetta <primes2h@gmail.com>\n"
|
||||
"Language-Team: none\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"
|
||||
"X-Generator: Weblate 4.3.2\n"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "%(number)s %(type)s"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_needaction
|
||||
msgid "Action Needed"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__active
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__allow_empty_statements
|
||||
msgid "Allow empty statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__api_base
|
||||
msgid "Api Base"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Archived"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_attachment_count
|
||||
msgid "Attachment Count"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_account_bank_statement_line
|
||||
msgid "Bank Statement Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_pull_wizard_form
|
||||
msgid "Cancel"
|
||||
msgstr "Annulla"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate
|
||||
msgid "Certificate"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_chain
|
||||
msgid "Certificate Chain"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_private_key
|
||||
msgid "Certificate Private Key"
|
||||
msgstr "Chiave privata certificato"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_public_key
|
||||
msgid "Certificate Public Key"
|
||||
msgstr "Chiave pubblica certificato"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__company_id
|
||||
msgid "Company"
|
||||
msgstr "Azienda"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__company_id
|
||||
msgid "Company related to this journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Configuration"
|
||||
msgstr "Configurazione"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__create_uid
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__create_uid
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__create_date
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Data creazione"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__currency_id
|
||||
msgid "Currency"
|
||||
msgstr "Valuta"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__daily
|
||||
msgid "Daily statements"
|
||||
msgstr "Estratti conto giornalieri"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__days
|
||||
msgid "Day(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nome visualizzato"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Failed to obtain statement data for period since %s until %s: %s. See server "
|
||||
"logs for more details."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_follower_ids
|
||||
msgid "Followers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_channel_ids
|
||||
msgid "Followers (Channels)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_partner_ids
|
||||
msgid "Followers (Partners)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__date_since
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__hours
|
||||
msgid "Hour(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_needaction
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_unread
|
||||
msgid "If checked, new messages require your attention."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_error
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_sms_error
|
||||
msgid "If checked, some messages have a delivery error."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
#, python-format
|
||||
msgid "Inactive"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__interval_type
|
||||
msgid "Interval Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_is_follower
|
||||
msgid "Is Follower"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "Issue with Online Bank Statement Provider"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_account_journal
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__journal_id
|
||||
msgid "Journal"
|
||||
msgstr "Registro"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__key
|
||||
msgid "Key"
|
||||
msgstr "Chiave"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Ultima modifica il"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__write_uid
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Ultimo aggiornamento di"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__write_date
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Ultimo aggiornamento il"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__last_successful_run
|
||||
msgid "Last successful pull"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_main_attachment_id
|
||||
msgid "Main Attachment"
|
||||
msgstr "Allegato principale"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_error
|
||||
msgid "Message Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_ids
|
||||
msgid "Messages"
|
||||
msgstr "Messaggi"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__minutes
|
||||
msgid "Minute(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__monthly
|
||||
msgid "Monthly statements"
|
||||
msgstr "Estratti conto mensili"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "N/A"
|
||||
msgstr "N/D"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__name
|
||||
msgid "Name"
|
||||
msgstr "Nome"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__next_run
|
||||
msgid "Next scheduled pull"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_needaction_counter
|
||||
msgid "Number of Actions"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_error_counter
|
||||
msgid "Number of errors"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_needaction_counter
|
||||
msgid "Number of messages which requires an action"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_error_counter
|
||||
msgid "Number of messages with delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_unread_counter
|
||||
msgid "Number of unread messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/account_journal.py:0
|
||||
#, python-format
|
||||
msgid "Online (OCA)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_online_bank_statement_provider
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__online_bank_statement_provider
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Online Bank Statement Provider"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.act_window,name:account_statement_import_online.online_bank_statement_provider_action
|
||||
#: model:ir.ui.menu,name:account_statement_import_online.online_bank_statement_provider_menu
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
msgid "Online Bank Statement Providers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_online_bank_statement_pull_wizard
|
||||
msgid "Online Bank Statement Pull Wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Online Bank Statements (OCA)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.act_window,name:account_statement_import_online.action_online_bank_statements_pull_wizard
|
||||
msgid "Online Bank Statements Pull Wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__online_raw_data
|
||||
msgid "Online Raw Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.constraint,message:account_statement_import_online.constraint_online_bank_statement_provider_journal_id_uniq
|
||||
msgid "Only one online banking statement provider per journal!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__origin
|
||||
msgid "Origin"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__passphrase
|
||||
msgid "Passphrase"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__password
|
||||
msgid "Password"
|
||||
msgstr "Password"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Provider"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__provider_ids
|
||||
msgid "Providers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_pull_wizard_form
|
||||
msgid "Pull"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Pull Online Bank Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.server,name:account_statement_import_online.ir_cron_account_pull_online_bank_statements_ir_actions_server
|
||||
#: model:ir.cron,cron_name:account_statement_import_online.ir_cron_account_pull_online_bank_statements
|
||||
#: model:ir.cron,name:account_statement_import_online.ir_cron_account_pull_online_bank_statements
|
||||
msgid "Pull Online Bank Statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_bank_statement_line_form
|
||||
msgid "Raw Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_sms_error
|
||||
msgid "SMS Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__account_number
|
||||
msgid "Sanitized Account Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Scheduled Pull"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__interval_number
|
||||
msgid "Scheduled update interval"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.constraint,message:account_statement_import_online.constraint_online_bank_statement_provider_valid_interval_number
|
||||
msgid "Scheduled update interval must be greater than zero!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_journal__online_bank_statement_provider_id
|
||||
msgid ""
|
||||
"Select the actual instance of a configured provider (a record).\n"
|
||||
"Selecting a type of provider will automatically create a provider record "
|
||||
"linked to this journal."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_journal__online_bank_statement_provider
|
||||
msgid "Select the type of service provider (a model)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__service
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
msgid "Service"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__statement_creation_mode
|
||||
msgid "Statement Creation Mode"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__online_bank_statement_provider_id
|
||||
msgid "Statement Provider"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_bank_statement_line__online_raw_data
|
||||
msgid "The complete data retrieved online for this transaction"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__currency_id
|
||||
msgid "The currency used to enter statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__tz
|
||||
msgid "Timezone"
|
||||
msgstr "Fuso orario"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__tz
|
||||
msgid ""
|
||||
"Timezone to convert transaction timestamps to prior being saved into a "
|
||||
"statement."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__date_until
|
||||
msgid "To"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_unread
|
||||
msgid "Unread Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_unread_counter
|
||||
msgid "Unread Messages Counter"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__update_schedule
|
||||
msgid "Update Schedule"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__username
|
||||
msgid "Username"
|
||||
msgstr "Nome utente"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__website_message_ids
|
||||
msgid "Website Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__website_message_ids
|
||||
msgid "Website communication history"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__weeks
|
||||
msgid "Week(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__weekly
|
||||
msgid "Weekly statements"
|
||||
msgstr "Estratti conto settimanali"
|
||||
542
account_statement_import_online/i18n/nl.po
Normal file
542
account_statement_import_online/i18n/nl.po
Normal file
@@ -0,0 +1,542 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_statement_import_online
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2021-04-23 18:47+0000\n"
|
||||
"Last-Translator: Bosd <c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.3.2\n"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "%(number)s %(type)s"
|
||||
msgstr "%(number)s %(type)s"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_needaction
|
||||
msgid "Action Needed"
|
||||
msgstr "Actie vereist"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__active
|
||||
msgid "Active"
|
||||
msgstr "Actief"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__allow_empty_statements
|
||||
msgid "Allow empty statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__api_base
|
||||
msgid "Api Base"
|
||||
msgstr "Api Base"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Archived"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_attachment_count
|
||||
msgid "Attachment Count"
|
||||
msgstr "Aantal Bijlagen"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_account_bank_statement_line
|
||||
msgid "Bank Statement Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_pull_wizard_form
|
||||
msgid "Cancel"
|
||||
msgstr "Annuleer"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate
|
||||
msgid "Certificate"
|
||||
msgstr "Certificaat"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_chain
|
||||
msgid "Certificate Chain"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_private_key
|
||||
msgid "Certificate Private Key"
|
||||
msgstr "Certificaat privé sleutel"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__certificate_public_key
|
||||
msgid "Certificate Public Key"
|
||||
msgstr "Certificaat publieke sleutel"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__company_id
|
||||
msgid "Company"
|
||||
msgstr "Bedrijf"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__company_id
|
||||
msgid "Company related to this journal"
|
||||
msgstr "Bedrijf gerelateerd aan dit dagboek"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Configuration"
|
||||
msgstr "Configuratie"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__create_uid
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Aangemaakt door"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__create_date
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Aangemaakt op"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__currency_id
|
||||
msgid "Currency"
|
||||
msgstr "Valuta"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__daily
|
||||
msgid "Daily statements"
|
||||
msgstr "Dagelijks afschrift"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__days
|
||||
msgid "Day(s)"
|
||||
msgstr "Dag(en)"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__display_name
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Weergavenaam"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Failed to obtain statement data for period since %s until %s: %s. See server "
|
||||
"logs for more details."
|
||||
msgstr ""
|
||||
"Kon de afschriften niet verkrijgen voor de periode van %s tot %s:%s. Bekijk "
|
||||
"de error log van de server voor details."
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_follower_ids
|
||||
msgid "Followers"
|
||||
msgstr "Volgers"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_channel_ids
|
||||
msgid "Followers (Channels)"
|
||||
msgstr "Volgers (Kanalen)"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_partner_ids
|
||||
msgid "Followers (Partners)"
|
||||
msgstr "Volgers (Partners)"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__date_since
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__hours
|
||||
msgid "Hour(s)"
|
||||
msgstr "Uur/Uren"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__id
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_needaction
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_unread
|
||||
msgid "If checked, new messages require your attention."
|
||||
msgstr "Indien aangevinkt, nieuwe berichten vereisen uw aandacht."
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_error
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_sms_error
|
||||
msgid "If checked, some messages have a delivery error."
|
||||
msgstr "Indien aangevinkt, sommige berichten hebben een foutmelding."
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
#, python-format
|
||||
msgid "Inactive"
|
||||
msgstr "inactief"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__interval_type
|
||||
msgid "Interval Type"
|
||||
msgstr "Interval Type"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_is_follower
|
||||
msgid "Is Follower"
|
||||
msgstr "Is volger"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "Issue with Online Bank Statement Provider"
|
||||
msgstr "Probleem met Online Bank afschrift leverancier"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_account_journal
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__journal_id
|
||||
msgid "Journal"
|
||||
msgstr "Dagboek"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__key
|
||||
msgid "Key"
|
||||
msgstr "Sleutel"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider____last_update
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Laatst bijgewerkt op"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__write_uid
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Laatst bijgewerkt door"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__write_date
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Laatst bijgewerkt op"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__last_successful_run
|
||||
msgid "Last successful pull"
|
||||
msgstr "Laatst succesvolle opvraag"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_main_attachment_id
|
||||
msgid "Main Attachment"
|
||||
msgstr "Hoofdbijlage"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_error
|
||||
msgid "Message Delivery error"
|
||||
msgstr "Berichtafleverinsfout"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_ids
|
||||
msgid "Messages"
|
||||
msgstr "Berichten"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__minutes
|
||||
msgid "Minute(s)"
|
||||
msgstr "Minuut/Minuten"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__monthly
|
||||
msgid "Monthly statements"
|
||||
msgstr "Maandelijkse afschriften"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/online_bank_statement_provider.py:0
|
||||
#, python-format
|
||||
msgid "N/A"
|
||||
msgstr "N.V.T."
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__name
|
||||
msgid "Name"
|
||||
msgstr "Naam"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__next_run
|
||||
msgid "Next scheduled pull"
|
||||
msgstr "Volgende geplande opvraag"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_needaction_counter
|
||||
msgid "Number of Actions"
|
||||
msgstr "Aantal acties"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_error_counter
|
||||
msgid "Number of errors"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_needaction_counter
|
||||
msgid "Number of messages which requires an action"
|
||||
msgstr "Aantal berichten welke actie vereisen"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_has_error_counter
|
||||
msgid "Number of messages with delivery error"
|
||||
msgstr "Aantal berichten met afleveringsfouten"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__message_unread_counter
|
||||
msgid "Number of unread messages"
|
||||
msgstr "Aantal ongelezen berichten"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: code:addons/account_statement_import_online/models/account_journal.py:0
|
||||
#, python-format
|
||||
msgid "Online (OCA)"
|
||||
msgstr "Online (OCA)"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_online_bank_statement_provider
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__online_bank_statement_provider
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Online Bank Statement Provider"
|
||||
msgstr "Online Bank afschrift Aanbieder"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.act_window,name:account_statement_import_online.online_bank_statement_provider_action
|
||||
#: model:ir.ui.menu,name:account_statement_import_online.online_bank_statement_provider_menu
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
msgid "Online Bank Statement Providers"
|
||||
msgstr "Online Bank afschrift Aanbieders"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model,name:account_statement_import_online.model_online_bank_statement_pull_wizard
|
||||
msgid "Online Bank Statement Pull Wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Online Bank Statements (OCA)"
|
||||
msgstr "Online Bank Afschriften (OCA)"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.act_window,name:account_statement_import_online.action_online_bank_statements_pull_wizard
|
||||
msgid "Online Bank Statements Pull Wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_bank_statement_line__online_raw_data
|
||||
msgid "Online Raw Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.constraint,message:account_statement_import_online.constraint_online_bank_statement_provider_journal_id_uniq
|
||||
msgid "Only one online banking statement provider per journal!"
|
||||
msgstr ""
|
||||
"Er kan slechts een bankafschrift leverancier worden ingesteld per rekening!"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__origin
|
||||
msgid "Origin"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__passphrase
|
||||
msgid "Passphrase"
|
||||
msgstr "wachtwoordzin"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__password
|
||||
msgid "Password"
|
||||
msgstr "Wachtwoord"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Provider"
|
||||
msgstr "Leverancier"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__provider_ids
|
||||
msgid "Providers"
|
||||
msgstr "Leveranciers"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_pull_wizard_form
|
||||
msgid "Pull"
|
||||
msgstr "Opvragen"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
|
||||
msgid "Pull Online Bank Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.actions.server,name:account_statement_import_online.ir_cron_account_pull_online_bank_statements_ir_actions_server
|
||||
#: model:ir.cron,cron_name:account_statement_import_online.ir_cron_account_pull_online_bank_statements
|
||||
#: model:ir.cron,name:account_statement_import_online.ir_cron_account_pull_online_bank_statements
|
||||
msgid "Pull Online Bank Statements"
|
||||
msgstr "Online Bank afschrifte opvragen"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_bank_statement_line_form
|
||||
msgid "Raw Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_has_sms_error
|
||||
msgid "SMS Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__account_number
|
||||
msgid "Sanitized Account Number"
|
||||
msgstr "Opgeschoond rekeningnummer"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
|
||||
msgid "Scheduled Pull"
|
||||
msgstr "Geplande opvraag"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__interval_number
|
||||
msgid "Scheduled update interval"
|
||||
msgstr "Opvraag interval"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.constraint,message:account_statement_import_online.constraint_online_bank_statement_provider_valid_interval_number
|
||||
msgid "Scheduled update interval must be greater than zero!"
|
||||
msgstr "Planningsinterval moet groter zijn dan 0!"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_journal__online_bank_statement_provider_id
|
||||
msgid ""
|
||||
"Select the actual instance of a configured provider (a record).\n"
|
||||
"Selecting a type of provider will automatically create a provider record "
|
||||
"linked to this journal."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_journal__online_bank_statement_provider
|
||||
msgid "Select the type of service provider (a model)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__service
|
||||
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_filter
|
||||
msgid "Service"
|
||||
msgstr "Service"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__statement_creation_mode
|
||||
msgid "Statement Creation Mode"
|
||||
msgstr "Bankafschrift creatie modus"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_account_journal__online_bank_statement_provider_id
|
||||
msgid "Statement Provider"
|
||||
msgstr "Afschrift leverancier"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_account_bank_statement_line__online_raw_data
|
||||
msgid "The complete data retrieved online for this transaction"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__currency_id
|
||||
msgid "The currency used to enter statement"
|
||||
msgstr "De valuta voor het gebruikte afschrift"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__tz
|
||||
msgid "Timezone"
|
||||
msgstr "Tijdzone"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__tz
|
||||
msgid ""
|
||||
"Timezone to convert transaction timestamps to prior being saved into a "
|
||||
"statement."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_pull_wizard__date_until
|
||||
msgid "To"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_unread
|
||||
msgid "Unread Messages"
|
||||
msgstr "Ongelezen berichten"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__message_unread_counter
|
||||
msgid "Unread Messages Counter"
|
||||
msgstr "Aantal ongelezen berichten"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__update_schedule
|
||||
msgid "Update Schedule"
|
||||
msgstr "Update planning"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__username
|
||||
msgid "Username"
|
||||
msgstr "Gebruikersnaam"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,field_description:account_statement_import_online.field_online_bank_statement_provider__website_message_ids
|
||||
msgid "Website Messages"
|
||||
msgstr "Website berichten"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields,help:account_statement_import_online.field_online_bank_statement_provider__website_message_ids
|
||||
msgid "Website communication history"
|
||||
msgstr "Website berichten geschiedenis"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__interval_type__weeks
|
||||
msgid "Week(s)"
|
||||
msgstr "Weken"
|
||||
|
||||
#. module: account_statement_import_online
|
||||
#: model:ir.model.fields.selection,name:account_statement_import_online.selection__online_bank_statement_provider__statement_creation_mode__weekly
|
||||
msgid "Weekly statements"
|
||||
msgstr "Weekelijkse afschriften"
|
||||
|
||||
#~ msgid "Details"
|
||||
#~ msgstr "Details"
|
||||
|
||||
#~ msgid "Since"
|
||||
#~ msgstr "sinds"
|
||||
|
||||
#~ msgid "Since (at least)"
|
||||
#~ msgstr "sinds (ten minste)"
|
||||
|
||||
#~ msgid "Until"
|
||||
#~ msgstr "Tot"
|
||||
|
||||
#~ msgid "Until (at least)"
|
||||
#~ msgstr "Tot (ten minste)"
|
||||
5
account_statement_import_online/models/__init__.py
Normal file
5
account_statement_import_online/models/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import account_journal
|
||||
from . import account_bank_statement_line
|
||||
from . import online_bank_statement_provider
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright 2021 Therp BV <https://therp.nl>.
|
||||
# @author: Ronald Portier <ronald@therp.nl>.
|
||||
# Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
|
||||
"""Add raw data to statement line, to solve import issues."""
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountBankStatementLine(models.Model):
|
||||
"""Add raw data to statement line, to solve import issues."""
|
||||
|
||||
_inherit = "account.bank.statement.line"
|
||||
|
||||
online_raw_data = fields.Text(
|
||||
help="The complete data retrieved online for this transaction",
|
||||
readonly=True,
|
||||
copy=False,
|
||||
)
|
||||
84
account_statement_import_online/models/account_journal.py
Normal file
84
account_statement_import_online/models/account_journal.py
Normal file
@@ -0,0 +1,84 @@
|
||||
# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
# Copyright 2019-2020 Dataplug (https://dataplug.io)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
import logging
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AccountJournal(models.Model):
|
||||
_inherit = "account.journal"
|
||||
|
||||
online_bank_statement_provider = fields.Selection(
|
||||
selection=lambda self: self.env[
|
||||
"account.journal"
|
||||
]._selection_online_bank_statement_provider(),
|
||||
help="Select the type of service provider (a model)",
|
||||
)
|
||||
online_bank_statement_provider_id = fields.Many2one(
|
||||
string="Statement Provider",
|
||||
comodel_name="online.bank.statement.provider",
|
||||
ondelete="restrict",
|
||||
copy=False,
|
||||
help="Select the actual instance of a configured provider (a record).\n"
|
||||
"Selecting a type of provider will automatically create a provider"
|
||||
" record linked to this journal.",
|
||||
)
|
||||
|
||||
def __get_bank_statements_available_sources(self):
|
||||
result = super().__get_bank_statements_available_sources()
|
||||
result.append(("online", _("Online (OCA)")))
|
||||
return result
|
||||
|
||||
@api.model
|
||||
def _selection_online_bank_statement_provider(self):
|
||||
return self.env["online.bank.statement.provider"]._get_available_services() + [
|
||||
("dummy", "Dummy")
|
||||
]
|
||||
|
||||
@api.model
|
||||
def values_online_bank_statement_provider(self):
|
||||
"""Return values for provider type selection in the form view."""
|
||||
res = self.env["online.bank.statement.provider"]._get_available_services()
|
||||
if self.user_has_groups("base.group_no_one"):
|
||||
res += [("dummy", "Dummy")]
|
||||
return res
|
||||
|
||||
def _update_online_bank_statement_provider_id(self):
|
||||
"""Keep provider synchronized with journal."""
|
||||
OnlineBankStatementProvider = self.env["online.bank.statement.provider"]
|
||||
for journal in self.filtered("id"):
|
||||
provider_id = journal.online_bank_statement_provider_id
|
||||
if journal.bank_statements_source != "online":
|
||||
journal.online_bank_statement_provider_id = False
|
||||
if provider_id:
|
||||
provider_id.unlink()
|
||||
continue
|
||||
if provider_id.service == journal.online_bank_statement_provider:
|
||||
continue
|
||||
journal.online_bank_statement_provider_id = False
|
||||
if provider_id:
|
||||
provider_id.unlink()
|
||||
# fmt: off
|
||||
journal.online_bank_statement_provider_id = \
|
||||
OnlineBankStatementProvider.create({
|
||||
"journal_id": journal.id,
|
||||
"service": journal.online_bank_statement_provider,
|
||||
})
|
||||
# fmt: on
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
rec = super().create(vals)
|
||||
if "bank_statements_source" in vals or "online_bank_statement_provider" in vals:
|
||||
rec._update_online_bank_statement_provider_id()
|
||||
return rec
|
||||
|
||||
def write(self, vals):
|
||||
res = super().write(vals)
|
||||
if "bank_statements_source" in vals or "online_bank_statement_provider" in vals:
|
||||
self._update_online_bank_statement_provider_id()
|
||||
return res
|
||||
@@ -0,0 +1,418 @@
|
||||
# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
# Copyright 2019-2020 Dataplug (https://dataplug.io)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from html import escape
|
||||
|
||||
from dateutil.relativedelta import MO, relativedelta
|
||||
from pytz import timezone, utc
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
|
||||
from odoo.addons.base.models.res_bank import sanitize_account_number
|
||||
from odoo.addons.base.models.res_partner import _tz_get
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class OnlineBankStatementProvider(models.Model):
|
||||
_name = "online.bank.statement.provider"
|
||||
_inherit = ["mail.thread"]
|
||||
_description = "Online Bank Statement Provider"
|
||||
|
||||
company_id = fields.Many2one(related="journal_id.company_id", store=True)
|
||||
active = fields.Boolean(default=True)
|
||||
name = fields.Char(compute="_compute_name", store=True)
|
||||
journal_id = fields.Many2one(
|
||||
comodel_name="account.journal",
|
||||
required=True,
|
||||
readonly=True,
|
||||
ondelete="cascade",
|
||||
domain=[("type", "=", "bank")],
|
||||
)
|
||||
currency_id = fields.Many2one(related="journal_id.currency_id")
|
||||
account_number = fields.Char(
|
||||
related="journal_id.bank_account_id.sanitized_acc_number"
|
||||
)
|
||||
tz = fields.Selection(
|
||||
selection=_tz_get,
|
||||
string="Timezone",
|
||||
default=lambda self: self.env.context.get("tz"),
|
||||
help=(
|
||||
"Timezone to convert transaction timestamps to prior being"
|
||||
" saved into a statement."
|
||||
),
|
||||
)
|
||||
service = fields.Selection(
|
||||
selection=lambda self: self._selection_service(),
|
||||
required=True,
|
||||
readonly=True,
|
||||
)
|
||||
interval_type = fields.Selection(
|
||||
selection=[
|
||||
("minutes", "Minute(s)"),
|
||||
("hours", "Hour(s)"),
|
||||
("days", "Day(s)"),
|
||||
("weeks", "Week(s)"),
|
||||
],
|
||||
default="hours",
|
||||
required=True,
|
||||
)
|
||||
interval_number = fields.Integer(
|
||||
string="Scheduled update interval",
|
||||
default=1,
|
||||
required=True,
|
||||
)
|
||||
update_schedule = fields.Char(
|
||||
compute="_compute_update_schedule",
|
||||
)
|
||||
last_successful_run = fields.Datetime(string="Last successful pull")
|
||||
next_run = fields.Datetime(
|
||||
string="Next scheduled pull",
|
||||
default=fields.Datetime.now,
|
||||
required=True,
|
||||
)
|
||||
statement_creation_mode = fields.Selection(
|
||||
selection=[
|
||||
("daily", "Daily statements"),
|
||||
("weekly", "Weekly statements"),
|
||||
("monthly", "Monthly statements"),
|
||||
],
|
||||
default="daily",
|
||||
required=True,
|
||||
)
|
||||
api_base = fields.Char()
|
||||
origin = fields.Char()
|
||||
username = fields.Char()
|
||||
password = fields.Char()
|
||||
key = fields.Binary()
|
||||
certificate = fields.Binary()
|
||||
passphrase = fields.Char()
|
||||
certificate_public_key = fields.Text()
|
||||
certificate_private_key = fields.Text()
|
||||
certificate_chain = fields.Text()
|
||||
allow_empty_statements = fields.Boolean()
|
||||
|
||||
_sql_constraints = [
|
||||
(
|
||||
"journal_id_uniq",
|
||||
"UNIQUE(journal_id)",
|
||||
"Only one online banking statement provider per journal!",
|
||||
),
|
||||
(
|
||||
"valid_interval_number",
|
||||
"CHECK(interval_number > 0)",
|
||||
"Scheduled update interval must be greater than zero!",
|
||||
),
|
||||
]
|
||||
|
||||
@api.model
|
||||
def _get_available_services(self):
|
||||
"""Hook for extension"""
|
||||
return []
|
||||
|
||||
@api.model
|
||||
def _selection_service(self):
|
||||
return self._get_available_services() + [("dummy", "Dummy")]
|
||||
|
||||
@api.model
|
||||
def values_service(self):
|
||||
return self._get_available_services()
|
||||
|
||||
@api.depends("service", "journal_id.name")
|
||||
def _compute_name(self):
|
||||
"""We can have multiple providers/journals for the same service."""
|
||||
for provider in self:
|
||||
provider.name = " ".join([provider.journal_id.name, provider.service])
|
||||
|
||||
@api.depends("active", "interval_type", "interval_number")
|
||||
def _compute_update_schedule(self):
|
||||
for provider in self:
|
||||
if not provider.active:
|
||||
provider.update_schedule = _("Inactive")
|
||||
continue
|
||||
|
||||
provider.update_schedule = _("%(number)s %(type)s") % {
|
||||
"number": provider.interval_number,
|
||||
"type": list(
|
||||
filter(
|
||||
lambda x: x[0] == provider.interval_type,
|
||||
self._fields["interval_type"].selection,
|
||||
)
|
||||
)[0][1],
|
||||
}
|
||||
|
||||
def _pull(self, date_since, date_until):
|
||||
is_scheduled = self.env.context.get("scheduled")
|
||||
for provider in self:
|
||||
statement_date_since = provider._get_statement_date_since(date_since)
|
||||
while statement_date_since < date_until:
|
||||
statement_date_until = (
|
||||
statement_date_since + provider._get_statement_date_step()
|
||||
)
|
||||
try:
|
||||
data = provider._obtain_statement_data(
|
||||
statement_date_since, statement_date_until
|
||||
)
|
||||
except BaseException as e:
|
||||
if is_scheduled:
|
||||
_logger.warning(
|
||||
'Online Bank Statement Provider "%s" failed to'
|
||||
" obtain statement data since %s until %s"
|
||||
% (
|
||||
provider.name,
|
||||
statement_date_since,
|
||||
statement_date_until,
|
||||
),
|
||||
exc_info=True,
|
||||
)
|
||||
provider.message_post(
|
||||
body=_(
|
||||
"Failed to obtain statement data for period "
|
||||
"since {since} until {until}: {exception}. See server logs for "
|
||||
"more details."
|
||||
).format(
|
||||
since=statement_date_since,
|
||||
until=statement_date_until,
|
||||
exception=escape(str(e)) or _("N/A"),
|
||||
),
|
||||
subject=_("Issue with Online Bank Statement Provider"),
|
||||
)
|
||||
break
|
||||
raise
|
||||
provider._create_or_update_statement(
|
||||
data, statement_date_since, statement_date_until
|
||||
)
|
||||
statement_date_since = statement_date_until
|
||||
if is_scheduled:
|
||||
provider._schedule_next_run()
|
||||
|
||||
def _create_or_update_statement(
|
||||
self, data, statement_date_since, statement_date_until
|
||||
):
|
||||
"""Create or update bank statement with the data retrieved from provider."""
|
||||
self.ensure_one()
|
||||
AccountBankStatement = self.env["account.bank.statement"]
|
||||
is_scheduled = self.env.context.get("scheduled")
|
||||
if is_scheduled:
|
||||
AccountBankStatement = AccountBankStatement.with_context(
|
||||
tracking_disable=True,
|
||||
)
|
||||
if not data:
|
||||
data = ([], {})
|
||||
if not data[0] and not data[1] and not self.allow_empty_statements:
|
||||
return
|
||||
lines_data, statement_values = data
|
||||
if not lines_data:
|
||||
lines_data = []
|
||||
if not statement_values:
|
||||
statement_values = {}
|
||||
statement_date = self._get_statement_date(
|
||||
statement_date_since,
|
||||
statement_date_until,
|
||||
)
|
||||
statement = AccountBankStatement.search(
|
||||
[
|
||||
("journal_id", "=", self.journal_id.id),
|
||||
("state", "=", "open"),
|
||||
("date", "=", statement_date),
|
||||
],
|
||||
limit=1,
|
||||
)
|
||||
if not statement:
|
||||
statement_values.update(
|
||||
{
|
||||
"name": "%s/%s"
|
||||
% (self.journal_id.code, statement_date.strftime("%Y-%m-%d")),
|
||||
"journal_id": self.journal_id.id,
|
||||
"date": statement_date,
|
||||
}
|
||||
)
|
||||
statement = AccountBankStatement.with_context(
|
||||
journal_id=self.journal_id.id,
|
||||
).create(
|
||||
# NOTE: This is needed since create() alters values
|
||||
statement_values.copy()
|
||||
)
|
||||
filtered_lines = self._get_statement_filtered_lines(
|
||||
lines_data, statement_values, statement_date_since, statement_date_until
|
||||
)
|
||||
statement_values.update(
|
||||
{"line_ids": [[0, False, line] for line in filtered_lines]}
|
||||
)
|
||||
if "balance_start" in statement_values:
|
||||
statement_values["balance_start"] = float(statement_values["balance_start"])
|
||||
if "balance_end_real" in statement_values:
|
||||
statement_values["balance_end_real"] = float(
|
||||
statement_values["balance_end_real"]
|
||||
)
|
||||
statement.write(statement_values)
|
||||
|
||||
def _get_statement_filtered_lines(
|
||||
self, lines_data, statement_values, statement_date_since, statement_date_until
|
||||
):
|
||||
"""Get lines from line data, but only for the right date."""
|
||||
AccountBankStatementLine = self.env["account.bank.statement.line"]
|
||||
provider_tz = timezone(self.tz) if self.tz else utc
|
||||
filtered_lines = []
|
||||
for line_values in lines_data:
|
||||
date = line_values["date"]
|
||||
if not isinstance(date, datetime):
|
||||
date = fields.Datetime.from_string(date)
|
||||
if date.tzinfo is None:
|
||||
date = date.replace(tzinfo=utc)
|
||||
date = date.astimezone(utc).replace(tzinfo=None)
|
||||
if date < statement_date_since:
|
||||
if "balance_start" in statement_values:
|
||||
statement_values["balance_start"] = Decimal(
|
||||
statement_values["balance_start"]
|
||||
) + Decimal(line_values["amount"])
|
||||
continue
|
||||
elif date >= statement_date_until:
|
||||
if "balance_end_real" in statement_values:
|
||||
statement_values["balance_end_real"] = Decimal(
|
||||
statement_values["balance_end_real"]
|
||||
) - Decimal(line_values["amount"])
|
||||
continue
|
||||
date = date.replace(tzinfo=utc)
|
||||
date = date.astimezone(provider_tz).replace(tzinfo=None)
|
||||
line_values["date"] = date
|
||||
unique_import_id = line_values.get("unique_import_id")
|
||||
if unique_import_id:
|
||||
unique_import_id = self._generate_unique_import_id(unique_import_id)
|
||||
line_values.update({"unique_import_id": unique_import_id})
|
||||
if AccountBankStatementLine.sudo().search(
|
||||
[("unique_import_id", "=", unique_import_id)], limit=1
|
||||
):
|
||||
continue
|
||||
bank_account_number = line_values.get("account_number")
|
||||
if bank_account_number:
|
||||
sanitized_account_number = self._sanitize_bank_account_number(
|
||||
bank_account_number
|
||||
)
|
||||
line_values["account_number"] = sanitized_account_number
|
||||
self._update_partner_from_account_number(line_values)
|
||||
if not line_values.get("payment_ref"):
|
||||
line_values["payment_ref"] = line_values.get("ref")
|
||||
filtered_lines.append(line_values)
|
||||
return filtered_lines
|
||||
|
||||
def _schedule_next_run(self):
|
||||
self.ensure_one()
|
||||
self.last_successful_run = self.next_run
|
||||
self.next_run += self._get_next_run_period()
|
||||
|
||||
def _get_statement_date_since(self, date):
|
||||
self.ensure_one()
|
||||
date = date.replace(hour=0, minute=0, second=0, microsecond=0)
|
||||
if self.statement_creation_mode == "daily":
|
||||
return date
|
||||
elif self.statement_creation_mode == "weekly":
|
||||
return date + relativedelta(weekday=MO(-1))
|
||||
elif self.statement_creation_mode == "monthly":
|
||||
return date.replace(day=1)
|
||||
|
||||
def _get_statement_date_step(self):
|
||||
self.ensure_one()
|
||||
if self.statement_creation_mode == "daily":
|
||||
return relativedelta(days=1, hour=0, minute=0, second=0, microsecond=0)
|
||||
elif self.statement_creation_mode == "weekly":
|
||||
return relativedelta(
|
||||
weeks=1,
|
||||
weekday=MO,
|
||||
hour=0,
|
||||
minute=0,
|
||||
second=0,
|
||||
microsecond=0,
|
||||
)
|
||||
elif self.statement_creation_mode == "monthly":
|
||||
return relativedelta(
|
||||
months=1,
|
||||
day=1,
|
||||
hour=0,
|
||||
minute=0,
|
||||
second=0,
|
||||
microsecond=0,
|
||||
)
|
||||
|
||||
def _get_statement_date(self, date_since, date_until):
|
||||
self.ensure_one()
|
||||
# NOTE: Statement date is treated by Odoo as start of period. Details
|
||||
# - addons/account/models/account_journal_dashboard.py
|
||||
# - def get_line_graph_datas()
|
||||
tz = timezone(self.tz) if self.tz else utc
|
||||
date_since = date_since.replace(tzinfo=utc).astimezone(tz)
|
||||
return date_since.date()
|
||||
|
||||
def _generate_unique_import_id(self, unique_import_id):
|
||||
self.ensure_one()
|
||||
return (
|
||||
(self.account_number and self.account_number + "-" or "")
|
||||
+ str(self.journal_id.id)
|
||||
+ "-"
|
||||
+ unique_import_id
|
||||
)
|
||||
|
||||
def _sanitize_bank_account_number(self, bank_account_number):
|
||||
"""Hook for extension"""
|
||||
self.ensure_one()
|
||||
return sanitize_account_number(bank_account_number)
|
||||
|
||||
def _update_partner_from_account_number(self, line_values):
|
||||
"""Lookup partner using account number."""
|
||||
self.ensure_one()
|
||||
partner_bank = self.env["res.partner.bank"].search(
|
||||
[
|
||||
("acc_number", "=", line_values["account_number"]),
|
||||
"|",
|
||||
("company_id", "=", False),
|
||||
("company_id", "=", self.company_id.id),
|
||||
],
|
||||
limit=1,
|
||||
)
|
||||
if partner_bank:
|
||||
line_values["partner_bank_id"] = partner_bank.id
|
||||
line_values["partner_id"] = partner_bank.partner_id.id
|
||||
|
||||
def _get_next_run_period(self):
|
||||
self.ensure_one()
|
||||
if self.interval_type == "minutes":
|
||||
return relativedelta(minutes=self.interval_number)
|
||||
elif self.interval_type == "hours":
|
||||
return relativedelta(hours=self.interval_number)
|
||||
elif self.interval_type == "days":
|
||||
return relativedelta(days=self.interval_number)
|
||||
elif self.interval_type == "weeks":
|
||||
return relativedelta(weeks=self.interval_number)
|
||||
|
||||
@api.model
|
||||
def _scheduled_pull(self):
|
||||
_logger.info("Scheduled pull of online bank statements...")
|
||||
|
||||
providers = self.search(
|
||||
[("active", "=", True), ("next_run", "<=", fields.Datetime.now())]
|
||||
)
|
||||
if providers:
|
||||
_logger.info(
|
||||
"Pulling online bank statements of: %s"
|
||||
% ", ".join(providers.mapped("journal_id.name"))
|
||||
)
|
||||
for provider in providers.with_context(**{"scheduled": True}):
|
||||
date_since = (
|
||||
(provider.last_successful_run)
|
||||
if provider.last_successful_run
|
||||
else (provider.next_run - provider._get_next_run_period())
|
||||
)
|
||||
date_until = provider.next_run
|
||||
provider._pull(date_since, date_until)
|
||||
|
||||
_logger.info("Scheduled pull of online bank statements complete.")
|
||||
|
||||
def _obtain_statement_data(self, date_since, date_until):
|
||||
"""Hook for extension"""
|
||||
# Check tests/online_bank_statement_provider_dummy.py for reference
|
||||
self.ensure_one()
|
||||
return []
|
||||
27
account_statement_import_online/readme/CONFIGURE.rst
Normal file
27
account_statement_import_online/readme/CONFIGURE.rst
Normal file
@@ -0,0 +1,27 @@
|
||||
To configure online bank statements provider:
|
||||
|
||||
#. Go to *Invoicing > Configuration > Bank Accounts*
|
||||
#. Open bank account to configure and edit it
|
||||
#. Set *Bank Feeds* to *Online*
|
||||
#. Select online bank statements provider in *Online Bank Statements (OCA)*
|
||||
section
|
||||
#. Save the bank account
|
||||
#. Click on provider and configure provider-specific settings.
|
||||
|
||||
or, alternatively:
|
||||
|
||||
#. Go to *Invoicing > Overview*
|
||||
#. Open settings of the corresponding journal account
|
||||
#. Switch to *Bank Account* tab
|
||||
#. Set *Bank Feeds* to *Online*
|
||||
#. Select online bank statements provider in *Online Bank Statements (OCA)*
|
||||
section
|
||||
#. Save the bank account
|
||||
#. Click on provider and configure provider-specific settings.
|
||||
|
||||
If you want to allow empty bank statements to be created every time the
|
||||
information is pulled, you can check the option "Allow empty statements"
|
||||
at the provider configuration level.
|
||||
|
||||
**NOTE**: To access these features, user needs to belong to
|
||||
*Show Full Accounting Features* group.
|
||||
7
account_statement_import_online/readme/CONTRIBUTORS.rst
Normal file
7
account_statement_import_online/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,7 @@
|
||||
* `CorporateHub <https://corporatehub.eu/>`__
|
||||
|
||||
* Alexey Pelykh <alexey.pelykh@corphub.eu>
|
||||
|
||||
* `Therp BV <https://therp.nl/>`__
|
||||
|
||||
* Ronald Portier <ronald@therp.nl>
|
||||
1
account_statement_import_online/readme/DESCRIPTION.rst
Normal file
1
account_statement_import_online/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1 @@
|
||||
This module provides base for building online bank statements providers.
|
||||
9
account_statement_import_online/readme/USAGE.rst
Normal file
9
account_statement_import_online/readme/USAGE.rst
Normal file
@@ -0,0 +1,9 @@
|
||||
To pull historical bank statements:
|
||||
|
||||
#. Go to *Invoicing > Configuration > Bank Accounts*
|
||||
#. Select specific bank accounts
|
||||
#. Launch *Actions > Online Bank Statements Pull Wizard*
|
||||
#. Configure date interval and click *Pull*
|
||||
|
||||
**NOTE**: To access these features, user needs to belong to
|
||||
*Show Full Accounting Features* group.
|
||||
@@ -0,0 +1,4 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_online_bank_statement_provider_admin,online.bank.statement.provider:base.group_system,model_online_bank_statement_provider,base.group_system,1,1,1,1
|
||||
access_online_bank_statement_provider_user,online.bank.statement.provider:account.group_account_user,model_online_bank_statement_provider,account.group_account_user,1,1,1,1
|
||||
access_online_bank_statement_pull_wizard_user,online.bank.statement.pull.wizard:account.group_account_user,model_online_bank_statement_pull_wizard,account.group_account_user,1,1,1,1
|
||||
|
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
Copyright 2019-2020 Dataplug (https://dataplug.io)
|
||||
-->
|
||||
<odoo noupdate="1">
|
||||
<record id="online_bank_statement_provider_multicompany" model="ir.rule">
|
||||
<field name="name">Online Bank Statement Provider multi-company</field>
|
||||
<field name="model_id" ref="model_online_bank_statement_provider" />
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
BIN
account_statement_import_online/static/description/icon.png
Normal file
BIN
account_statement_import_online/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
471
account_statement_import_online/static/description/index.html
Normal file
471
account_statement_import_online/static/description/index.html
Normal file
@@ -0,0 +1,471 @@
|
||||
<?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>Online Bank Statements</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="online-bank-statements">
|
||||
<h1 class="title">Online Bank Statements</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import_online"><img alt="OCA/bank-statement-import" src="https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-statement-import-14-0/bank-statement-import-14-0-account_statement_import_online"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/174/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module provides base for building online bank statements providers.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
|
||||
<p>To configure online bank statements provider:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Invoicing > Configuration > Bank Accounts</em></li>
|
||||
<li>Open bank account to configure and edit it</li>
|
||||
<li>Set <em>Bank Feeds</em> to <em>Online</em></li>
|
||||
<li>Select online bank statements provider in <em>Online Bank Statements (OCA)</em>
|
||||
section</li>
|
||||
<li>Save the bank account</li>
|
||||
<li>Click on provider and configure provider-specific settings.</li>
|
||||
</ol>
|
||||
<p>or, alternatively:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Invoicing > Overview</em></li>
|
||||
<li>Open settings of the corresponding journal account</li>
|
||||
<li>Switch to <em>Bank Account</em> tab</li>
|
||||
<li>Set <em>Bank Feeds</em> to <em>Online</em></li>
|
||||
<li>Select online bank statements provider in <em>Online Bank Statements (OCA)</em>
|
||||
section</li>
|
||||
<li>Save the bank account</li>
|
||||
<li>Click on provider and configure provider-specific settings.</li>
|
||||
</ol>
|
||||
<p>If you want to allow empty bank statements to be created every time the
|
||||
information is pulled, you can check the option “Allow empty statements”
|
||||
at the provider configuration level.</p>
|
||||
<p><strong>NOTE</strong>: To access these features, user needs to belong to
|
||||
<em>Show Full Accounting Features</em> group.</p>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
|
||||
<p>To pull historical bank statements:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Invoicing > Configuration > Bank Accounts</em></li>
|
||||
<li>Select specific bank accounts</li>
|
||||
<li>Launch <em>Actions > Online Bank Statements Pull Wizard</em></li>
|
||||
<li>Configure date interval and click <em>Pull</em></li>
|
||||
</ol>
|
||||
<p><strong>NOTE</strong>: To access these features, user needs to belong to
|
||||
<em>Show Full Accounting Features</em> group.</p>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-statement-import/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_online%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="#id4">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>CorporateHub</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li><a class="reference external" href="https://corporatehub.eu/">CorporateHub</a><ul>
|
||||
<li>Alexey Pelykh <<a class="reference external" href="mailto:alexey.pelykh@corphub.eu">alexey.pelykh@corphub.eu</a>></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference external" href="https://therp.nl/">Therp BV</a><ul>
|
||||
<li>Ronald Portier <<a class="reference external" href="mailto:ronald@therp.nl">ronald@therp.nl</a>></li>
|
||||
</ul>
|
||||
</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>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/alexey-pelykh"><img alt="alexey-pelykh" src="https://github.com/alexey-pelykh.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import_online">OCA/bank-statement-import</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
account_statement_import_online/tests/__init__.py
Normal file
4
account_statement_import_online/tests/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import test_account_bank_statement_import_online
|
||||
from . import test_account_journal
|
||||
@@ -0,0 +1,77 @@
|
||||
# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
# Copyright 2019-2020 Dataplug (https://dataplug.io)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from random import randrange
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from pytz import timezone
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class OnlineBankStatementProviderDummy(models.Model):
|
||||
_inherit = "online.bank.statement.provider"
|
||||
|
||||
def _obtain_statement_data(self, date_since, date_until):
|
||||
self.ensure_one()
|
||||
if self.service != "dummy":
|
||||
return super()._obtain_statement_data(
|
||||
date_since,
|
||||
date_until,
|
||||
) # pragma: no cover
|
||||
|
||||
if self.env.context.get("crash", False):
|
||||
exception = self.env.context.get("exception", Exception("Expected"))
|
||||
raise exception
|
||||
|
||||
line_step_options = self.env.context.get("step", {"minutes": 5})
|
||||
line_step = relativedelta(**line_step_options)
|
||||
expand_by = self.env.context.get("expand_by", 0)
|
||||
data_since = self.env.context.get("data_since", date_since)
|
||||
data_until = self.env.context.get("data_until", date_until)
|
||||
data_since -= expand_by * line_step
|
||||
data_until += expand_by * line_step
|
||||
|
||||
balance_start = self.env.context.get(
|
||||
"balance_start", randrange(-10000, 10000, 1) * 0.1
|
||||
)
|
||||
balance = balance_start
|
||||
|
||||
tz = self.env.context.get("tz")
|
||||
if tz:
|
||||
tz = timezone(tz)
|
||||
|
||||
timestamp_mode = self.env.context.get("timestamp_mode")
|
||||
|
||||
lines = []
|
||||
date = data_since
|
||||
while date < data_until:
|
||||
amount = self.env.context.get("amount", randrange(-100, 100, 1) * 0.1)
|
||||
transaction_date = date.replace(tzinfo=tz)
|
||||
if timestamp_mode == "date":
|
||||
transaction_date = transaction_date.date()
|
||||
elif timestamp_mode == "str":
|
||||
transaction_date = fields.Datetime.to_string(transaction_date)
|
||||
lines.append(
|
||||
{
|
||||
"payment_ref": "payment",
|
||||
"amount": amount,
|
||||
"date": transaction_date,
|
||||
"unique_import_id": str(
|
||||
int((date - datetime(1970, 1, 1)) / timedelta(seconds=1))
|
||||
),
|
||||
"partner_name": "John Doe",
|
||||
"account_number": "XX00 0000 0000 0000",
|
||||
}
|
||||
)
|
||||
balance += amount
|
||||
date += line_step
|
||||
balance_end = balance
|
||||
statement = {}
|
||||
if self.env.context.get("balance", True):
|
||||
statement.update(
|
||||
{"balance_start": balance_start, "balance_end_real": balance_end}
|
||||
)
|
||||
return lines, statement
|
||||
@@ -0,0 +1,767 @@
|
||||
# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
# Copyright 2019-2020 Dataplug (https://dataplug.io)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from datetime import date, datetime
|
||||
from unittest import mock
|
||||
from urllib.error import HTTPError
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from odoo_test_helper import FakeModelLoader
|
||||
from psycopg2 import IntegrityError
|
||||
|
||||
from odoo import fields
|
||||
from odoo.tests import common
|
||||
from odoo.tools import mute_logger
|
||||
|
||||
mock_obtain_statement_data = (
|
||||
"odoo.addons.account_statement_import_online.tests."
|
||||
+ "online_bank_statement_provider_dummy.OnlineBankStatementProviderDummy."
|
||||
+ "_obtain_statement_data"
|
||||
)
|
||||
|
||||
|
||||
class TestAccountBankAccountStatementImportOnline(common.TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
# Load fake model
|
||||
cls.loader = FakeModelLoader(cls.env, cls.__module__)
|
||||
cls.loader.backup_registry()
|
||||
cls.addClassCleanup(cls.loader.restore_registry)
|
||||
from .online_bank_statement_provider_dummy import (
|
||||
OnlineBankStatementProviderDummy,
|
||||
)
|
||||
|
||||
cls.loader.update_registry((OnlineBankStatementProviderDummy,))
|
||||
|
||||
cls.now = fields.Datetime.now()
|
||||
cls.AccountJournal = cls.env["account.journal"]
|
||||
cls.OnlineBankStatementProvider = cls.env["online.bank.statement.provider"]
|
||||
cls.OnlineBankStatementPullWizard = cls.env["online.bank.statement.pull.wizard"]
|
||||
cls.AccountBankStatement = cls.env["account.bank.statement"]
|
||||
cls.AccountBankStatementLine = cls.env["account.bank.statement.line"]
|
||||
|
||||
def test_provider_unlink_restricted(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{"name": "Bank", "type": "bank", "code": "BANK"}
|
||||
)
|
||||
with common.Form(journal) as journal_form:
|
||||
journal_form.bank_statements_source = "online"
|
||||
journal_form.online_bank_statement_provider = "dummy"
|
||||
journal_form.save()
|
||||
|
||||
with self.assertRaises(IntegrityError), mute_logger("odoo.sql_db"):
|
||||
journal.online_bank_statement_provider_id.unlink()
|
||||
|
||||
def test_cascade_unlink(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{"name": "Bank", "type": "bank", "code": "BANK"}
|
||||
)
|
||||
with common.Form(journal) as journal_form:
|
||||
journal_form.bank_statements_source = "online"
|
||||
journal_form.online_bank_statement_provider = "dummy"
|
||||
journal_form.save()
|
||||
|
||||
self.assertTrue(journal.online_bank_statement_provider_id)
|
||||
save_provider_id = journal.online_bank_statement_provider_id.id
|
||||
journal.unlink()
|
||||
self.assertFalse(
|
||||
self.OnlineBankStatementProvider.search(
|
||||
[
|
||||
("id", "=", save_provider_id),
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
def test_source_change_cleanup(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{"name": "Bank", "type": "bank", "code": "BANK"}
|
||||
)
|
||||
with common.Form(journal) as journal_form:
|
||||
journal_form.bank_statements_source = "online"
|
||||
journal_form.online_bank_statement_provider = "dummy"
|
||||
journal_form.save()
|
||||
|
||||
self.assertTrue(journal.online_bank_statement_provider_id)
|
||||
save_provider_id = journal.online_bank_statement_provider_id.id
|
||||
|
||||
# Stuff should not change when doing unrelated write.
|
||||
journal.write({"code": "BIGBANK"})
|
||||
self.assertTrue(journal.online_bank_statement_provider_id)
|
||||
self.assertEqual(journal.online_bank_statement_provider_id.id, save_provider_id)
|
||||
|
||||
with common.Form(journal) as journal_form:
|
||||
journal_form.bank_statements_source = "undefined"
|
||||
journal_form.save()
|
||||
|
||||
self.assertFalse(journal.online_bank_statement_provider_id)
|
||||
self.assertFalse(
|
||||
self.OnlineBankStatementProvider.search(
|
||||
[
|
||||
("id", "=", save_provider_id),
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
def test_pull_mode_daily(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "daily"
|
||||
|
||||
provider.with_context(step={"hours": 2})._pull(
|
||||
self.now - relativedelta(days=1),
|
||||
self.now,
|
||||
)
|
||||
self.assertEqual(
|
||||
len(self.AccountBankStatement.search([("journal_id", "=", journal.id)])), 2
|
||||
)
|
||||
|
||||
def test_pull_mode_weekly(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "weekly"
|
||||
|
||||
provider.with_context(step={"hours": 8})._pull(
|
||||
self.now - relativedelta(weeks=1),
|
||||
self.now,
|
||||
)
|
||||
self.assertEqual(
|
||||
len(self.AccountBankStatement.search([("journal_id", "=", journal.id)])), 2
|
||||
)
|
||||
|
||||
def test_pull_mode_monthly(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "monthly"
|
||||
|
||||
provider.with_context(step={"hours": 8})._pull(
|
||||
self.now - relativedelta(months=1),
|
||||
self.now,
|
||||
)
|
||||
self.assertEqual(
|
||||
len(self.AccountBankStatement.search([("journal_id", "=", journal.id)])), 2
|
||||
)
|
||||
|
||||
def test_pull_scheduled(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.next_run = self.now - relativedelta(days=15)
|
||||
|
||||
self.assertFalse(
|
||||
self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
)
|
||||
|
||||
provider.with_context(step={"hours": 8})._scheduled_pull()
|
||||
|
||||
statement = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
self.assertEqual(len(statement), 1)
|
||||
|
||||
def test_pull_skip_duplicates_by_unique_import_id(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "weekly"
|
||||
|
||||
provider.with_context(
|
||||
step={"hours": 8},
|
||||
data_since=self.now - relativedelta(weeks=2),
|
||||
data_until=self.now,
|
||||
)._pull(
|
||||
self.now - relativedelta(weeks=2),
|
||||
self.now,
|
||||
)
|
||||
self.assertEqual(
|
||||
len(
|
||||
self.AccountBankStatementLine.search([("journal_id", "=", journal.id)])
|
||||
),
|
||||
14 * (24 / 8),
|
||||
)
|
||||
|
||||
provider.with_context(
|
||||
step={"hours": 8},
|
||||
data_since=self.now - relativedelta(weeks=3),
|
||||
data_until=self.now - relativedelta(weeks=1),
|
||||
)._pull(
|
||||
self.now - relativedelta(weeks=3),
|
||||
self.now - relativedelta(weeks=1),
|
||||
)
|
||||
self.assertEqual(
|
||||
len(
|
||||
self.AccountBankStatementLine.search([("journal_id", "=", journal.id)])
|
||||
),
|
||||
21 * (24 / 8),
|
||||
)
|
||||
|
||||
provider.with_context(
|
||||
step={"hours": 8},
|
||||
data_since=self.now - relativedelta(weeks=1),
|
||||
data_until=self.now,
|
||||
)._pull(
|
||||
self.now - relativedelta(weeks=1),
|
||||
self.now,
|
||||
)
|
||||
self.assertEqual(
|
||||
len(
|
||||
self.AccountBankStatementLine.search([("journal_id", "=", journal.id)])
|
||||
),
|
||||
21 * (24 / 8),
|
||||
)
|
||||
|
||||
def test_interval_type_minutes(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.interval_type = "minutes"
|
||||
provider._compute_update_schedule()
|
||||
|
||||
def test_interval_type_hours(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.interval_type = "hours"
|
||||
provider._compute_update_schedule()
|
||||
|
||||
def test_interval_type_days(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.interval_type = "days"
|
||||
provider._compute_update_schedule()
|
||||
|
||||
def test_interval_type_weeks(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.interval_type = "weeks"
|
||||
provider._compute_update_schedule()
|
||||
|
||||
def test_pull_no_crash(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "weekly"
|
||||
|
||||
provider.with_context(crash=True, scheduled=True)._pull(
|
||||
self.now - relativedelta(hours=1),
|
||||
self.now,
|
||||
)
|
||||
self.assertFalse(
|
||||
self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
)
|
||||
|
||||
def test_pull_crash(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "weekly"
|
||||
|
||||
with self.assertRaisesRegex(Exception, "Expected"):
|
||||
provider.with_context(crash=True)._pull(
|
||||
self.now - relativedelta(hours=1),
|
||||
self.now,
|
||||
)
|
||||
|
||||
def test_pull_httperror(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "weekly"
|
||||
|
||||
with self.assertRaises(HTTPError):
|
||||
provider.with_context(
|
||||
crash=True,
|
||||
exception=HTTPError(None, 500, "Error", None, None),
|
||||
)._pull(
|
||||
self.now - relativedelta(hours=1),
|
||||
self.now,
|
||||
)
|
||||
|
||||
def test_pull_no_balance(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "daily"
|
||||
|
||||
provider.with_context(
|
||||
step={"hours": 2},
|
||||
balance_start=0,
|
||||
amount=100.0,
|
||||
balance=False,
|
||||
)._pull(
|
||||
self.now - relativedelta(days=1),
|
||||
self.now,
|
||||
)
|
||||
statements = self.AccountBankStatement.search(
|
||||
[("journal_id", "=", journal.id)],
|
||||
order="date asc",
|
||||
)
|
||||
self.assertFalse(statements[0].balance_start)
|
||||
self.assertTrue(statements[0].balance_end)
|
||||
self.assertTrue(statements[1].balance_start)
|
||||
|
||||
def test_wizard(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
vals = self.OnlineBankStatementPullWizard.with_context(
|
||||
active_model="account.journal", active_id=journal.id
|
||||
).default_get(fields_list=["provider_ids"])
|
||||
vals["date_since"] = self.now - relativedelta(hours=1)
|
||||
vals["date_until"] = self.now
|
||||
wizard = self.OnlineBankStatementPullWizard.create(vals)
|
||||
self.assertTrue(wizard.provider_ids)
|
||||
wizard.action_pull()
|
||||
self.assertTrue(
|
||||
self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
)
|
||||
|
||||
def test_pull_statement_partially(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "monthly"
|
||||
|
||||
provider_context = {
|
||||
"step": {"hours": 24},
|
||||
"data_since": datetime(2020, 1, 1),
|
||||
"amount": 1.0,
|
||||
"balance_start": 0,
|
||||
}
|
||||
|
||||
provider.with_context(
|
||||
**provider_context,
|
||||
data_until=datetime(2020, 1, 31),
|
||||
)._pull(
|
||||
datetime(2020, 1, 1),
|
||||
datetime(2020, 1, 31),
|
||||
)
|
||||
statements = self.AccountBankStatement.search(
|
||||
[("journal_id", "=", journal.id)],
|
||||
order="date asc",
|
||||
)
|
||||
self.assertEqual(len(statements), 1)
|
||||
self.assertEqual(statements[0].balance_start, 0.0)
|
||||
self.assertEqual(statements[0].balance_end_real, 30.0)
|
||||
|
||||
provider.with_context(
|
||||
**provider_context,
|
||||
data_until=datetime(2020, 2, 15),
|
||||
)._pull(
|
||||
datetime(2020, 1, 1),
|
||||
datetime(2020, 2, 29),
|
||||
)
|
||||
statements = self.AccountBankStatement.search(
|
||||
[("journal_id", "=", journal.id)],
|
||||
order="date asc",
|
||||
)
|
||||
self.assertEqual(len(statements), 2)
|
||||
self.assertEqual(statements[0].balance_start, 0.0)
|
||||
self.assertEqual(statements[0].balance_end_real, 31.0)
|
||||
self.assertEqual(statements[1].balance_start, 31.0)
|
||||
self.assertEqual(statements[1].balance_end_real, 45.0)
|
||||
|
||||
provider.with_context(
|
||||
**provider_context,
|
||||
data_until=datetime(2020, 2, 29),
|
||||
)._pull(
|
||||
datetime(2020, 1, 1),
|
||||
datetime(2020, 2, 29),
|
||||
)
|
||||
statements = self.AccountBankStatement.search(
|
||||
[("journal_id", "=", journal.id)],
|
||||
order="date asc",
|
||||
)
|
||||
self.assertEqual(len(statements), 2)
|
||||
self.assertEqual(statements[0].balance_start, 0.0)
|
||||
self.assertEqual(statements[0].balance_end_real, 31.0)
|
||||
self.assertEqual(statements[1].balance_start, 31.0)
|
||||
self.assertEqual(statements[1].balance_end_real, 59.0)
|
||||
|
||||
def test_tz_utc(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.tz = "UTC"
|
||||
provider.with_context(
|
||||
step={"hours": 1},
|
||||
data_since=datetime(2020, 4, 17, 22, 0),
|
||||
data_until=datetime(2020, 4, 18, 2, 0),
|
||||
tz="UTC",
|
||||
)._pull(
|
||||
datetime(2020, 4, 17, 22, 0),
|
||||
datetime(2020, 4, 18, 2, 0),
|
||||
)
|
||||
|
||||
statement = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
self.assertEqual(len(statement), 2)
|
||||
|
||||
lines = statement.mapped("line_ids").sorted()
|
||||
self.assertEqual(len(lines), 4)
|
||||
self.assertEqual(lines[0].date, date(2020, 4, 17))
|
||||
self.assertEqual(lines[1].date, date(2020, 4, 17))
|
||||
self.assertEqual(lines[2].date, date(2020, 4, 18))
|
||||
self.assertEqual(lines[3].date, date(2020, 4, 18))
|
||||
|
||||
def test_tz_non_utc(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.tz = "Etc/GMT-2"
|
||||
provider.with_context(
|
||||
step={"hours": 1},
|
||||
data_since=datetime(2020, 4, 17, 22, 0),
|
||||
data_until=datetime(2020, 4, 18, 2, 0),
|
||||
tz="UTC",
|
||||
)._pull(
|
||||
datetime(2020, 4, 17, 22, 0),
|
||||
datetime(2020, 4, 18, 2, 0),
|
||||
)
|
||||
|
||||
statement = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
self.assertEqual(len(statement), 2)
|
||||
|
||||
lines = statement.mapped("line_ids").sorted()
|
||||
self.assertEqual(len(lines), 4)
|
||||
self.assertEqual(lines[0].date, date(2020, 4, 18))
|
||||
self.assertEqual(lines[1].date, date(2020, 4, 18))
|
||||
self.assertEqual(lines[2].date, date(2020, 4, 18))
|
||||
self.assertEqual(lines[3].date, date(2020, 4, 18))
|
||||
|
||||
def test_other_tz_to_utc(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.with_context(
|
||||
step={"hours": 1},
|
||||
tz="Etc/GMT-2",
|
||||
data_since=datetime(2020, 4, 18, 0, 0),
|
||||
data_until=datetime(2020, 4, 18, 4, 0),
|
||||
)._pull(
|
||||
datetime(2020, 4, 17, 22, 0),
|
||||
datetime(2020, 4, 18, 2, 0),
|
||||
)
|
||||
|
||||
statement = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
self.assertEqual(len(statement), 2)
|
||||
|
||||
lines = statement.mapped("line_ids").sorted()
|
||||
self.assertEqual(len(lines), 4)
|
||||
self.assertEqual(lines[0].date, date(2020, 4, 17))
|
||||
self.assertEqual(lines[1].date, date(2020, 4, 17))
|
||||
self.assertEqual(lines[2].date, date(2020, 4, 18))
|
||||
self.assertEqual(lines[3].date, date(2020, 4, 18))
|
||||
|
||||
def test_timestamp_date_only_date(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.with_context(step={"hours": 1}, timestamp_mode="date")._pull(
|
||||
datetime(2020, 4, 18, 0, 0),
|
||||
datetime(2020, 4, 18, 4, 0),
|
||||
)
|
||||
|
||||
statement = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
self.assertEqual(len(statement), 1)
|
||||
|
||||
lines = statement.line_ids
|
||||
self.assertEqual(len(lines), 24)
|
||||
for line in lines:
|
||||
self.assertEqual(line.date, date(2020, 4, 18))
|
||||
|
||||
def test_timestamp_date_only_str(self):
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.with_context(
|
||||
step={"hours": 1},
|
||||
data_since=datetime(2020, 4, 18, 0, 0),
|
||||
data_until=datetime(2020, 4, 18, 4, 0),
|
||||
timestamp_mode="str",
|
||||
)._pull(
|
||||
datetime(2020, 4, 18, 0, 0),
|
||||
datetime(2020, 4, 18, 4, 0),
|
||||
)
|
||||
|
||||
statement = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
self.assertEqual(len(statement), 1)
|
||||
|
||||
lines = statement.line_ids
|
||||
self.assertEqual(len(lines), 4)
|
||||
self.assertEqual(lines[0].date, date(2020, 4, 18))
|
||||
self.assertEqual(lines[1].date, date(2020, 4, 18))
|
||||
self.assertEqual(lines[2].date, date(2020, 4, 18))
|
||||
self.assertEqual(lines[3].date, date(2020, 4, 18))
|
||||
|
||||
def _get_statement_line_data(self, statement_date):
|
||||
return [
|
||||
{
|
||||
"payment_ref": "payment",
|
||||
"amount": 100,
|
||||
"date": statement_date,
|
||||
"unique_import_id": str(statement_date),
|
||||
"partner_name": "John Doe",
|
||||
"account_number": "XX00 0000 0000 0000",
|
||||
}
|
||||
], {}
|
||||
|
||||
def test_dont_create_empty_statements(self):
|
||||
"""Test the default behavior of not creating empty bank
|
||||
statements ('Allow empty statements' field is uncheck at the
|
||||
provider level.).
|
||||
"""
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.statement_creation_mode = "daily"
|
||||
with mock.patch(mock_obtain_statement_data) as mock_data:
|
||||
mock_data.side_effect = [
|
||||
self._get_statement_line_data(date(2021, 8, 10)),
|
||||
([], {}), # August 8th, doesn't have statement
|
||||
([], {}), # August 9th, doesn't have statement
|
||||
self._get_statement_line_data(date(2021, 8, 13)),
|
||||
]
|
||||
provider._pull(datetime(2021, 8, 10), datetime(2021, 8, 14))
|
||||
statements = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
self.assertEqual(len(statements), 2)
|
||||
self.assertEqual(statements[1].balance_start, 0)
|
||||
self.assertEqual(statements[1].balance_end_real, 100)
|
||||
self.assertEqual(len(statements[1].line_ids), 1)
|
||||
self.assertEqual(statements[0].balance_start, 100)
|
||||
self.assertEqual(statements[0].balance_end_real, 200)
|
||||
self.assertEqual(len(statements[0].line_ids), 1)
|
||||
|
||||
def test_create_empty_statements(self):
|
||||
"""Test creating empty bank statements
|
||||
('Allow empty statements' field is check at the provider level).
|
||||
"""
|
||||
journal = self.AccountJournal.create(
|
||||
{
|
||||
"name": "Bank",
|
||||
"type": "bank",
|
||||
"code": "BANK",
|
||||
"bank_statements_source": "online",
|
||||
"online_bank_statement_provider": "dummy",
|
||||
}
|
||||
)
|
||||
provider = journal.online_bank_statement_provider_id
|
||||
provider.active = True
|
||||
provider.allow_empty_statements = True
|
||||
provider.statement_creation_mode = "daily"
|
||||
with mock.patch(mock_obtain_statement_data) as mock_data:
|
||||
mock_data.side_effect = [
|
||||
self._get_statement_line_data(date(2021, 8, 10)),
|
||||
([], {}), # August 8th, doesn't have statement
|
||||
([], {}), # August 9th, doesn't have statement
|
||||
self._get_statement_line_data(date(2021, 8, 13)),
|
||||
]
|
||||
provider._pull(datetime(2021, 8, 10), datetime(2021, 8, 14))
|
||||
statements = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
||||
# 4 Statements: 2 with movements and 2 empty
|
||||
self.assertEqual(len(statements), 4)
|
||||
# With movement
|
||||
self.assertEqual(statements[3].balance_start, 0)
|
||||
self.assertEqual(statements[3].balance_end_real, 100)
|
||||
self.assertEqual(len(statements[3].line_ids), 1)
|
||||
# Empty
|
||||
self.assertEqual(statements[2].balance_start, 100)
|
||||
self.assertEqual(statements[2].balance_end_real, 100)
|
||||
self.assertEqual(len(statements[2].line_ids), 0)
|
||||
# Empty
|
||||
self.assertEqual(statements[1].balance_start, 100)
|
||||
self.assertEqual(statements[1].balance_end_real, 100)
|
||||
self.assertEqual(len(statements[1].line_ids), 0)
|
||||
# With movement
|
||||
self.assertEqual(statements[0].balance_start, 100)
|
||||
self.assertEqual(statements[0].balance_end_real, 200)
|
||||
self.assertEqual(len(statements[0].line_ids), 1)
|
||||
@@ -0,0 +1,22 @@
|
||||
# Copyright 2021 Therp BV (https://therp.nl).
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
from unittest.mock import patch
|
||||
|
||||
from odoo.tests import common
|
||||
|
||||
|
||||
class TestAccountJournal(common.TransactionCase):
|
||||
"""Test some functions adde d to account.journal model."""
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.AccountJournal = self.env["account.journal"]
|
||||
|
||||
def test_values_online_bank_statement_provider(self):
|
||||
"""Check method to retrieve provider types."""
|
||||
# Make sure the users seems to have the group_no_one.
|
||||
with patch.object(
|
||||
self.AccountJournal.__class__, "user_has_groups", return_value=True
|
||||
):
|
||||
values = self.AccountJournal.values_online_bank_statement_provider()
|
||||
self.assertIn("dummy", [entry[0] for entry in values])
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
<record id="view_bank_statement_line_form" model="ir.ui.view">
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_statement_import.view_bank_statement_line_form"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="move_id" position="after">
|
||||
<field name="partner_name" />
|
||||
</field>
|
||||
<xpath expr="//sheet" position="inside">
|
||||
<group colspan="4" col="1">
|
||||
<separator string="Raw Data" />
|
||||
<field
|
||||
name="online_raw_data"
|
||||
nolabel="1"
|
||||
groups="base.group_no_one"
|
||||
/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
63
account_statement_import_online/views/account_journal.xml
Normal file
63
account_statement_import_online/views/account_journal.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
Copyright 2019-2020 Dataplug (https://dataplug.io)
|
||||
Copyright 2021 Therp BV (https://therp.nl).
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="view_account_journal_form">
|
||||
<field name="name">account.journal.form</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form" />
|
||||
<field name="arch" type="xml">
|
||||
<page name="bank_account" position="inside">
|
||||
<group
|
||||
name="online_bank_statements"
|
||||
string="Online Bank Statements (OCA)"
|
||||
groups="account.group_account_user"
|
||||
attrs="{'invisible': [('bank_statements_source', '!=', 'online')]}"
|
||||
>
|
||||
<label
|
||||
for="online_bank_statement_provider"
|
||||
string="Provider"
|
||||
attrs="{'required': [('bank_statements_source', '=', 'online')]}"
|
||||
class="oe_edit_only"
|
||||
groups="account.group_account_user"
|
||||
/>
|
||||
<field
|
||||
name="online_bank_statement_provider"
|
||||
nolabel="1"
|
||||
attrs="{'required': [('bank_statements_source', '=', 'online')]}"
|
||||
class="oe_edit_only"
|
||||
groups="account.group_account_user"
|
||||
widget="dynamic_dropdown"
|
||||
values="values_online_bank_statement_provider"
|
||||
/>
|
||||
<label
|
||||
for="online_bank_statement_provider_id"
|
||||
string="Provider"
|
||||
attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
|
||||
class="oe_read_only"
|
||||
/>
|
||||
<field
|
||||
name="online_bank_statement_provider_id"
|
||||
nolabel="1"
|
||||
attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
|
||||
class="oe_read_only"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<xpath expr="/form/sheet" position="before">
|
||||
<header>
|
||||
<button
|
||||
type="action"
|
||||
name="%(action_online_bank_statements_pull_wizard)d"
|
||||
attrs="{'invisible': [('online_bank_statement_provider', '=', False)]}"
|
||||
string="Pull Online Bank Statement"
|
||||
/>
|
||||
</header>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
19
account_statement_import_online/views/actions.xml
Normal file
19
account_statement_import_online/views/actions.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2021 Therp BV (https://therp.nl).
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
<record
|
||||
id="action_online_bank_statements_pull_wizard"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Online Bank Statements Pull Wizard</field>
|
||||
<field name="res_model">online.bank.statement.pull.wizard</field>
|
||||
<field name="target">new</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="binding_model_id" ref="account.model_account_journal" />
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_user'))]" />
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
|
||||
Copyright 2019 Dataplug (https://dataplug.io)
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="online_bank_statement_provider_filter">
|
||||
<field name="name">online.bank.statement.provider.filter</field>
|
||||
<field name="model">online.bank.statement.provider</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Online Bank Statement Providers">
|
||||
<field name="journal_id" />
|
||||
<filter
|
||||
name="active"
|
||||
string="Inactive"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<group name="groupby">
|
||||
<filter
|
||||
name="service_groupby"
|
||||
string="Service"
|
||||
context="{'group_by': 'service'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="online_bank_statement_provider_tree">
|
||||
<field name="name">online.bank.statement.provider.tree</field>
|
||||
<field name="model">online.bank.statement.provider</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="journal_id" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
<field name="service" />
|
||||
<field name="currency_id" />
|
||||
<field name="update_schedule" />
|
||||
<field name="next_run" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="online_bank_statement_provider_form">
|
||||
<field name="name">online.bank.statement.provider.form</field>
|
||||
<field name="model">online.bank.statement.provider</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Online Bank Statement Provider">
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<group name="main" col="2">
|
||||
<group name="params">
|
||||
<field name="journal_id" />
|
||||
<field name="currency_id" />
|
||||
<field name="account_number" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<field
|
||||
name="service"
|
||||
widget="dynamic_dropdown"
|
||||
values="values_service"
|
||||
/>
|
||||
<field name="active" invisible="1" />
|
||||
</group>
|
||||
<group name="pull" string="Scheduled Pull">
|
||||
<label for="interval_number" />
|
||||
<div class="o_row" id="interval_number">
|
||||
<field name="interval_number" class="ml8" />
|
||||
<field name="interval_type" />
|
||||
</div>
|
||||
<field name="next_run" />
|
||||
</group>
|
||||
<group name="configuration" string="Configuration">
|
||||
<field name="statement_creation_mode" />
|
||||
<field name="tz" />
|
||||
<field name="allow_empty_statements" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="online_bank_statement_provider_action" model="ir.actions.act_window">
|
||||
<field name="name">Online Bank Statement Providers</field>
|
||||
<field name="res_model">online.bank.statement.provider</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="online_bank_statement_provider_menu"
|
||||
action="online_bank_statement_provider_action"
|
||||
parent="account.account_banks_menu"
|
||||
sequence="100"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
3
account_statement_import_online/wizards/__init__.py
Normal file
3
account_statement_import_online/wizards/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import online_bank_statement_pull_wizard
|
||||
@@ -0,0 +1,62 @@
|
||||
# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
# Copyright 2019-2020 Dataplug (https://dataplug.io)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class OnlineBankStatementPullWizard(models.TransientModel):
|
||||
_name = "online.bank.statement.pull.wizard"
|
||||
_description = "Online Bank Statement Pull Wizard"
|
||||
|
||||
date_since = fields.Datetime(
|
||||
string="From",
|
||||
required=True,
|
||||
default=fields.Datetime.now,
|
||||
)
|
||||
date_until = fields.Datetime(
|
||||
string="To",
|
||||
required=True,
|
||||
default=fields.Datetime.now,
|
||||
)
|
||||
# The link to providers is Many2many, because you can select multiple
|
||||
# journals for the action to pull statements.
|
||||
provider_ids = fields.Many2many(
|
||||
string="Providers",
|
||||
comodel_name="online.bank.statement.provider",
|
||||
column1="wizard_id",
|
||||
column2="provider_id",
|
||||
relation="online_bank_statement_provider_pull_wizard_rel",
|
||||
)
|
||||
|
||||
@api.model
|
||||
def default_get(self, fields_list):
|
||||
"""Retrieve providers from the journals for which this wizard is launched."""
|
||||
res = super().default_get(fields_list)
|
||||
journal_ids = []
|
||||
if self.env.context.get("active_model") == "account.journal":
|
||||
if self.env.context.get("active_ids"):
|
||||
journal_ids = self.env.context["active_ids"]
|
||||
elif self.env.context.get("active_id"):
|
||||
journal_ids = [self.env.context["active_id"]]
|
||||
if journal_ids:
|
||||
journals = self.env["account.journal"].browse(journal_ids)
|
||||
res["provider_ids"] = [journals.online_bank_statement_provider_id.id]
|
||||
return res
|
||||
|
||||
def action_pull(self):
|
||||
"""Pull statements from providers and then show list of statements."""
|
||||
self.ensure_one()
|
||||
self.with_context(active_test=False).provider_ids._pull(
|
||||
self.date_since, self.date_until
|
||||
)
|
||||
action = self.env.ref("account.action_bank_statement_tree").sudo().read([])[0]
|
||||
if len(self.provider_ids) == 1:
|
||||
action["context"] = {
|
||||
"search_default_journal_id": self.provider_ids[0].journal_id.id
|
||||
}
|
||||
else:
|
||||
action["domain"] = [
|
||||
("journal_id", "in", [o.journal_id.id for o in self.provider_ids])
|
||||
]
|
||||
return action
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||
Copyright 2019-2020 Dataplug (https://dataplug.io)
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
<record id="online_bank_statement_pull_wizard_form" model="ir.ui.view">
|
||||
<field name="name">online.bank.statement.pull.wizard.form</field>
|
||||
<field name="model">online.bank.statement.pull.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group name="main">
|
||||
<field
|
||||
name="provider_ids"
|
||||
widget="many2many_tags"
|
||||
required="1"
|
||||
options="{'create': false, 'create_edit': false}"
|
||||
/>
|
||||
<field name="date_since" />
|
||||
<field name="date_until" />
|
||||
</group>
|
||||
<footer>
|
||||
<button
|
||||
name="action_pull"
|
||||
string="Pull"
|
||||
type="object"
|
||||
default_focus="1"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button string="Cancel" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
# generated from manifests external_dependencies
|
||||
odoo_test_helper
|
||||
@@ -0,0 +1 @@
|
||||
../../../../account_statement_import_online
|
||||
6
setup/account_statement_import_online/setup.py
Normal file
6
setup/account_statement_import_online/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
Reference in New Issue
Block a user