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.

28 lines
926B

  1. # Copyright (C) 2017-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 WizardCreateRepository(models.TransientModel):
  6. _name = "wizard.create.repository"
  7. _description = "Wizard Create Repository"
  8. _inherit = ["github.repository"]
  9. # Overload Columns Section
  10. name = fields.Char(readonly=False)
  11. website = fields.Char(readonly=False)
  12. description = fields.Char(readonly=False)
  13. organization_id = fields.Many2one(readonly=False)
  14. def get_github_data_from_odoo(self):
  15. self.ensure_one()
  16. res = super().get_github_data_from_odoo()
  17. return res
  18. def button_create_in_github(self):
  19. self.ensure_one()
  20. new_item = self.create_in_github(self.env["github.repository"])
  21. return new_item.get_action()
上海开阖软件有限公司 沪ICP备12045867号-1