mirror of
https://github.com/brain-tec/account_ebics.git
synced 2026-04-26 07:36:51 +00:00
[IMP] small improvements
This commit is contained in:
@@ -1,15 +1,18 @@
|
|||||||
# Copyright 2020 Noviat.
|
# Copyright 2020 Noviat.
|
||||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
|
# 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
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
class AccountBatchPayment(models.Model):
|
class AccountBatchPayment(models.Model):
|
||||||
_inherit = "account.batch.payment"
|
_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):
|
def _compute_hide_ebics_upload(self):
|
||||||
for rec in self:
|
for rec in self:
|
||||||
rec.hide_ebics_upload = (
|
rec.hide_ebics_upload = (
|
||||||
|
|||||||
@@ -5,12 +5,13 @@
|
|||||||
<field name="model">account.batch.payment</field>
|
<field name="model">account.batch.payment</field>
|
||||||
<field name="inherit_id" ref="account_batch_payment.view_batch_payment_form" />
|
<field name="inherit_id" ref="account_batch_payment.view_batch_payment_form" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<button name="validate_batch_button" position="after">
|
<button id="print_button" position="before">
|
||||||
<button
|
<button
|
||||||
name="ebics_upload"
|
name="ebics_upload"
|
||||||
type="object"
|
type="object"
|
||||||
invisible="hide_ebics_upload"
|
invisible="hide_ebics_upload"
|
||||||
string="EBICS Upload"
|
string="EBICS Upload"
|
||||||
|
class="oe_highlight"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Copyright 2015 Noviat.
|
# 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
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
# Copyright 2015 Noviat.
|
# Copyright 2015 Noviat.
|
||||||
# License LGPL-3 or later (https://www.gnu.org/licenses/lgpl).
|
# 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
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
class AccountPaymentOrder(models.Model):
|
class AccountPaymentOrder(models.Model):
|
||||||
_inherit = "account.payment.order"
|
_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):
|
def _compute_hide_ebics_upload(self):
|
||||||
for rec in self:
|
for rec in self:
|
||||||
rec.hide_ebics_upload = (
|
rec.hide_ebics_upload = (
|
||||||
|
|||||||
Reference in New Issue
Block a user