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

Add record from project member to one2many field

By
Nanda Kanoko
on 7/15/13, 5:34 AM 623 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

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