Merge pull request #7822 from atm-maxime/new_contract_replicate_extraf

New extrafields replicated on contract creation
This commit is contained in:
Laurent Destailleur 2017-11-17 13:20:10 +01:00 committed by GitHub
commit 97d38f32ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1090,6 +1090,10 @@ if ($action == 'create')
$objectsrc->fetch(GETPOST('originid'));
if (empty($objectsrc->lines) && method_exists($objectsrc,'fetch_lines')) $objectsrc->fetch_lines();
$objectsrc->fetch_thirdparty();
// Replicate extrafields
$objectsrc->fetch_optionals($originid);
$object->array_options = $objectsrc->array_options;
$projectid = (!empty($objectsrc->fk_project)?$objectsrc->fk_project:'');