partner-contact/partner_bank_code/models/res_bank.py
2021-10-03 02:11:47 +00:00

20 lines
475 B
Python

# Copyright 2021 Ecosoft Co., Ltd. (https://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from flectra import fields, models
class ResBank(models.Model):
_inherit = "res.bank"
bank_code = fields.Char()
bank_branch_code = fields.Char()
_sql_constraints = [
(
"bank_code_unique",
"unique(bank_code, bank_branch_code)",
"Bank and Branch Code should be unique.",
),
]