Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我制作了一个下拉列表,现在我只想在这个下拉列表中显示我安装了哪些模块。
只显示我想显示的已安装模块的菜单。
让我试着帮助你。
首先是为了你的学习:
-> 激活调试模式。
->然后转到应用程序。
- >选择你想要的任何应用程序。
-> 转到模块信息。
-> 将您的指针放在您面前可见的任何字段上。
->它将为您提供模型的详细信息,其中放置了所有已安装或未安装的模块。
其次,为了回答:
-> installed_modules = self.env['ir.module.module'].search([('state', '=', 'installed')])
->然后做任何你想做的事。