diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py index 282e6629..37a6cd81 100644 --- a/app_odoo_customize/__manifest__.py +++ b/app_odoo_customize/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'Odoo Customize(Debranding, My Odoo)', - 'version': '12.19.04.17', + 'version': '12.19.04.18', 'author': 'Sunpop.cn', 'category': 'Productivity', 'website': 'https://www.sunpop.cn', @@ -65,6 +65,7 @@ 22. Update online manual and developer document to odoo12 23. Add reset or clear website blog data 24. Customize Odoo Native Module(eg. Enterprise) Url + 25. Add remove expense data This module can help to white label the Odoo. Also helpful for training and support for your odoo end-user. diff --git a/app_odoo_customize/models/res_config_settings.py b/app_odoo_customize/models/res_config_settings.py index e1cca2a3..92f760be 100644 --- a/app_odoo_customize/models/res_config_settings.py +++ b/app_odoo_customize/models/res_config_settings.py @@ -117,6 +117,8 @@ class ResConfigSettings(models.TransientModel): # 清除销售单据 ['sale.order.line', ], ['sale.order', ], + # 销售提成,自用 + ['sale.commission.line', ], # 不能删除报价单模板 # ['sale.order.template.option', ], # ['sale.order.template.line', ], @@ -130,7 +132,9 @@ class ResConfigSettings(models.TransientModel): sql = "delete from %s" % obj._table self._cr.execute(sql) # 更新序号 - seqs = self.env['ir.sequence'].search([('code', '=', 'sale.order')]) + seqs = self.env['ir.sequence'].search([ + '|', ('code', '=', 'sale.order'), + ('code', '=', 'sale.commission.line')]) for seq in seqs: seq.write({ 'number_next': 1, @@ -233,6 +237,32 @@ class ResConfigSettings(models.TransientModel): pass # raise Warning(e) return True + @api.multi + def remove_expense(self): + to_removes = [ + # 清除采购单据 + ['hr.expense.sheet', ], + ['hr.expense', ], + ] + try: + for line in to_removes: + obj_name = line[0] + obj = self.pool.get(obj_name) + if obj: + sql = "delete from %s" % obj._table + self._cr.execute(sql) + # 更新序号 + seqs = self.env['ir.sequence'].search([ + ('code', '=', 'hr.expense.invoice')]) + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + self._cr.execute(sql) + except Exception as e: + pass # raise Warning(e) + return True + @api.multi def remove_mrp(self): to_removes = [ diff --git a/app_odoo_customize/readme.md b/app_odoo_customize/readme.md index 7bbabce9..af55a7ad 100644 --- a/app_odoo_customize/readme.md +++ b/app_odoo_customize/readme.md @@ -27,6 +27,7 @@ You can config odoo, make it look like your own platform. 22. Update online manual and developer document to odoo12 23. Add reset or clear website blog data 24. Customize Odoo Native Module(eg. Enterprise) Url +25. Add remove expense data This module can help to white label the Odoo. Also helpful for training and support for your odoo end-user. @@ -63,6 +64,7 @@ https://www.sunpop.cn 22. 全新升级将odoo12用户及开发手册导航至国内网站,或者自己定义的网站 23. 增加清除网站数据功能 24. 自定义 odoo 原生模块跳转的url(比如企业版模块) +25. 增加删除费用 使用方法:将解压后的 app_odoo_customize 放到 odoo的 addons目录下,激活开发者模式,应用-->更新应用列表, 找到 "App odoo Customize"模块,安装即可。 diff --git a/app_odoo_customize/static/description/index.html b/app_odoo_customize/static/description/index.html index d49b583f..9606d943 100644 --- a/app_odoo_customize/static/description/index.html +++ b/app_odoo_customize/static/description/index.html @@ -12,6 +12,8 @@

This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher, Online Documentation Access,Quick Data Clear.

Support Odoo 12, 11, 10, 9. Including communicate and enterprise version.

+

Update: v12.19.04.18

+

25. Add remove expense data

Update: v12.19.04.17

Add Customize Odoo Native Module(eg. Enterprise) Url

Update: v12.19.3.15

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 b14dc378..e71657d7 100644 --- a/app_odoo_customize/views/app_theme_config_settings_view.xml +++ b/app_odoo_customize/views/app_theme_config_settings_view.xml @@ -121,6 +121,11 @@