You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
472 B

# Copyright 2021 Ecosoft Co., Ltd. (https://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo 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.",
),
]