跳至內容
選單
此問題已被標幟
1 回覆
9513 瀏覽次數

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

頭像
捨棄
最佳答案

Try

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

hope this help.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
5月 20
74018
2
8月 18
4037
0
12月 24
1336
2
2月 23
18781
3
8月 16
10460