NEW 15.0: when creating an intervention from an object, replicate the object's extrafields if they have the same name

(snipped copy-pasted from facture/card.php)
This commit is contained in:
atm-florian 2021-11-12 15:00:03 +01:00
parent 715a65eab2
commit f01cb3bd9a

View File

@ -837,6 +837,10 @@ if ($action == 'create') {
$note_private = (!empty($objectsrc->note) ? $objectsrc->note : (!empty($objectsrc->note_private) ? $objectsrc->note_private : GETPOST('note_private', 'restricthtml')));
$note_public = (!empty($objectsrc->note_public) ? $objectsrc->note_public : GETPOST('note_public', 'restricthtml'));
// Replicate extrafields
$objectsrc->fetch_optionals();
$object->array_options = $objectsrc->array_options;
// Object source contacts list
$srccontactslist = $objectsrc->liste_contact(-1, 'external', 1);
}