Odoo Help


Add record from project member to one2many field

Nanda Kanoko
on 7/15/13, 5:34 AM 878 views

I need to add record of members from module project.project to my one2many field . My py

class notebook_project_member(osv.osv):

    _name = "notebook.project.member"
    _description = "Member of Project"
    _columns = {
        'projct_id' : fields.many2one('project.project', 'Project Name'),
        'my_emp_ids' : fields.one2many('project.project', 'members','Assigned Employee'),


I'm trying to use onchange event

def onchange_department(self, cr, uid, ids, projct_id): employee_ids = self.search(cr, uid, [('members', '=', deprt_id)]) return {'value': {'my_emp_ids': employee_ids}}

but still no luck , instead i'm always getting an Attribute Error . please help

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, 5:34 AM
Seen: 878 times
Last updated: 3/16/15, 8:10 AM