Best way to default a field of a list with value of the parent header

Hi all,

The user fills a header with a field “unit”. The header is not saved at this moment. Then he adds some pricing in a One2Many list.
How can I default the field “unit” of the list with the “unit” header value ?


You can not because the default value method does not know about the parent form.

But instead a better design would be to let it empty on the line so it means the pricing is based on the header unit. Such design also allow to change the header which change all the lines without unit.

Yes true, I can also update the unit field in the create function of the child.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.