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.

0

get one2many field id in object

By
Koffi KPONOUGLO
on 1/9/15, 2:36 PM 1,051 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?

0

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


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

Hello,

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

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