Python 在Odoo中的自定义模块内迭代来自其他模型记录的数据
我想在自定义模块中迭代account.invoice。我在迭代中使用了下面的行,但它不能正常工作 对于中的filex self.env['account.invoice'].搜索读取([],['partner\u id','status','date\u due']): search_read返回一个dict(),因此需要像这样迭代:Python 在Odoo中的自定义模块内迭代来自其他模型记录的数据,python,openerp,erp,Python,Openerp,Erp,我想在自定义模块中迭代account.invoice。我在迭代中使用了下面的行,但它不能正常工作 对于中的filex self.env['account.invoice'].搜索读取([],['partner\u id','status','date\u due']): search_read返回一个dict(),因此需要像这样迭代: for (key, value) in self.env['account.invoice'].search_read([],['partner_id','sta
for (key, value) in self.env['account.invoice'].search_read([],['partner_id','status','date_due']).iteritems():
它给你的结果是什么?你想得到什么?无法在bool上迭代