bank-payment/account_payment_mode_default_account/models/account_payment_mode.py
2023-05-19 10:19:51 +02:00

20 lines
910 B
Python

# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from flectra import fields, models
class AccountPaymentMode(models.Model):
_inherit = "account.payment.mode"
default_receivable_account_id = fields.Many2one(
"account.account",
domain="[('deprecated', '=', False),('company_id', '=', company_id),('user_type_id.type', '=', 'receivable')]", # noqa
help="This account will be used instead of the default one as the receivable account on invoices using this payment mode", # noqa
)
default_payable_account_id = fields.Many2one(
"account.account",
domain="[('deprecated', '=', False), ('company_id', '=', company_id),('user_type_id.type', '=', 'payable')]", # noqa
help="This account will be used instead of the default one as the payable account on invoices using this payment mode", # noqa
)