Odoo Help


get one2many field id in object

on 1/9/15, 2:36 PM 1,128 views

I am trying to get every line id of hr.payroll.run  by doing this :

run_pool = self.pool.get('hr.payslip.run')
        line = run_pool.slip_ids.id and run_pool.slip_ids.id.id or False


but it the server said  me the object haven't slip_ids field. Why?


Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
--Ahmed M.Elmubarak--

Ahmed M.Elmubarak
On 1/10/15, 11:09 AM


you can get the line ids by using

slip_ids = [x.id for x in run_pool.browse(cr, uid,run_id, context=context).slip_ids]

try it...

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 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 1/9/15, 2:36 PM
Seen: 1128 times
Last updated: 3/16/15, 8:10 AM