Fix: specimen for expedition missed when model within custom directory

This commit is contained in:
Grand Philippe 2011-12-09 23:23:46 +01:00
parent 380691bb39
commit 2b5de83f91
2 changed files with 9 additions and 4 deletions

View File

@ -58,12 +58,13 @@ if ($action == 'specimen')
//$exp->fetch_commande();
// Charge le modele
$dir = DOL_DOCUMENT_ROOT . "/core/modules/expedition/doc/";
$dir = "/core/modules/expedition/doc/";
$file = "pdf_expedition_".$modele.".modules.php";
if (file_exists($dir.$file))
$file = dol_buildpath($dir.$file);
if (file_exists($file))
{
$classname = "pdf_expedition_".$modele;
require_once($dir.$file);
require_once($file);
$obj = new $classname($db);

View File

@ -500,7 +500,11 @@ class InterfaceDemo
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}
elseif ($action == 'SHIPPINGL_DELETE')
elseif ($action == 'SHIPPING_DELETE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}
elseif ($action == 'SHIPPING_BUILDDOC')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}