Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

New api search domain id and condition?

By
DM
on 5/28/15, 12:18 PM 1,400 views

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

1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 5/28/15, 1:17 PM

Try

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

hope this help.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/28/15, 12:18 PM
Seen: 1400 times
Last updated: 10/23/15, 9:18 AM