This question has been flagged
1 Reply
3799 Views

I have set an on_change event for a field (field A) in order to dynamically set a domain in another field (field B). This works perfect except that when creating a new record, field A is already initialized (field A is many2one), the on_change function is not triggered, so field B domain is not set.

Is there an event raised when an insert form (or edit form) is shown?

Avatar
Discard
Best Answer

Even if field A has been initialized, when the form view of that record is opened in edit mode, the on_change will be triggered and domain will be set properly.  Maybe you can share snippets of your code so that the problem can be more clearly understood.

Avatar
Discard
Author

Yes, you are right. My code is ok.