diff --git a/app_odoo_customize/models/app_theme_config_settings.py b/app_odoo_customize/models/app_theme_config_settings.py index 2af01395..403ea727 100644 --- a/app_odoo_customize/models/app_theme_config_settings.py +++ b/app_odoo_customize/models/app_theme_config_settings.py @@ -114,6 +114,40 @@ class AppThemeConfigSettings(models.TransientModel): raise Warning(e) return True + def remove_product(self): + to_removes = [ + # 清除产品数据 + ['product.product', ], + ['product.template', ], + ] + try: + for line in to_removes : + obj_name = line[0] + obj = self.pool.get(obj_name) + if obj and obj._table_exist: + sql = "delete from %s" % obj._table + self._cr.execute( sql) + except Exception, e: + raise Warning(e) + return True + + def remove_product_attribute(self): + to_removes = [ + # 清除产品属性 + ['product.attribute.value', ], + ['product.attribute', ], + ] + try: + for line in to_removes : + obj_name = line[0] + obj = self.pool.get(obj_name) + if obj and obj._table_exist: + sql = "delete from %s" % obj._table + self._cr.execute( sql) + except Exception, e: + raise Warning(e) + return True + @api.multi def remove_pos(self): to_removes = [ @@ -154,6 +188,8 @@ class AppThemeConfigSettings(models.TransientModel): def remove_mrp(self): to_removes = [ # 清除生产单据 + ['mrp.workcenter.productivity', ], + ['mrp.workorder', ], ['mrp.production.workcenter.line', ], ['mrp.production', ], ['mrp.production.product.line', ], diff --git a/app_odoo_customize/static/description/index.html b/app_odoo_customize/static/description/index.html index 91ecda62..2ed27b35 100644 --- a/app_odoo_customize/static/description/index.html +++ b/app_odoo_customize/static/description/index.html @@ -103,12 +103,18 @@ class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"> guohuadeng@hotmail.com +

+ Via QQ: 300883

+ + 300883@qq.com

Visit our website for more support.

http://www.sunpop.cn
diff --git a/app_odoo_customize/views/app_theme_config_settings_view.xml b/app_odoo_customize/views/app_theme_config_settings_view.xml index 0ea22abc..70eb5511 100644 --- a/app_odoo_customize/views/app_theme_config_settings_view.xml +++ b/app_odoo_customize/views/app_theme_config_settings_view.xml @@ -89,6 +89,12 @@