Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
9792 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
74540
2
ago. 18
4368
0
dez. 24
1703
2
fev. 23
19147
3
ago. 16
10879