想显示出 msg1
-
def 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中显示变量的值,请问如何做到