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

  1. # Copyright 2021 Ecosoft Co., Ltd. (https://ecosoft.co.th)
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  3. from odoo import fields, models
  4. class ResBank(models.Model):
  5. _inherit = "res.bank"
  6. bank_code = fields.Char()
  7. bank_branch_code = fields.Char()
  8. _sql_constraints = [
  9. (
  10. "bank_code_unique",
  11. "unique(bank_code, bank_branch_code)",
  12. "Bank and Branch Code should be unique.",
  13. ),
  14. ]