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

16 lines
444B

  1. # -*- coding: utf-8 -*-
  2. from odoo import api, fields, models, tools, _
  3. class Module(models.Model):
  4. _inherit = "ir.module.module"
  5. def wecom_check_module_installed(self, modules_name):
  6. # modules 输入参数是个 list,如 ['base', 'sale']
  7. module = self.sudo().search([("name", "=", modules_name)])
  8. if not module or module.state != "installed":
  9. return False
  10. else:
  11. return True
上海开阖软件有限公司 沪ICP备12045867号-1