Clear related sale when duplicating an opportunity

issue4287
review7671002
New API for on_change

issue4203
review8581002