Strange behaviour when opening a m2o window

Hi,
I’ve started to investigate again the problem I had in this post: Production on_changes triggered while searching records, and I found something that I don’t understand, that could be related but I’m not really sure.
I tried on both 7.0 and 8.0 public demo and it happens on both:
Open a production in draft state, click on the product m2o icon:
image
Then without modifying anything click on “save”, and you will notice that the on_change_product has been called:


Also, when clicking in the m2o window, fields become readonly if the field itself is readonly; if the production is in draft state, where the product can be modified, I can modify the product fields from the window, but in a more advanced state where the product is readonly, I can’t.
Is this the intended/expected behaviour?

Then click on “Discard Changes”

It is the intended behavior.

Users can click on save by mistake, but without any actual modification, why should the on_changes be called? they will either do nothing or modify something that shouldn’t be.

Because it is like if a new value has been selected for the Many2One.

Now it may be possible to disable the “Save” button if nothing has changed in the form.

I do not understand this sentence.