diff --git a/account_ebics_batch_payment/models/account_batch_payment.py b/account_ebics_batch_payment/models/account_batch_payment.py
index f6699de..2b22db7 100644
--- a/account_ebics_batch_payment/models/account_batch_payment.py
+++ b/account_ebics_batch_payment/models/account_batch_payment.py
@@ -1,15 +1,18 @@
# Copyright 2020 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
-from odoo import fields, 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")
+ 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 = (
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 02398d1..d680579 100644
--- a/account_ebics_batch_payment/views/account_batch_payment_views.xml
+++ b/account_ebics_batch_payment/views/account_batch_payment_views.xml
@@ -5,12 +5,13 @@
account.batch.payment
-
diff --git a/account_ebics_payment_order/models/account_payment_mode.py b/account_ebics_payment_order/models/account_payment_mode.py
index 00bec22..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 2015 Noviat.
-# License LGPL-3 or later (https://www.gnu.org/licenses/lpgl).
+# 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 85d9bd3..d317a9b 100644
--- a/account_ebics_payment_order/models/account_payment_order.py
+++ b/account_ebics_payment_order/models/account_payment_order.py
@@ -1,15 +1,18 @@
# Copyright 2015 Noviat.
# License LGPL-3 or later (https://www.gnu.org/licenses/lgpl).
-from odoo import fields, 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")
+ 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 = (