2
0
forked from Wavyzz/dolibarr

New: Can add an event automatically when a projet is create.

This commit is contained in:
Laurent Destailleur
2013-07-10 14:46:16 +02:00
parent f94f516a12
commit a4abfe1abc
8 changed files with 29 additions and 4 deletions

View File

@@ -555,6 +555,23 @@ class InterfaceActionsAuto
$ok=1;
}
// Projects
elseif ($action == 'PROJECT_CREATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$langs->load("projects");
$langs->load("agenda");
$object->actiontypecode='AC_OTH_AUTO';
if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectCreatedInDolibarr",$object->ref);
$object->actionmsg=$langs->transnoentities("ProjectCreatedInDolibarr",$object->ref);
$object->actionmsg.="\n".$langs->transnoentities("Project").': '.$object->ref;
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
$object->sendtoid=0;
$ok=1;
}
// If not found
/*
else