-2
上odoo 8我尝试执行此操作:类型错误:“诠释”对象不是可迭代odoo8
@api.onchange('projetbc_ligne_ids')
def onchange_evalID(self):
self.test= self.projetbc_ligne_ids.produit.id
query = "SELECT sum(quantite) FROM projet_bc_ligne where produit = %s"
self.env.cr.execute(query, (tuple(self.projetbc_ligne_ids.produit.id),))
# self.env.cr.execute("SELECT sum(quantite) FROM projet_bc_ligne where produit = %s",(tuple(self.projetbc_ligne_ids.produit.id),))
self.projetbc_ids.quantite_encoure = self.env.cr.fetchone()[0]
我得到这个错误: 类型错误:“诠释”对象不是可迭代
一些想法?