我创建了一个方法,并使用field函数调用该方法。但是,该方法从不执行。
这是我的密码:
def _get_data_from_puchase_order(self, cr, ids, field, arg, context=None):
print "SUCCESS"
print ":::::::::::::::::"
result = {}
for row in self.browse(cr, uid, ids):
print row
print "::::::::::::"
_columns = {
"data_purchase_product" : fields.function(_get_data_from_puchase_order, method=True, string='origin', type='char', strore=False)
}
我补充道:
for data in self.pool.get('purchase.order').browse(cr, uid, ids):
print data.name
print "++++++++++++++++++"
我犯了个错误:
MissingError: ('MissingError', u'One of the documents you are trying to access has been deleted, please try again after refreshing.')
这个帮助
ids:对象的id列表
相关问题 更多 >
编程相关推荐