Add trigger for propal create from clone

This commit is contained in:
Regis Houssin 2010-09-09 17:57:37 +00:00
parent dcfcb1bc53
commit 2e54c35898
2 changed files with 10 additions and 3 deletions

View File

@ -822,9 +822,12 @@ class Propal extends CommonObject
if (! $error)
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('PROPAL_CLONE',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
// End

View File

@ -238,6 +238,10 @@ class InterfaceDemo
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}
elseif ($action == 'PROPAL_CLONE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}
elseif ($action == 'PROPAL_MODIFY')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);