mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
account_payment_order_transfer_journal - add 'general' filter on transfer journal
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
# Copyright 2022 ACSONE SA/NV
|
||||
# Copyright 2023 Noviat
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountJournal(models.Model):
|
||||
|
||||
_inherit = "account.journal"
|
||||
|
||||
transfer_journal_id = fields.Many2one(
|
||||
comodel_name="account.journal",
|
||||
string="Transfer journal on payment/debit orders",
|
||||
domain="[('type', '=', 'general')]",
|
||||
help="Journal to write payment entries when confirming payment/debit orders",
|
||||
)
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="payment_sequence" position="attributes">
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'invisible': [('transfer_journal_id', '!=', False)]}</attribute>
|
||||
</field>
|
||||
<field name="payment_sequence" position="after">
|
||||
<field name="transfer_journal_id" />
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user