Fix: Action created by triggers does not saved owner of action.

This commit is contained in:
Laurent Destailleur 2014-08-03 23:20:32 +02:00
parent cf72c05a99
commit 9fb11cd13b

View File

@ -380,7 +380,7 @@ class InterfaceActionsAuto
$langs->load("other"); $langs->load("other");
$langs->load("sendings"); $langs->load("sendings");
$langs->load("agenda"); $langs->load("agenda");
$object->actiontypecode='AC_OTH_AUTO'; $object->actiontypecode='AC_OTH_AUTO';
if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ShippingValidated",$object->ref); if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ShippingValidated",$object->ref);
if (empty($object->actionmsg)) if (empty($object->actionmsg))
@ -388,7 +388,7 @@ class InterfaceActionsAuto
$object->actionmsg=$langs->transnoentities("ShippingValidated",$object->ref); $object->actionmsg=$langs->transnoentities("ShippingValidated",$object->ref);
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
} }
// Parameters $object->sendtoid defined by caller // Parameters $object->sendtoid defined by caller
//$object->sendtoid=0; //$object->sendtoid=0;
$ok=1; $ok=1;
@ -641,8 +641,8 @@ class InterfaceActionsAuto
$actioncomm->contact = $contactforaction; $actioncomm->contact = $contactforaction;
$actioncomm->societe = $societeforaction; $actioncomm->societe = $societeforaction;
$actioncomm->author = $user; // User saving action $actioncomm->author = $user; // User saving action
//$actioncomm->usertodo = $user; // User affected to action $actioncomm->usertodo = $user; // User action is assigned to (owner of action)
$actioncomm->userdone = $user; // User doing action $actioncomm->userdone = $user; // User doing action (deprecated, not used anymore)
$actioncomm->fk_element = $object->id; $actioncomm->fk_element = $object->id;
$actioncomm->elementtype = $object->element; $actioncomm->elementtype = $object->element;