机企猫 隐藏项目模块修改接入(可隐藏导出、新建等项目)

This commit is contained in:
mgw
2024-02-04 15:32:25 +08:00
parent 7e025e7ca1
commit f6c121771f
63 changed files with 1313 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from . import models
from odoo import api, SUPERUSER_ID
def uninstall_hook(cr, registry):
# 使用cr来执行数据库操作
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
# 执行数据清理操作
access_rights = env['access.right'].search([])
access_rights.unlink()
followers = env['mail.followers'].search([('res_model', '=', 'access.right')])
followers.unlink()