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 Parent Field Value in Form through Child Tree/Form when on change ?

Andre Leander
on 9/7/14, 10:15 PM 1,799 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


| 5 4 7
Bangalore, India

Techno-Functional Associate with 6+ 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

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