中国本土应用
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.

32 lines
733B

  1. # -*- coding: utf-8 -*-
  2. from odoo import api, fields, models, tools, _
  3. import logging
  4. _logger = logging.getLogger(__name__)
  5. class Module(models.Model):
  6. _inherit = "ir.module.module"
  7. @api.model
  8. def check_wecom_addons_exist(self, addon_name=None):
  9. """
  10. 检查 企微 addon 是否存在
  11. """
  12. addon = self.sudo().search([("name", "=", addon_name)])
  13. if not addon:
  14. # return {
  15. # "exist": False,
  16. # "moduleId": 0,
  17. # }
  18. return False
  19. else:
  20. # addon.button_install()
  21. # return {
  22. # "exist": True,
  23. # "moduleId": addon.id,
  24. # }
  25. return True
上海开阖软件有限公司 沪ICP备12045867号-1