pos_table.py 791 B

123456789101112131415161718192021222324252627282930313233
  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 OpenSynergy Indonesia
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from openerp import models, fields
  5. class PosTable(models.Model):
  6. _name = "pos.table"
  7. _description = "PoS Table"
  8. name = fields.Char(
  9. string="Table Name",
  10. required=True,
  11. )
  12. floor_id = fields.Many2one(
  13. string="Floor",
  14. comodel_name="pos.floor",
  15. required=True,
  16. )
  17. capacity = fields.Integer(
  18. string="Capacity",
  19. )
  20. state = fields.Selection(
  21. string="State",
  22. selection=[
  23. ("available", "Available"),
  24. ("vacant", "Vacant"),
  25. ("reserved", "Reserved"),
  26. ],
  27. required=True,
  28. default="available",
  29. )