Automatically get Parent's object value

Hi I have below UI

And I want to create new child (in above case is Remark).. I want the Phase value to follows the Parent’s value which is ‘Demo Presentation’

I try to load Parent’s Phase value using default_phase method from child class, but it doesn’t work. How to do it?

Bromo

You should use an on_change_with_<field_name> method in order to set the value when the relation field is set.

This way, each time a new record is created in the One2Many, the relation field will be set by the client and your on_change method will be called to set the values.

Hope this helps

1 Like