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.

30 lines
759 B

  1. # -*- coding: utf-8 -*-
  2. # © 2014-2016 Camptocamp SA (Author: Romain Deheele)
  3. # © 2017 senseFly, Amaris (Author: Quentin Theuret)
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. from odoo import models
  6. from odoo import fields
  7. class Continent(models.Model):
  8. _name = 'res.continent'
  9. _description = 'Continent'
  10. _order = 'name'
  11. name = fields.Char(
  12. string='Continent Name',
  13. help='The full name of the continent.',
  14. required=True,
  15. translate=True,
  16. )
  17. code = fields.Char(
  18. string='Continent Code',
  19. size=2,
  20. required=True,
  21. )
  22. country_ids = fields.One2many(
  23. comodel_name='res.country',
  24. inverse_name='continent_id',
  25. string="Countries",
  26. )