\n"
"Language-Team: none\n"
"Language: es\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.17\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.0.1\n"
+
+#. module: account_statement_import_online_gocardless
+#: model_terms:ir.ui.view,arch_db:account_statement_import_online_gocardless.view_online_bank_statement_provider_existing_form
+msgid ""
+" There's already another journal from the "
+"same bank institution linked with GoCardless. Do you want to reuse the "
+"existing credentials or create new ones?"
+msgstr ""
+" Ya existe otro diario de la misma "
+"institución bancaria enlazado con GoCardless. ¿Quiere reutilizar las "
+"credenciales existentes o crear unas nuevas?"
#. module: account_statement_import_online_gocardless
#. odoo-javascript
@@ -23,6 +34,28 @@ msgstr ""
msgid "Available countries:"
msgstr "Países disponibles:"
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing__create_uid
+msgid "Created by"
+msgstr "Creado por"
+
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing__create_date
+msgid "Created on"
+msgstr "Creado el"
+
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing__display_name
+msgid "Display Name"
+msgstr "Nombre mostrado"
+
+#. 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 "Existing link"
+msgstr "Enlace existente"
+
#. 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"
@@ -73,6 +106,11 @@ msgstr "Token"
msgid "Gocardless Token Expiration"
msgstr "Caducdad del token"
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing__id
+msgid "ID"
+msgstr "Identificador"
+
#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
@@ -80,11 +118,46 @@ msgstr "Caducdad del token"
msgid "Incorrect country code or country not supported."
msgstr "Código de país incorrecto o país no admitido."
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing____last_update
+msgid "Last Modified on"
+msgstr "Última modificación el"
+
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing__write_uid
+msgid "Last Updated by"
+msgstr "Última modificación por"
+
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing__write_date
+msgid "Last Updated on"
+msgstr "Última modificación el"
+
+#. module: account_statement_import_online_gocardless
+#: model_terms:ir.ui.view,arch_db:account_statement_import_online_gocardless.view_online_bank_statement_provider_existing_form
+msgid "New link"
+msgstr "Nuevo enlace"
+
#. 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 "Proveedor de Extractos Bancarios en Línea"
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing__other_provider_id
+msgid "Other Provider"
+msgstr "Otro proveedor"
+
+#. module: account_statement_import_online_gocardless
+#: model:ir.model.fields,field_description:account_statement_import_online_gocardless.field_online_bank_statement_provider_existing__provider_id
+msgid "Provider"
+msgstr "Proveedor"
+
+#. module: account_statement_import_online_gocardless
+#: model_terms:ir.ui.view,arch_db:account_statement_import_online_gocardless.view_online_bank_statement_provider_existing_form
+msgid "Reuse existing"
+msgstr "Reutilizar existente"
+
#. module: account_statement_import_online_gocardless
#. odoo-javascript
#: code:addons/account_statement_import_online_gocardless/static/src/xml/select_bank_widget.xml:0
@@ -121,6 +194,16 @@ msgstr "Seleccione el Banco de su Cuenta"
msgid "Select Country to Filter"
msgstr "Seleccione el País a Filtrar"
+#. module: account_statement_import_online_gocardless
+#: model_terms:ir.ui.view,arch_db:account_statement_import_online_gocardless.view_online_bank_statement_provider_existing_form
+msgid ""
+"Some banks only allow one credentials, while others work better with "
+"separate ones, so it's a matter of trying."
+msgstr ""
+"Algunos bancos solo permiten unas credenciales, mientras otros funcionan "
+"mejor con credenciales separadas, así que es una cuestión de probar ambas "
+"opciones."
+
#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
@@ -128,6 +211,11 @@ msgstr "Seleccione el País a Filtrar"
msgid "To continue configure bank account on journal %s"
msgstr "Para seguir configurando la cuenta bancaria en el diario %s"
+#. module: account_statement_import_online_gocardless
+#: model:ir.model,name:account_statement_import_online_gocardless.model_online_bank_statement_provider_existing
+msgid "Wizard for reusing existing GoCardless provider"
+msgstr "Asistente para reutilizar un proveedor de GoCardless existente"
+
#. module: account_statement_import_online_gocardless
#. odoo-python
#: code:addons/account_statement_import_online_gocardless/models/online_bank_statement_provider.py:0
diff --git a/account_statement_import_online_gocardless/models/online_bank_statement_provider.py b/account_statement_import_online_gocardless/models/online_bank_statement_provider.py
index 66cbd265..dfdb9724 100644
--- a/account_statement_import_online_gocardless/models/online_bank_statement_provider.py
+++ b/account_statement_import_online_gocardless/models/online_bank_statement_provider.py
@@ -1,5 +1,5 @@
# Copyright 2022 ForgeFlow S.L.
-# Copyright 2023 Tecnativa - Pedro M. Baeza
+# Copyright 2023-2024 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import json
from datetime import datetime
@@ -104,8 +104,8 @@ class OnlineBankStatementProvider(models.Model):
% (self.journal_id.display_name)
)
# Check if there's another existing provider for the same bank institution,
- # and reuse it for this bank account, as some banks don't allow several
- # requisitions from the same source (GoCardless).
+ # and ask for reusing it for this bank account, as some banks don't allow
+ # several requisitions from the same source (GoCardless).
other = self.search(
[
("service", "=", "gocardless"),
@@ -116,19 +116,24 @@ class OnlineBankStatementProvider(models.Model):
limit=1,
)
if other:
- self.write(
+ wizard = self.env["online.bank.statement.provider.existing"].create(
{
- "gocardless_requisition_ref": other.gocardless_requisition_ref,
- "gocardless_requisition_id": other.gocardless_requisition_id,
- "gocardless_requisition_expiration": (
- other.gocardless_requisition_expiration
- ),
- "gocardless_institution_id": other.gocardless_institution_id,
+ "provider_id": self.id,
+ "other_provider_id": other.id,
}
)
- if self._gocardless_finish_requisition(dry=True):
- return
- # Ask for the institution and continue normal process otherwise
+ return {
+ "type": "ir.actions.act_window",
+ "res_model": wizard._name,
+ "res_id": wizard.id,
+ "name": _("Existing link"),
+ "view_mode": "form",
+ "target": "new",
+ }
+ return self._gocardless_select_bank_instituion()
+
+ def _gocardless_select_bank_instituion(self):
+ """Ask for the GoCardless bank instituion and continue full linkage."""
country = (
self.journal_id.bank_account_id.company_id or self.journal_id.company_id
).country_id
diff --git a/account_statement_import_online_gocardless/security/ir.model.access.csv b/account_statement_import_online_gocardless/security/ir.model.access.csv
new file mode 100644
index 00000000..794573f3
--- /dev/null
+++ b/account_statement_import_online_gocardless/security/ir.model.access.csv
@@ -0,0 +1,2 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_online_bank_statement_provider_existing,access_online_bank_statement_provider_existing,model_online_bank_statement_provider_existing,account.group_account_user,1,1,1,0
diff --git a/account_statement_import_online_gocardless/static/description/index.html b/account_statement_import_online_gocardless/static/description/index.html
index 11f18aee..bd556eb4 100644
--- a/account_statement_import_online_gocardless/static/description/index.html
+++ b/account_statement_import_online_gocardless/static/description/index.html
@@ -1,3 +1,4 @@
+
@@ -366,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:4d87690ed02f68a1c4cad9976f65c1109112c608a3d63dd93fdcca49e0319f2b
+!! source digest: sha256:ee02b1d6ddcdef85f00fec3cfe359e76f897722fa2055e83769a41515b6455cb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

This module provides online bank statements from GoCardless Bank Account Data,
diff --git a/account_statement_import_online_gocardless/view/online_bank_statement_provider.xml b/account_statement_import_online_gocardless/view/online_bank_statement_provider.xml
index 2fe66c79..2c8ca375 100644
--- a/account_statement_import_online_gocardless/view/online_bank_statement_provider.xml
+++ b/account_statement_import_online_gocardless/view/online_bank_statement_provider.xml
@@ -39,6 +39,7 @@
diff --git a/account_statement_import_online_gocardless/wizards/__init__.py b/account_statement_import_online_gocardless/wizards/__init__.py
new file mode 100644
index 00000000..0a064ba0
--- /dev/null
+++ b/account_statement_import_online_gocardless/wizards/__init__.py
@@ -0,0 +1,3 @@
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+
+from . import online_bank_statement_provider_existing
diff --git a/account_statement_import_online_gocardless/wizards/online_bank_statement_provider_existing.py b/account_statement_import_online_gocardless/wizards/online_bank_statement_provider_existing.py
new file mode 100644
index 00000000..e57148e9
--- /dev/null
+++ b/account_statement_import_online_gocardless/wizards/online_bank_statement_provider_existing.py
@@ -0,0 +1,31 @@
+# Copyright 2024 Tecnativa - Pedro M. Baeza
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+
+from odoo import fields, models
+
+
+class OnlineBankStatementProviderExisting(models.TransientModel):
+ _name = "online.bank.statement.provider.existing"
+ _description = "Wizard for reusing existing GoCardless provider"
+ _rec_name = "provider_id"
+
+ provider_id = fields.Many2one(comodel_name="online.bank.statement.provider")
+ other_provider_id = fields.Many2one(comodel_name="online.bank.statement.provider")
+
+ def link_existing(self):
+ provider = self.provider_id
+ other = self.other_provider_id
+ provider.write(
+ {
+ "gocardless_requisition_ref": other.gocardless_requisition_ref,
+ "gocardless_requisition_id": other.gocardless_requisition_id,
+ "gocardless_requisition_expiration": (
+ other.gocardless_requisition_expiration
+ ),
+ "gocardless_institution_id": other.gocardless_institution_id,
+ }
+ )
+ provider._gocardless_finish_requisition(dry=True)
+
+ def new_link(self):
+ return self.provider_id._gocardless_select_bank_instituion()
diff --git a/account_statement_import_online_gocardless/wizards/online_bank_statement_provider_existing_views.xml b/account_statement_import_online_gocardless/wizards/online_bank_statement_provider_existing_views.xml
new file mode 100644
index 00000000..92b2b5fb
--- /dev/null
+++ b/account_statement_import_online_gocardless/wizards/online_bank_statement_provider_existing_views.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ online.bank.statement.provider.existing
+
+
+
+
+