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

How to add record to one2many field ?

By
Nanda Kanoko
on 7/15/13, 2:27 AM 719 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

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

0 follower(s)

Stats

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