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 = (