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.

22 lines
707 B

  1. # -*- coding: utf-8 -*-
  2. from odoo import models, fields
  3. SCALES = [
  4. ("1", "National"),
  5. ("2", "Regional"),
  6. ("3", "Departmental"),
  7. ("4", "Local"),
  8. ("5", "Licensee"),
  9. ]
  10. class FfckStructureType(models.Model):
  11. _name = "ffck.structure.type"
  12. _description = "FFCK structure type"
  13. _order = "scale, short, name, id"
  14. name = fields.Char("Name", required=True, translate=True)
  15. short = fields.Char("Short", required=True, index=True)
  16. scale = fields.Selection(selection=SCALES, string="Scale", required=True)
  17. active = fields.Boolean(string="Active", default=True)
  18. parent_id = fields.Many2one(comodel_name="ffck.structure.type", string="Parent")