Odoo Help

0

get one2many field id in object

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

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

Question tools

2 follower(s)

Stats

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