diff --git a/ChangeLog b/ChangeLog index 12c79ad77c85d9bd2f50e2577a93448261add0f4..5e5dd3fda738694b5fb6ad312c4f1b4159d6eb39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,7 @@ For users: - New: Add field url as product properties. - New: More options to create a credit note (can be filled autatically according to remain to pay). - Fix: Project Task numbering customs rule works. +- Fix: Add actions events not implemented TODO - New: Predefined product and free product use same form. diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 0bb1b6c12b291bcee2bc211608b7f9d27ca77b7f..856ca34c69321093ce8c55a7dcc9abe358e9980b 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2009-2011 Regis Houssin <regis.houssin@capnetworks.com> - * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Cedric GROSS <c.gross@kreiz-it.fr> * * This program is free software; you can redistribute it and/or modify @@ -426,6 +426,34 @@ class InterfaceActionsAuto $object->sendtoid=0; $ok=1; } + elseif ($action == 'ORDER_SUPPLIER_APPROVE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + $langs->load("orders"); + $langs->load("agenda"); + + $object->actiontypecode='AC_OTH_AUTO'; + if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderApprovedInDolibarr",$object->ref); + $object->actionmsg=$langs->transnoentities("OrderApprovedInDolibarr",$object->ref); + $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; + + $object->sendtoid=0; + $ok=1; + } + elseif ($action == 'ORDER_SUPPLIER_REFUSE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + $langs->load("orders"); + $langs->load("agenda"); + + $object->actiontypecode='AC_OTH_AUTO'; + if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderRefusedInDolibarr",$object->ref); + $object->actionmsg=$langs->transnoentities("OrderRefusedInDolibarr",$object->ref); + $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; + + $object->sendtoid=0; + $ok=1; + } elseif ($action == 'ORDER_SUPPLIER_SENTBYMAIL') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 0e37d3290f7f50aee6c6e2859762eb83b6f66b9b..687e3cae146c0106fa879c72ea7f56a9f4ece8f8 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -43,6 +43,7 @@ InvoiceBackToDraftInDolibarr=Invoice %s go back to draft status InvoiceDeleteDolibarr=Invoice %s deleted OrderValidatedInDolibarr= Order %s validated OrderApprovedInDolibarr=Order %s approved +OrderRefusedInDolibarr=Order %s refused OrderBackToDraftInDolibarr=Order %s go back to draft status OrderCanceledInDolibarr=Order %s canceled InterventionValidatedInDolibarr=Intervention %s validated