如何在我的自定义模块中显示特定的采购订单总价我正在我的自定义模块中创建一个显示 amount_total 的函数,但它没有显示
def create(self, cr, uid, vals, context=None):
if vals.get('buy_back'):
purchase_obj=self.pool.get('purchase.order')
sequence=self.pool.get('ir.sequence').get(cr, uid, 'purchase.order')
new_purchase=purchase_obj.create(cr, uid, {'name':sequence,'amt_total':vals.get('amount_total')}, context=context)
import pprint
pprint.pprint( vals )
print 'amount_total'
vals['purchase_order']=new_purchase
pprint.pprint( vals )
这是我的视图文件
<field name="buy_back"/>
<field name="purchase_order"/>
<fiels name="amt_total"/>
</xpath>