Odoo Help


How to add record to one2many field ?

Nanda Kanoko
on 7/15/13, 2:27 AM 1,227 views

I need to add record of employee that listed under certain project on different module , but I'm not sure how to pull this .

My py :

class notebook_project(osv.osv):
    _name = "notebook.project"
    _description = "Notebook Project ID"
    _columns = {
        'name' : fields.many2one('project.project', 'Project'),
        'notebook_project_lines' : fields.one2many('notebook.project', 'notebook_project_id', 'Members Lines'),
        'notebook_project_id': fields.many2one('notebook.project', ondelete='cascade', select=True),
        'project_member' : fields.many2one('hr.employee', 'Members'),


field name is the list of project , notebook_project_lines contains project_member . while notebook_project_id record the employee listed under the project itself .

What i need to do is when i choose certain project , every project member related to that project also printed under it as well . Please help , and thanks in advance

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

0 follower(s)


Asked: 7/15/13, 2:27 AM
Seen: 1227 times
Last updated: 3/16/15, 8:10 AM