add delete bom

This commit is contained in:
ivan deng
2017-10-19 00:23:16 +08:00
parent d4eadef5e7
commit 8e6665c120
5 changed files with 30 additions and 3 deletions

View File

@@ -216,6 +216,11 @@ msgstr "删除所有采购单"
msgid "Delete All Manufacturing Order"
msgstr "删除所有生产单"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Delete All BOM"
msgstr "删除所有物料清单"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Delete All Move/Picking/Package/Lot"

View File

@@ -157,6 +157,25 @@ class AppThemeConfigSettings(models.TransientModel):
['mrp.production.workcenter.line', ],
['mrp.production', ],
['mrp.production.product.line', ],
['mrp.unbuild', ],
]
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_mrp_bom(self):
to_removes = [
# 清除生产BOM
['mrp.bom.line', ],
['mrp.bom', ],
]
try:
for line in to_removes :

View File

@@ -1,4 +1,4 @@
##App Odoo Customize(Debranding Title,Language,Documentation,Quick Debug)
##App Odoo Customize(Debranding Title,Language,Documentation,Quick Debug,Quick Data Clear)
============
White label odoo.
You can config odoo, make it look like your own platform.
@@ -24,7 +24,7 @@ The user can get the help document just by one click.
For more support
http://www.sunpop.cn
## 去除odoo版权信息自定义你的odoo
## 在符合odoo开源协议的前提下去除odoo版权信息自定义你的odoo
可完全自行设置下列 odoo 选项,让 odoo 看上去像是你的软件产品
1.删除菜单导航页脚的 Odoo 标签
2.将弹出窗口中 "Odoo" 设置为自定义名称

View File

@@ -4,7 +4,7 @@
<h2 class="oe_slogan">App Odoo Customize</h2>
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
<p>This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher,
Online Documentation Access,Quick clear data. </p>
Online Documentation Access,Quick Data Clear. </p>
<br>
<ul>
<li>1.Deletes Odoo label in footer</li>

View File

@@ -103,6 +103,9 @@
<div>
<button string="Delete All Manufacturing Order" type="object" name="remove_mrp"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
<button string="Delete All BOM" type="object" name="remove_mrp_bom"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Inventory"/>
<div>