add product sequence

This commit is contained in:
ivan deng
2017-11-05 20:50:38 +08:00
parent 8e6665c120
commit c91c1029e5
24 changed files with 801 additions and 1 deletions

View File

@@ -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', ],

View File

@@ -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>

View File

@@ -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>