diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 97ae273bcc9..16db9b693a5 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -349,12 +349,18 @@ class FormFile
}
else
{
- // Generic feature, for external modules
- $file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
+ // For normalized standard modules
+ $file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
if (file_exists($file))
{
$res=include_once $file;
}
+ // For normalized external modules
+ else
+ {
+ $file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
+ $res=include_once $file;
+ }
$class='Modele'.ucfirst($modulepart);
if (class_exists($class))
{