Attachments and notes are flexible tools that user can use to share informal information.
But on document like sale or purchase orders, the information may need to be passed to created documents like shipments or invoices. This is mainly because the user has an information to share for a document (e.g. shipment that is not yet created). The natural place at that time is to put the information on the order that will create the document (e.g. the sale).
We add on the
MultiSelection field that contains the list of resources the record must be copied to. The selection is dynamic and depend on the main resource (E.g. for
sale.sale, it will contain
Each module will be responsible to extend the mixin to fill the selection for its models.
The models that create other records will be copy all the resources that are selected to the new records. A mixin is created to contain those common operations.