diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py
index ecd26af4..7fc0ae18 100644
--- a/app_odoo_customize/__manifest__.py
+++ b/app_odoo_customize/__manifest__.py
@@ -23,7 +23,7 @@
{
'name': 'Customize odoo OEM (Boost, My Odoo)',
- 'version': '13.20.08.21',
+ 'version': '13.20.08.29',
'author': 'Sunpop.cn',
'category': 'Productivity',
'website': 'https://www.sunpop.cn',
@@ -75,6 +75,7 @@
32. Fix odoo bug of complete name bug of product category and stock location..
33. Add Demo Ribbon Setting.
34. Add Remove all quality data.
+ 35. Fixed for odoo 14.
This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user.
@@ -116,6 +117,7 @@
32. 增加修复品类及区位名的操作
33. 增加 Demo 的显示设置
34. 增加清除质检数据
+ 35. 优化至odoo14适用
""",
'images': ['static/description/banner.gif'],
'depends': [
diff --git a/app_odoo_customize/data/ir_module_module_data.xml b/app_odoo_customize/data/ir_module_module_data.xml
index 29cbec27..04b43448 100644
--- a/app_odoo_customize/data/ir_module_module_data.xml
+++ b/app_odoo_customize/data/ir_module_module_data.xml
@@ -37,10 +37,6 @@
https://www.sunpop.cn
-
- https://www.sunpop.cn
-
-
https://www.sunpop.cn
diff --git a/app_odoo_customize/models/res_config_settings.py b/app_odoo_customize/models/res_config_settings.py
index c8d4ad80..b598d217 100644
--- a/app_odoo_customize/models/res_config_settings.py
+++ b/app_odoo_customize/models/res_config_settings.py
@@ -115,25 +115,32 @@ class ResConfigSettings(models.TransientModel):
# 清数据,o=对象, s=序列
def remove_app_data(self, o, s=[]):
- try:
- for line in o:
- obj_name = line
- obj = self.pool.get(obj_name)
- if obj:
- sql = "delete from %s" % obj._table
- self._cr.execute(sql)
- self._cr.commit()
- self._cr.execute(sql)
- self._cr.commit()
- # 更新序号
- for line in s:
- domain = [('code', '=ilike', '%s' % line)]
+ for line in o:
+ obj_name = line
+ obj = self.pool.get(obj_name)
+ if not obj:
+ # 有时安装出错数据乱,没有 obj 但有 table
+ t_name = obj_name.replace('.', '_')
+ else:
+ t_name = obj._table
+
+ sql = "delete from %s" % t_name
+ try:
+ self._cr.execute(sql)
+ self._cr.commit()
+ except Exception as e:
+ _logger.error('remove data error: %s,%s', line, e)
+ # 更新序号
+ for line in s:
+ domain = [('code', '=ilike', line + '%')]
+ try:
seqs = self.env['ir.sequence'].search(domain)
- seqs.write({
- 'number_next': 1,
- })
- except Exception as e:
- _logger.error('remove data error: %s,%s', o, e)
+ if seqs.exists():
+ seqs.write({
+ 'number_next': 1,
+ })
+ except Exception as e:
+ _logger.error('reset sequence data error: %s,%s', line, e)
return True
def remove_sales(self):
@@ -149,7 +156,7 @@ class ResConfigSettings(models.TransientModel):
# 'sale.order.template',
]
seqs = [
- 'sale%',
+ 'sale',
]
return self.remove_app_data(to_removes, seqs)
@@ -182,7 +189,7 @@ class ResConfigSettings(models.TransientModel):
'pos.session',
]
seqs = [
- 'pos.%',
+ 'pos.',
]
res = self.remove_app_data(to_removes, seqs)
@@ -202,7 +209,7 @@ class ResConfigSettings(models.TransientModel):
'purchase.requisition',
]
seqs = [
- 'purchase.%',
+ 'purchase.',
]
return self.remove_app_data(to_removes, seqs)
@@ -215,7 +222,7 @@ class ResConfigSettings(models.TransientModel):
'hr.payslip.run',
]
seqs = [
- 'hr.expense.%',
+ 'hr.expense.',
]
return self.remove_app_data(to_removes, seqs)
@@ -234,7 +241,7 @@ class ResConfigSettings(models.TransientModel):
'sale.forecast',
]
seqs = [
- 'mrp.%',
+ 'mrp.',
]
return self.remove_app_data(to_removes, seqs)
@@ -268,9 +275,9 @@ class ResConfigSettings(models.TransientModel):
'procurement.group',
]
seqs = [
- 'stock.%',
- 'picking.%',
- 'WH/%',
+ 'stock.',
+ 'picking.',
+ 'WH/',
]
return self.remove_app_data(to_removes, seqs)
@@ -406,6 +413,18 @@ class ResConfigSettings(models.TransientModel):
]
return self.remove_app_data(to_removes, seqs)
+ def remove_quality_setting(self):
+ to_removes = [
+ # 清除质检设置
+ 'quality.point',
+ 'quality.alert.stage',
+ 'quality.alert.team',
+ 'quality.point.test_type',
+ 'quality.reason',
+ 'quality.tag',
+ ]
+ return self.remove_app_data(to_removes)
+
def remove_website(self):
to_removes = [
# 清除网站数据,w, w_blog
diff --git a/app_odoo_customize/static/description/banner.gif b/app_odoo_customize/static/description/banner.gif
index ca7ab00b..29482a71 100644
Binary files a/app_odoo_customize/static/description/banner.gif and b/app_odoo_customize/static/description/banner.gif differ
diff --git a/app_odoo_customize/static/description/banner.png b/app_odoo_customize/static/description/banner.png
index c86b3717..f69913fa 100644
Binary files a/app_odoo_customize/static/description/banner.png and b/app_odoo_customize/static/description/banner.png differ
diff --git a/app_odoo_customize/static/description/index.html b/app_odoo_customize/static/description/index.html
index ff1cd136..b029225a 100644
--- a/app_odoo_customize/static/description/index.html
+++ b/app_odoo_customize/static/description/index.html
@@ -55,6 +55,8 @@
This is a Long Term Support Apps.
+
Update: v13.20.08.29
+
36. Add odoo 14 support.
Update: v13.20.04.12
31. Show or hide odoo Referral in the top menu.
Update: v13.20.03.23
@@ -128,6 +130,10 @@
28. Easy Menu manager.
29. Apps version compare. Add Install version in App list. Add Local updatable filter in app list.
30. 1 key export app translate file like .po file.
+
32. Fix odoo bug of complete name bug of product category and stock location..
+
33. Add Demo Ribbon Setting.
+
34. Add Remove all quality data.
+
35. Fixed for odoo 14.
This module can help to white label the Odoo.
diff --git a/app_odoo_customize/views/app_theme_config_settings_views.xml b/app_odoo_customize/views/app_theme_config_settings_views.xml
index edef7bb3..95bd0ced 100644
--- a/app_odoo_customize/views/app_theme_config_settings_views.xml
+++ b/app_odoo_customize/views/app_theme_config_settings_views.xml
@@ -156,6 +156,9 @@
Quality
+ |
+