prepare #I96PVK app_common及app_odoo_customize全版本安全优化 置顶

This commit is contained in:
Ivan Office
2024-03-07 18:17:04 +08:00
parent e3655a922d
commit 091e86f3f0
3 changed files with 107 additions and 0 deletions

View File

@@ -80,6 +80,9 @@ class ResConfigSettings(models.TransientModel):
# 清数据o=对象, s=序列
def remove_app_data(self, o, s=[]):
if not self._app_check_sys_op():
raise UserError(_('Not allow.'))
for line in o:
# 检查是否存在
try:
@@ -154,6 +157,9 @@ class ResConfigSettings(models.TransientModel):
return self.remove_app_data(to_removes, seqs)
def remove_pos(self):
if not self._app_check_sys_op():
return False
to_removes = [
# 清除POS单据
'pos.payment',