diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 2098a07d20bbf24827c85934184ffcf018847e4f..2a425cf51f938b77a66ed7277bfcbcb2687a5c91 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -483,6 +483,13 @@ if ($resql)
     {
         $obj = $db->fetch_object($resql);
 
+        // Discard auto action if option is on
+        if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->code == 'AC_OTH_AUTO')
+        {
+        	$i++;
+        	continue;
+        }
+
         // Create a new object action
         $event=new ActionComm($db);
         $event->id=$obj->id;
diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php
index 4fc7386157b44f219a7d6333f2d3569729f961c6..4850394e557e51885d8a42d669b08c991bf6096b 100644
--- a/htdocs/comm/action/listactions.php
+++ b/htdocs/comm/action/listactions.php
@@ -156,7 +156,7 @@ if ($type) $param.="&type=".$type;
 $sql = "SELECT s.nom as societe, s.rowid as socid, s.client,";
 $sql.= " a.id, a.datep as dp, a.datep2 as dp2,";
 $sql.= " a.fk_contact, a.note, a.label, a.percent as percent,";
-$sql.= " c.code as acode, c.libelle,";
+$sql.= " c.code as code, c.libelle,";
 $sql.= " ua.login as loginauthor, ua.rowid as useridauthor,";
 $sql.= " ut.login as logintodo, ut.rowid as useridtodo,";
 //$sql.= " ud.login as logindone, ud.rowid as useriddone,";
@@ -292,6 +292,13 @@ if ($resql)
 	{
 		$obj = $db->fetch_object($resql);
 
+        // Discard auto action if option is on
+        if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->code == 'AC_OTH_AUTO')
+        {
+        	$i++;
+        	continue;
+        }
+
 		$var=!$var;
 
 		print "<tr ".$bc[$var].">";
@@ -299,7 +306,7 @@ if ($resql)
 		// Action (type)
 		print '<td>';
 		$actionstatic->id=$obj->id;
-		$actionstatic->type_code=$obj->acode;
+		$actionstatic->type_code=$obj->code;
 		$actionstatic->libelle=$obj->label;
 		print $actionstatic->getNomUrl(1,28);
 		print '</td>';
diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php
index dacc7c5ce0053d074ae1d92086e76cd0192b875f..da34983779a3bd6a53057b38b16e2121df9eae94 100644
--- a/htdocs/comm/action/peruser.php
+++ b/htdocs/comm/action/peruser.php
@@ -395,6 +395,13 @@ if ($resql)
     {
         $obj = $db->fetch_object($resql);
 
+        // Discard auto action if option is on
+        if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->code == 'AC_OTH_AUTO')
+        {
+        	$i++;
+        	continue;
+        }
+
         // Create a new object action
         $event=new ActionComm($db);
         $event->id=$obj->id;
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 696a70867cf4c6257c18bced1dcd27d4ab9bbba8..333969fc3b3a46e6dff7c3a91d8d831dcb93bd59 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -266,6 +266,8 @@ class FormActions
        	if ($selected == 'manual') $selected='AC_OTH';
        	if ($selected == 'auto')   $selected='AC_OTH_AUTO';
 
+       	if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) unset($arraylist['AC_OTH_AUTO']);
+
         print $form->selectarray($htmlname, $arraylist, $selected);
         if ($user->admin && empty($onlyautoornot) && empty($hideinfohelp)) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
     }