Odoo Help


How to change Parent Field Value in Form through Child Tree/Form when on change ?

Andre Leander
on 9/7/14, 10:15 PM 3,321 views

Hello guys, I am a newbie in OpenERP. I want ask how to change parent field value through child tree or form when child field is on change ?

For example: I have total weight field in parent and i want to decrease the total weight every time I add or edit child data. Child has product_weight field.

How can I do this? Someone please help.. Thank you..

I have tried your advice and it works. Thank u for your answer deep. hehehe

Andre Leander
on 4/19/16, 7:04 AM

Techno-Functional Associate with 7+ years of experience in Odoo (formerly known as OpenERP).

On 9/8/14, 4:05 AM

Use onchange_event in the parent object...

specify onchange_event on your o2m lines, which will take o2m as paramter too.. then return resulting value

Thank u for your quick respons deep. Do u have any example code? for XML view and .py file. I am still confuse in return value for parent field.

Andre Leander
on 9/8/14, 10:20 PM

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: 9/7/14, 10:15 PM
Seen: 3321 times
Last updated: 4/19/16, 7:04 AM