Skip to content

Commit

Permalink
Merge pull request #514 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/bank-statement-import (16.0)
  • Loading branch information
bt-admin authored Feb 27, 2024
2 parents 25a5d77 + 9c2ab4e commit f165815
Show file tree
Hide file tree
Showing 33 changed files with 1,870 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ addon | version | maintainers | summary
[account_statement_import_file_reconcile_oca](account_statement_import_file_reconcile_oca/) | 16.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Import Statement Files and Go Direct to Reconciliation
[account_statement_import_ofx](account_statement_import_ofx/) | 16.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Import OFX Bank Statement
[account_statement_import_online](account_statement_import_online/) | 16.0.1.2.1 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Online bank statements update
[account_statement_import_online_gocardless](account_statement_import_online_gocardless/) | 16.0.1.0.0 | | Online Bank Statements: GoCardless
[account_statement_import_online_paypal](account_statement_import_online_paypal/) | 16.0.1.0.1 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Online bank statements for PayPal.com
[account_statement_import_online_ponto](account_statement_import_online_ponto/) | 16.0.1.1.0 | | Online Bank Statements: MyPonto.com
[account_statement_import_online_ponto](account_statement_import_online_ponto/) | 16.0.1.1.1 | | Online Bank Statements: MyPonto.com
[account_statement_import_sheet_file](account_statement_import_sheet_file/) | 16.0.1.1.0 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Import TXT/CSV or XLSX files as Bank Statements in Odoo

