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.

31 lines
904B

  1. # Copyright 2018 Road-Support - Roel Adriaans
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import api, fields, models
  4. class OdooModuleVersion(models.Model):
  5. _inherit = "odoo.module.version"
  6. _ODOO_DEVELOPMENT_STATUS_SELECTION = [
  7. ("alpha", "Alpha"),
  8. ("beta", "Beta"),
  9. ("production/stable", "Production/Stable"),
  10. ("mature", "Mature"),
  11. ]
  12. development_status = fields.Selection(
  13. string="Module maturity",
  14. selection=_ODOO_DEVELOPMENT_STATUS_SELECTION,
  15. readonly=True,
  16. )
  17. @api.model
  18. def manifest_2_odoo(self, info, repository_branch, module):
  19. res = super(OdooModuleVersion, self).manifest_2_odoo(
  20. info, repository_branch, module
  21. )
  22. if "development_status" in info:
  23. res["development_status"] = info["development_status"].lower()
  24. return res
上海开阖软件有限公司 沪ICP备12045867号-1