Merge pull request #16228 from FHenry/dev_new_autoload_product_extrafield_line_createtpl

NEW:add hidden option to auto load input line extrafield into new lines
This commit is contained in:
Laurent Destailleur 2021-02-09 13:24:53 +01:00 committed by GitHub
commit 5e9065390a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -705,6 +705,13 @@ if (!empty($usemargins) && $user->rights->margins->creer)
} ?>
<?php
} ?>
<?php
if (!empty($conf->global->PRODUCT_LOAD_EXTRAFIELD_INTO_OBJECTLINES)) { ?>
jQuery.each(data.array_options, function( key, value ) {
jQuery('div[class$="det'+key.replace('options_','_extras_')+'"] > #'+key).val(value);
});
<?php
}?>
},
'json'
);

View File

@ -192,7 +192,7 @@ if (!empty($action) && $action == 'fetch' && !empty($id))
'tva_tx' => $outtva_tx,
'qty' => $outqty,
'discount' => $outdiscount,
'array_option'=>$object->array_options);
'array_options'=>$object->array_options);
}
echo json_encode($outjson);