[//]: # (end addons)
Expand Down
148 changes: 148 additions & 0 deletions account_statement_import_online_gocardless/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
==================================
Online Bank Statements: GoCardless
==================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:69caae47d7351da458bd34dff994847f02326305eb087e68e355d03f803b4d03
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/16.0/account_statement_import_online_gocardless
: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-16-0/bank-statement-import-16-0-account_statement_import_online_gocardless
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides online bank statements from GoCardless Bank Account Data,
which provides a free API for connecting and getting transactions for bank
accounts.

**Table of contents**

.. contents::
:local:

Configuration
=============

On the GoCardless website
~~~~~~~~~~~~~~~~~~~~~~~~~

#. Go to https://bankaccountdata.gocardless.com, and create or login into your
"GoCardLess Bank Account Data" account.
#. Go to Developers > User secrets option on the left.
#. Click on the "+ Create new" button on the bottom part.
#. Put a name to the user secret (eg. Odoo), and optionally limit it to certain
IPs using CIDR subnet notation.
#. Copy or download the secret ID and key for later use. The second one won't be
available anymore, so make sure you don't forget this step.

On Odoo
~~~~~~~

To configure online bank statements provider:

#. Add your user to the "Full Accounting Settings" group.
#. Go to *Invoicing > Configuration > Accounting > Journals*.
#. Select the journal representing your bank account (or create it).
#. The bank account number should be properly introduced.
#. Set *Bank Feeds* to *Online (OCA)*.
#. Select *GoCardless* as online bank statements provider in
*Online Bank Statements (OCA)* section.
#. Save the journal
#. Click on the created provider.
#. Put your secret ID and secret key on the existing fields.
#. Click on the button "Select Bank Account Identifier".

.. image:: https://raw.githubusercontent.com/OCA/bank-statement-import/16.0/account_statement_import_online_gocardless/static/img/gocardless_configuration.gif

#. A new window will appear for selecting the bank entity.

.. image:: https://raw.githubusercontent.com/OCA/bank-statement-import/16.0/account_statement_import_online_gocardless/static/img/gocardless_bank_selection.gif

#. Select it, and you will be redirected to the selected entity for introducing
your bank credentials to allow the connection.
#. If the process is completed, and the bank account linked to the journal is
accessible, you'll be again redirected to the online provider form, and
everything will be linked and ready to start the transaction pulling. A
message is logged about it on the chatter.
#. If not, an error message will be logged either in the chatter.

Usage
=====

To pull historical bank statements:

#. Go to *Invoicing > Configuration > Accounting > Journals*.
#. Select the journal representing your bank account.
#. Launch *Actions > Online Bank Statements Pull Wizard*
#. Configure date interval and click on *Pull*.

If historical data is not needed, then just simply wait for the scheduled
activity "Pull Online Bank Statements" to be executed for getting new
transactions.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_online_gocardless%0Aversion:%2016.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
~~~~~~~

* ForgeFlow
* Tecnativa

Contributors
~~~~~~~~~~~~

* `ForgeFlow <https://www.forgeflow.com>`__:

* Christopher Ormaza
* Jordi Ballester
* `Tecnativa <https://www.tecnativa.com>`__:

* Pedro M. Baeza
* `Alusage <https://nicolas.alusage.fr>`__:

* Nicolas JEUDY <https://github.com/njeudy>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/16.0/account_statement_import_online_gocardless>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions account_statement_import_online_gocardless/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import controllers
26 changes: 26 additions & 0 deletions account_statement_import_online_gocardless/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2022 ForgeFlow S.L.
# Copyright 2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Online Bank Statements: GoCardless",
"version": "16.0.1.0.0",
"category": "Account",
"website": "https://github.com/OCA/bank-statement-import",
"author": "ForgeFlow, Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": [
"account_statement_import_online",
],
"data": ["view/online_bank_statement_provider.xml"],
"assets": {
"web.assets_backend": [
"account_statement_import_online_gocardless/static/src/"
"lib/gocardless-ui/selector.css",
"account_statement_import_online_gocardless/static/src/"
"js/select_bank_widget.js",
"account_statement_import_online_gocardless/static/src/"
"xml/select_bank_widget.xml",
],
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
35 changes: 35 additions & 0 deletions account_statement_import_online_gocardless/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2022 ForgeFlow S.L.
# Copyright 2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

import werkzeug
from werkzeug.urls import url_encode

from odoo import http
from odoo.http import request


class GocardlessController(http.Controller):
@http.route("/gocardless/response", type="http", auth="public", csrf=False)
def gocardless_response(self, **post):
Provider = request.env["online.bank.statement.provider"].sudo()
current_provider = Provider.search(
[("gocardless_requisition_ref", "=", post["ref"])]
)
params = {
"action": request.env.ref(
"account_statement_import_online.online_bank_statement_provider_action"
).id,
"model": "online.bank.statement.provider",
}
if current_provider:
current_provider._gocardless_finish_requisition()
params.update(
{
"view_type": "form",
"id": current_provider.id,
}
)
else:
params["view_type"] = "list"
return werkzeug.utils.redirect("/web#" + url_encode(params), 303)
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_statement_import_online_gocardless
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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_gocardless
#. odoo-javascript
#: code:addons/account_statement_import_online_gocardless/static/src/xml/select_bank_widget.xml:0
#, python-format
msgid "Available countries:"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model_terms:ir.ui.view,arch_db:account_statement_import_online_gocardless.online_bank_statement_provider_form
msgid "GoCardless"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_account_id
msgid "Gocardless Account"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_institution_id
msgid "Gocardless Institution"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_refresh_expiration
msgid "Gocardless Refresh Expiration"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_refresh_token
msgid "Gocardless Refresh Token"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_requisition_id
msgid "Gocardless Requisition"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_requisition_expiration
msgid "Gocardless Requisition Expiration"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_requisition_ref
msgid "Gocardless Requisition Ref"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_token
msgid "Gocardless Token"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider__gocardless_token_expiration
msgid "Gocardless Token Expiration"
msgstr ""

#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
#, python-format
msgid "Incorrect country code or country not supported."
msgstr ""

#. module: account_statement_import_online_gocardless
#: model:ir.model,name:account_statement_import_online_gocardless.model_online_bank_statement_provider
msgid "Online Bank Statement Provider"
msgstr ""

#. module: account_statement_import_online_gocardless
#. odoo-javascript
#: code:addons/account_statement_import_online_gocardless/static/src/xml/select_bank_widget.xml:0
#, python-format
msgid "Search..."
msgstr ""

#. module: account_statement_import_online_gocardless
#: model_terms:ir.ui.view,arch_db:account_statement_import_online_gocardless.online_bank_statement_provider_form
msgid "Secret ID"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model_terms:ir.ui.view,arch_db:account_statement_import_online_gocardless.online_bank_statement_provider_form
msgid "Secret Key"
msgstr ""

#. module: account_statement_import_online_gocardless
#: model_terms:ir.ui.view,arch_db:account_statement_import_online_gocardless.online_bank_statement_provider_form
msgid "Select Bank Account Identifier"
msgstr ""

#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
#, python-format
msgid "Select Bank of your Account"
msgstr ""

#. module: account_statement_import_online_gocardless
#. odoo-javascript
#: code:addons/account_statement_import_online_gocardless/static/src/xml/select_bank_widget.xml:0
#, python-format
msgid "Select Country to Filter"
msgstr ""

#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
#, python-format
msgid "To continue configure bank account on journal %s"
msgstr ""

#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
#, python-format
msgid ""
"You should renew the authorization process with your bank institution for "
"GoCardless."
msgstr ""

#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
#, python-format
msgid "Your account number %(iban_number)s is successfully attached."
msgstr ""

#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
#, python-format
msgid ""
"Your account number %(iban_number)s it's not in the IBAN account numbers "
"found %(accounts_iban)s, please check"
msgstr ""
3 changes: 3 additions & 0 deletions account_statement_import_online_gocardless/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import online_bank_statement_provider
Loading

0 comments on commit f165815

Please sign in to comment.