Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Here i want to know how to get the first record of a table.
here is my code, please correct it....
user_ids = self.pool.get('test.project').browse(cr, uid, ids, context=context)
Thanks in advance...
I suggest you use this, the safe construction:
test_obj = self.pool.get('test.project')
user_ids = test_obj.search(cr, uid, [('id','in',ids)], context=context)
first_record = test_obj.browse(cr, uid, user_ids, context=context)
first_ID = user_ids
UPDATE: Full user_ids list from test.project:
user_ids = test_obj.search(cr, uid, , context=context)
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/10/15, 6:26 AM|
|Seen: 1670 times|
|Last updated: 3/16/15, 8:10 AM|