Odoo Help


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

on 11/10/15, 8:40 PM 665 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

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

1 follower(s)


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