diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 7e1949ec272..63c1644589a 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005 Laurent Destailleur + * Copyright (C) 2005-2006 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -619,6 +619,20 @@ function migrate_modeles($db,$langs,$conf) } } + if ($conf->expedition->enabled) + { + include_once(DOL_DOCUMENT_ROOT.'/expedition/mods/pdf/ModelePdfExpedition.class.php'); + $model=new ModelePDFExpedition(); + $modellist=$model->liste_modeles($db); + if (sizeof($modellist)==0) + { + // Aucun model par defaut. + $sql=" insert into llx_document_model(nom,type) values('rouget','shipping')"; + $resql = $db->query($sql); + if (! $resql) dolibarr_print_error($db); + } + } + //print $langs->trans("AlreadyDone"); }