mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
prepare #I96PVK app_common及app_odoo_customize全版本安全优化 置顶
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user