Odoo Help


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.


How to change contact's owner(user_id) along with his parent customer?

on 11/10/15, 8:40 PM 344 views

I want to change contact's owner(res.partner's user_id field) along with its parent customer when changing this customer's salesperson. 

I tried onchange function and compute field, but no luck.

Any help or suggestion?

I am using odoo v8.

On 11/11/15, 1:32 AM

The solution is easier than i thought from the beginning 

I just overrided write() method, just as below:

def write(self, vals):
    super(res_partner, self).write(vals)
    if 'user_id' in vals.keys():
        for contact in self.child_ids:
    return True

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

1 follower(s)


Asked: 11/10/15, 8:40 PM
Seen: 344 times
Last updated: 11/11/15, 2:11 AM