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.

37 lines
974B

  1. # Copyright (C) 2016-Today: Odoo Community Association (OCA)
  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 fields, models
  5. class GithubTeamPartner(models.Model):
  6. _name = "github.team.partner"
  7. _description = "Github Team Partner"
  8. _order = "team_id, partner_id"
  9. _ROLE_SELECTION = [("member", "Member"), ("maintainer", "Maintainer")]
  10. # Column Section
  11. team_id = fields.Many2one(
  12. comodel_name="github.team",
  13. string="Team",
  14. required=True,
  15. index=True,
  16. readonly=True,
  17. ondelete="cascade",
  18. )
  19. partner_id = fields.Many2one(
  20. comodel_name="res.partner",
  21. string="Member",
  22. required=True,
  23. index=True,
  24. readonly=True,
  25. ondelete="cascade",
  26. )
  27. role = fields.Selection(
  28. selection=_ROLE_SELECTION, string="Role", required=True, readonly=True
  29. )
上海开阖软件有限公司 沪ICP备12045867号-1