Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
9698 Visualizações

Hello Odoo community,

whats the right way to search record based on id?

cover_model_option=self.env['ct.cover.model.control'].search(['id','=',self.cover_model.id])

Error

File "/opt/odoo/odoo/openerp/osv/expression.py", line 588, in check_leaf

raise ValueError("Invalid leaf %s" % str(self.leaf))

ValueError: Invalid leaf id

Avatar
Cancelar
Melhor resposta

Try

cover_model_option=self.env['ct.cover.model.control'].search([('id','=',self.cover_model.id)]) 

hope this help.

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
4
mai. 20
74395
2
ago. 18
4285
0
dez. 24
1609
2
fev. 23
19021
3
ago. 16
10756