mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
add product sequence
This commit is contained in:
@@ -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', ],
|
||||
|
||||
@@ -103,12 +103,18 @@
|
||||
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
|
||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
|
||||
<p><h4>
|
||||
Via QQ: 300883</h4></p>
|
||||
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
|
||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||
<i class="fa fa-envelope"></i> 300883@qq.com</a>
|
||||
</div>
|
||||
<div class="oe_mt16">
|
||||
<p><h4>
|
||||
Visit our website for more support.</h4></p>
|
||||
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||
class="btn btn-warning btn-lg" rel="nofollow" href="http://www.sunpop.cn"><span
|
||||
class="btn btn-warning btn-lg" rel="nofollow" href="http://www.sunpop.cn" target="_blank"><span
|
||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||
<i class="fa fa-web"></i>http://www.sunpop.cn</a>
|
||||
</div>
|
||||
|
||||
@@ -89,6 +89,12 @@
|
||||
<div>
|
||||
<button string="Delete All Sales Order" type="object" name="remove_sales"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
|
|
||||
<button string="Delete All Product" type="object" name="remove_product"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
|
|
||||
<button string="Delete All Product Attribute" type="object" name="remove_product_attribute"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="POS"/>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user