+
+
+
+
-
- EBICS File Transfer - Download
- ir.actions.act_window
- ebics.xfer
- form
- new
- {'ebics_download': 1}
-
-
+
+ EBICS File Transfer - Download
+ ir.actions.act_window
+ ebics.xfer
+ form
+ new
+ {'ebics_download': 1}
+
+
-
- EBICS File Transfer - Upload
- ir.actions.act_window
- ebics.xfer
- form
- new
- {'ebics_upload': 1}
-
-
+
+ EBICS File Transfer - Upload
+ ir.actions.act_window
+ ebics.xfer
+ form
+ new
+ {'ebics_upload': 1}
+
+
+
+
+ Mark EBICS files as Downloaded
+ ebics.xfer
+ 1
+
+
+
+ The EBICS Files (Bank Statements) selected via this screen will not become available in Odoo as
+ EBICS files but will be marked by your bank as downloaded.
+
+ As a consequence, these Bank Statements will not be retrieved by the next 'EBICS Batch Import'
+ scheduled action.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mark files as Downloaded
+ ir.actions.act_window
+ ebics.xfer
+ form
+ new
+ {'ebics_download': 1, 'ebics_mark_as_downloaded': 1}
+
+
diff --git a/account_ebics_batch_payment/__manifest__.py b/account_ebics_batch_payment/__manifest__.py
index 37759aa..0637d0e 100644
--- a/account_ebics_batch_payment/__manifest__.py
+++ b/account_ebics_batch_payment/__manifest__.py
@@ -1,9 +1,9 @@
-# Copyright 2009-2024 Noviat.
+# Copyright 2020 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Upload Batch Payment via EBICS",
- "version": "17.0.1.0.3",
+ "version": "17.0.1.1.0",
"license": "LGPL-3",
"author": "Noviat",
"website": "https://www.noviat.com/",
diff --git a/account_ebics_batch_payment/models/account_batch_payment.py b/account_ebics_batch_payment/models/account_batch_payment.py
index f80ed4e..bdb891d 100644
--- a/account_ebics_batch_payment/models/account_batch_payment.py
+++ b/account_ebics_batch_payment/models/account_batch_payment.py
@@ -1,32 +1,38 @@
-# Copyright 2009-2023 Noviat.
+# Copyright 2020 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
-from odoo import _, models
+from odoo import _, api, fields, models
from odoo.exceptions import UserError
class AccountBatchPayment(models.Model):
_inherit = "account.batch.payment"
+ hide_ebics_upload = fields.Boolean(
+ compute="_compute_hide_ebics_upload", default=True
+ )
+
+ @api.depends("journal_id.ebics_config_id", "file_generation_enabled", "state")
+ def _compute_hide_ebics_upload(self):
+ for rec in self:
+ rec.hide_ebics_upload = (
+ not rec.journal_id.ebics_config_id
+ or not rec.file_generation_enabled
+ or rec.state != "sent"
+ )
+
def ebics_upload(self):
self.ensure_one()
ctx = self.env.context.copy()
origin = _("Batch Payment") + ": " + self.name
- ebics_config = self.env["ebics.config"].search(
- [
- ("journal_ids", "=", self.journal_id.id),
- ("state", "=", "confirm"),
- ]
- )
- if not ebics_config:
+ if not self.journal_id.ebics_config_id:
raise UserError(
- _("No active EBICS configuration available " "for the selected bank.")
+ _("No active EBICS configuration available for the selected bank.")
)
- if len(ebics_config) == 1:
- ctx["default_ebics_config_id"] = ebics_config.id
ctx.update(
{
+ "default_ebics_config_id": self.journal_id.ebics_config_id.id,
"default_upload_data": self.export_file,
"default_upload_fname": self.export_filename,
"origin": origin,
@@ -44,7 +50,6 @@ class AccountBatchPayment(models.Model):
view = self.env.ref("account_ebics.ebics_xfer_view_form_upload")
act = {
"name": _("EBICS Upload"),
- "view_type": "form",
"view_mode": "form",
"res_model": "ebics.xfer",
"view_id": view.id,
diff --git a/account_ebics_batch_payment/views/account_batch_payment_views.xml b/account_ebics_batch_payment/views/account_batch_payment_views.xml
index 4fa3326..ed9d7f0 100644
--- a/account_ebics_batch_payment/views/account_batch_payment_views.xml
+++ b/account_ebics_batch_payment/views/account_batch_payment_views.xml
@@ -7,10 +7,11 @@
diff --git a/account_ebics_payment_order/__manifest__.py b/account_ebics_payment_order/__manifest__.py
index 184bb7c..2ae5575 100644
--- a/account_ebics_payment_order/__manifest__.py
+++ b/account_ebics_payment_order/__manifest__.py
@@ -1,9 +1,9 @@
-# Copyright 2009-2024 Noviat.
-# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
+# Copyright 2015 Noviat.
+# License LGPL-3 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Upload Payment Order via EBICS",
- "version": "17.0.1.1.0",
+ "version": "17.0.1.2.0",
"license": "LGPL-3",
"author": "Noviat",
"website": "https://www.noviat.com/",
diff --git a/account_ebics_payment_order/models/account_payment_mode.py b/account_ebics_payment_order/models/account_payment_mode.py
index 92a9fc4..055fbf4 100644
--- a/account_ebics_payment_order/models/account_payment_mode.py
+++ b/account_ebics_payment_order/models/account_payment_mode.py
@@ -1,5 +1,5 @@
-# Copyright 2009-2024 Noviat.
-# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
+# Copyright 2015 Noviat.
+# License LGPL-3 or later (https://www.gnu.org/licenses/lgpl).
from odoo import fields, models
diff --git a/account_ebics_payment_order/models/account_payment_order.py b/account_ebics_payment_order/models/account_payment_order.py
index 14bfa7d..f268734 100644
--- a/account_ebics_payment_order/models/account_payment_order.py
+++ b/account_ebics_payment_order/models/account_payment_order.py
@@ -1,13 +1,24 @@
-# Copyright 2009-2024 Noviat.
-# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
+# Copyright 2015 Noviat.
+# License LGPL-3 or later (https://www.gnu.org/licenses/lgpl).
-from odoo import _, models
+from odoo import _, api, fields, models
from odoo.exceptions import UserError
class AccountPaymentOrder(models.Model):
_inherit = "account.payment.order"
+ hide_ebics_upload = fields.Boolean(
+ compute="_compute_hide_ebics_upload", default=True
+ )
+
+ @api.depends("journal_id.ebics_config_id", "state")
+ def _compute_hide_ebics_upload(self):
+ for rec in self:
+ rec.hide_ebics_upload = (
+ not rec.journal_id.ebics_config_id or rec.state != "generated"
+ )
+
def ebics_upload(self):
self.ensure_one()
ctx = self.env.context.copy()
@@ -28,8 +39,8 @@ class AccountPaymentOrder(models.Model):
if not attach:
raise UserError(
_(
- "This payment order doesn't contains attachements."
- "\nPlease generate first the Payment Order file first."
+ "This payment order doesn't contains attachments."
+ "\nPlease generate first the Payment Order file."
)
)
elif len(attach) > 1:
@@ -43,23 +54,16 @@ class AccountPaymentOrder(models.Model):
)
else:
origin = _("Payment Order") + ": " + self.name
- ebics_config = self.env["ebics.config"].search(
- [
- ("journal_ids", "=", self.journal_id.id),
- ("state", "=", "confirm"),
- ]
- )
- if not ebics_config:
+ if not self.journal_id.ebics_config_id:
raise UserError(
_(
"No active EBICS configuration available "
"for the selected bank."
)
)
- if len(ebics_config) == 1:
- ctx["default_ebics_config_id"] = ebics_config.id
ctx.update(
{
+ "default_ebics_config_id": self.journal_id.ebics_config_id.id,
"default_upload_data": attach.datas,
"default_upload_fname": attach.name,
"origin": origin,
@@ -76,7 +80,6 @@ class AccountPaymentOrder(models.Model):
view = self.env.ref("account_ebics.ebics_xfer_view_form_upload")
act = {
"name": _("EBICS Upload"),
- "view_type": "form",
"view_mode": "form",
"res_model": "ebics.xfer",
"view_id": view.id,
diff --git a/account_ebics_payment_order/views/account_payment_order_views.xml b/account_ebics_payment_order/views/account_payment_order_views.xml
index 46bad82..0a23fad 100644
--- a/account_ebics_payment_order/views/account_payment_order_views.xml
+++ b/account_ebics_payment_order/views/account_payment_order_views.xml
@@ -7,10 +7,11 @@
+