Skip to Content
Menu
This question has been flagged
1 Atsakyti
9567 Rodiniai

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

Portretas
Atmesti
Best Answer

Try

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

hope this help.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
4
geg. 20
74138
2
rugp. 18
4088
0
gruod. 24
1389
2
vas. 23
18825
3
rugp. 16
10512