I’ve found a bug in 3.6.0 release. I’ve downloaded latest 3.6.1 release and there’s the same error.
Please have a look at commande/classs/commande.class.php -> method: createFromClone($socid=0)…
There’s no code to add next ref to the order so it’s not able to clone orders.
Missing code:
// Set ref
require_once DOL_DOCUMENT_ROOT ."/core/modules/commande/".$conf-\>global-\>COMMANDE_ADDON.'.php';
$obj = $conf-\>global-\>COMMANDE_ADDON;
$modCommande = new $obj;
$this-\>ref = $modCommande-\>getNextValue($objsoc,$this);