mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
[FIX] app_common,app_odoo_customize,安全优化
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
{
|
||||
'name': 'odoo17 Tweak,Ai Employee,Boost,Customize All in One. Customize,UI,Boost,Security,Data',
|
||||
'version': '16.24.03.08',
|
||||
'version': '16.24.03.11',
|
||||
'author': 'odooai.cn',
|
||||
'category': 'Extra Tools',
|
||||
'website': 'https://www.odooai.cn',
|
||||
|
||||
@@ -82,7 +82,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
pass
|
||||
|
||||
# 清数据,o=对象, s=序列
|
||||
def remove_app_data(self, o, s=[]):
|
||||
def _remove_app_data(self, o, s=[]):
|
||||
if not self._app_check_sys_op():
|
||||
raise UserError(_('Not allow.'))
|
||||
|
||||
@@ -137,7 +137,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
seqs = [
|
||||
'sale',
|
||||
]
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_product(self):
|
||||
to_removes = [
|
||||
@@ -148,7 +148,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
seqs = [
|
||||
'product.product',
|
||||
]
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_product_attribute(self):
|
||||
to_removes = [
|
||||
@@ -157,7 +157,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
'product.attribute',
|
||||
]
|
||||
seqs = []
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_pos(self):
|
||||
|
||||
@@ -173,7 +173,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
seqs = [
|
||||
'pos.',
|
||||
]
|
||||
res = self.remove_app_data(to_removes, seqs)
|
||||
res = self._remove_app_data(to_removes, seqs)
|
||||
|
||||
# 更新要关帐的值,因为 store=true 的计算字段要重置
|
||||
|
||||
@@ -196,7 +196,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
seqs = [
|
||||
'purchase.',
|
||||
]
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_expense(self):
|
||||
to_removes = [
|
||||
@@ -209,7 +209,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
seqs = [
|
||||
'hr.expense.',
|
||||
]
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_mrp(self):
|
||||
to_removes = [
|
||||
@@ -228,7 +228,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
seqs = [
|
||||
'mrp.',
|
||||
]
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_mrp_bom(self):
|
||||
to_removes = [
|
||||
@@ -237,7 +237,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
'mrp.bom',
|
||||
]
|
||||
seqs = []
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_inventory(self):
|
||||
to_removes = [
|
||||
@@ -265,7 +265,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
'product.tracking.default',
|
||||
'WH/',
|
||||
]
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_account(self):
|
||||
to_removes = [
|
||||
@@ -286,7 +286,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
'hr.expense.sheet',
|
||||
'account.move',
|
||||
]
|
||||
res = self.remove_app_data(to_removes, [])
|
||||
res = self._remove_app_data(to_removes, [])
|
||||
|
||||
# extra 更新序号
|
||||
domain = [
|
||||
@@ -395,7 +395,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
self.env.company.write({
|
||||
'chart_template_id': False,
|
||||
})
|
||||
res = self.remove_app_data(to_removes, seqs)
|
||||
res = self._remove_app_data(to_removes, seqs)
|
||||
return res
|
||||
|
||||
def remove_project(self):
|
||||
@@ -420,7 +420,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
self._cr.commit()
|
||||
except Exception as e:
|
||||
_logger.error('remove data error: %s,%s', 'project: project_sale_line_employee_map', e)
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_quality(self):
|
||||
to_removes = [
|
||||
@@ -439,7 +439,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
'quality.alert',
|
||||
# 'quality.point',
|
||||
]
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_quality_setting(self):
|
||||
to_removes = [
|
||||
@@ -451,7 +451,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
'quality.reason',
|
||||
'quality.tag',
|
||||
]
|
||||
return self.remove_app_data(to_removes)
|
||||
return self._remove_app_data(to_removes)
|
||||
|
||||
def remove_website(self):
|
||||
to_removes = [
|
||||
@@ -472,7 +472,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
# 'website',
|
||||
]
|
||||
seqs = []
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_message(self):
|
||||
to_removes = [
|
||||
@@ -482,7 +482,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
'mail.activity',
|
||||
]
|
||||
seqs = []
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_workflow(self):
|
||||
to_removes = [
|
||||
@@ -491,7 +491,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
# 'wkf.instance',
|
||||
]
|
||||
seqs = []
|
||||
return self.remove_app_data(to_removes, seqs)
|
||||
return self._remove_app_data(to_removes, seqs)
|
||||
|
||||
def remove_all_biz(self):
|
||||
self.remove_account()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<section class="container app">
|
||||
<div class="oe_row oe_spaced" style="max-width: 95%;">
|
||||
<div class="row">
|
||||
<h2 class="oe_slogan">This is a Long Term Support Apps.Update: v16.24.03.08</h2>
|
||||
<h2 class="oe_slogan">This is a Long Term Support Apps.Update: v16.24.03.11</h2>
|
||||
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">1. Deletes Odoo label in footer</li>
|
||||
|
||||
Reference in New Issue
Block a user