diff --git a/htdocs/admin/fournisseur.php b/htdocs/admin/fournisseur.php
index e81dca8bbe3..33c259857d4 100644
--- a/htdocs/admin/fournisseur.php
+++ b/htdocs/admin/fournisseur.php
@@ -179,7 +179,7 @@ print '
'.$langs->trans("Default")." | \n";
print "\n";
clearstatcache();
-
+$dir = "../fourn/commande/modules/pdf/";
$def = array();
$sql = "SELECT nom FROM ".MAIN_DB_PREFIX."commande_fournisseur_model_pdf";
$resql=$db->query($sql);
diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 4e02596961f..51b7b92ea4e 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -1875,7 +1875,7 @@ class Form
{
include_once(DOL_DOCUMENT_ROOT.'/fourn/commande/modules/modules_commandefournisseur.php');
$model=new ModelePDFCommandesSuppliers();
- $modellist=$model->liste_modeles();
+ $modellist=$model->liste_modeles($this->db);
}
}
else if ($modulepart == 'facture_fournisseur')
@@ -1885,7 +1885,7 @@ class Form
{
include_once(DOL_DOCUMENT_ROOT.'/fourn/facture/modules/modules_facturefournisseur.php');
$model=new ModelePDFFacturesSuppliers();
- $modellist=$model->liste_modeles();
+ $modellist=$model->liste_modeles($this->db);
}
}
else