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
844 B

  1. # Copyright 2017-2018 ACSONE SA/NV
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import fields, models
  4. class ResPartnerCompanyType(models.Model):
  5. _name = 'res.partner.company.type'
  6. _description = 'Partner Company Type'
  7. name = fields.Char(
  8. string='Title',
  9. required=True,
  10. translate=True,
  11. )
  12. shortcut = fields.Char(
  13. string='Abbreviation',
  14. translate=True,
  15. )
  16. country_id = fields.Many2one(
  17. comodel_name="res.country",
  18. string="Country",
  19. help="Allows this company type to be selected on partners from this "
  20. "country only. "
  21. "Leave it blank if you want it to appear on any partner.",
  22. )
  23. _sql_constraints = [('name_uniq', 'unique (name)',
  24. "Partner Company Type already exists!")]