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.

25 lines
697 B

  1. # Copyright (C) 2015 - Today: GRAP (http://www.grap.coop)
  2. # @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import models, fields
  5. class PosPlace(models.Model):
  6. _name = 'pos.place'
  7. _description = 'Point of Sale Places'
  8. # Default section
  9. def _default_company_id(self):
  10. return self.env.user.company_id.id
  11. # Columns section
  12. code = fields.Char(required=True, size=6)
  13. name = fields.Char(required=True)
  14. active = fields.Boolean(default=True)
  15. company_id = fields.Many2one(
  16. string='Company', comodel_name='res.company',
  17. default=_default_company_id)