[quote author=Joshua link=topic=17580.msg32155#msg32155 date=1460626605]
你这样打印在控制台就能看到,你也可以通过logging来打印到log文件
[/quote]
问题是现在我见不到,这奇怪啊
T
tonyabc
@tonyabc
-
想显示出 msg1 -
想显示出 msg1def to_chakankucun(self, cr, uid, ids, context=None):
dinghuodan=self.browse(cr, uid, ids,context=context)
dinghuodan.state='chakankucun'
res = {}
for line in dinghuodan.dinghuomingxi:
res[(line.xinghao,line.chicun)] = res.get((line.xinghao,line.chicun),0) + line.shuliang
msg1=res.get((line.xinghao,line.chicun),0) + line.shuliang
print(msg1)
for k in res.keys():
chanpin=self.pool.get('sale.chanpin').browse(cr, uid, k[0].id,context=context)
if chanpin.kucunshuliang < res[k]:
raise osv.except_osv((u'警告!'), (u'库存数量不足,请及时采购1'))
return True
是个新手,想在odoo中显示变量的值,请问如何做到