Friday, April 28, 2017

Yes, on_duplicate is called on the new instance (the copy) before it is being saved. That’s important, and there is application code based on it. But note that related objects (the the wishes of the meeting) are being automatically copied when they have allow_cascaded_copy set to True. That’s probably what you want. Look at the run_from_code method of the [py lino.mixins.duplicable.Duplicate] action.