diff --git a/app_common/views/product_brand_views.xml b/app_common/views/product_brand_views.xml
deleted file mode 100644
index 546d4033..00000000
--- a/app_common/views/product_brand_views.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
- product.brand.search
- product.brand
-
-
-
-
-
-
-
-
-
-
-
-
-
- product.brand.form
- product.brand
-
-
-
-
-
-
- product.brand.tree
- product.brand
-
-
-
-
-
-
-
-
-
-
-
- product.brand.kanban
- product.brand
-
-
-
-
-
-
-
-
-
-
-
![Logo]()
-
-
-
-
-
-
-
-
-
-
- Brand
- product.brand
- kanban,form,tree
-
-
-
-
diff --git a/app_common/views/product_template_views.xml b/app_common/views/product_template_views.xml
deleted file mode 100644
index 8db19037..00000000
--- a/app_common/views/product_template_views.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
- product.template.search.brand
- product.template
-
-
-
-
-
-
-
-
-
-
-
- product.template.product.form
- product.template
-
-
-
-
-
-
-
-
-
-
- product kanban view add brand
- product.template
-
-
-
-
-
-
-
-
-
- product tree view add brand
- product.template
-
-
-
-
-
-
-
-
-
-
diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py
index adacb15e..a9f4cec1 100644
--- a/app_odoo_customize/__manifest__.py
+++ b/app_odoo_customize/__manifest__.py
@@ -23,7 +23,7 @@
{
'name': 'odoo 14,13 Customize OEM(Boost, Data reset)',
- 'version': '13.20.10.04',
+ 'version': '13.20.11.04',
'author': 'Sunpop.cn',
'category': 'Productivity',
'website': '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 5c447f9f..8914bce3 100644
--- a/app_odoo_customize/models/res_config_settings.py
+++ b/app_odoo_customize/models/res_config_settings.py
@@ -116,6 +116,9 @@ class ResConfigSettings(models.TransientModel):
# 清数据,o=对象, s=序列
def remove_app_data(self, o, s=[]):
for line in o:
+ # 检查是否存在
+ if not self.env['ir.model']._get(line):
+ continue
obj_name = line
obj = self.pool.get(obj_name)
if not obj:
@@ -127,9 +130,9 @@ class ResConfigSettings(models.TransientModel):
sql = "delete from %s" % t_name
try:
self._cr.execute(sql)
- self._cr.commit()
+ # self._cr.commit()
except Exception as e:
- _logger.error('remove data error: %s,%s', line, e)
+ _logger.warning('remove data error: %s,%s', line, e)
# 更新序号
for line in s:
domain = [('code', '=ilike', line + '%')]
@@ -140,7 +143,7 @@ class ResConfigSettings(models.TransientModel):
'number_next': 1,
})
except Exception as e:
- _logger.error('reset sequence data error: %s,%s', line, e)
+ _logger.warning('reset sequence data error: %s,%s', line, e)
return True
def remove_sales(self):
diff --git a/app_product_brand/views/product_brand_views.xml b/app_product_brand/views/product_brand_views.xml
index e3cf19b7..96ed7d5f 100644
--- a/app_product_brand/views/product_brand_views.xml
+++ b/app_product_brand/views/product_brand_views.xml
@@ -11,20 +11,23 @@
-
+
+
+ Brand Products
+ ir.actions.act_window
+ product.template
+ kanban,form,tree
+ [('product_brand_id', '=', active_id)]
+
-
+
+ Product Brand
+ ir.actions.act_window
+ product.brand
+ kanban,form,tree
+ current
+ [('product_ids', 'in', active_id)]
+
product.brand.form