Add odt for members

This commit is contained in:
Frédéric FRANCE
2020-11-14 00:48:13 +01:00
parent 1f69f4ed5d
commit 4ca3c0aa95
8 changed files with 746 additions and 13 deletions

View File

@@ -4570,13 +4570,17 @@ abstract class CommonObject
{
foreach (array('doc', 'pdf') as $prefix)
{
if (in_array(get_class($this), array('Adherent'))) $file = $prefix."_".$modele.".class.php"; // Member module use prefix_module.class.php
else $file = $prefix."_".$modele.".modules.php";
if (in_array(get_class($this), array('Adherent'))) {
// Member module use prefix_modele.class.php
$file = $prefix."_".$modele.".class.php";
} else {
// Other module use prefix_modele.modules.php
$file = $prefix."_".$modele.".modules.php";
}
// On verifie l'emplacement du modele
$file = dol_buildpath($reldir.$modelspath.$file, 0);
if (file_exists($file))
{
if (file_exists($file)) {
$filefound = $file;
$classname = $prefix.'_'.$modele;
break;