Merge pull request #7981 from fappels/7.0_sendmail_trigger_error

Fix action_sendmail.inc
This commit is contained in:
Laurent Destailleur 2017-12-28 07:01:02 +01:00 committed by GitHub
commit 8476567dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$result=$object->fetch($id);
$sendtosocid=0; // Thirdparty on object
if (method_exists($object,"fetch_thirdparty") && ! in_array($object->element, array('societe','member','user')))
if (method_exists($object,"fetch_thirdparty") && ! in_array($object->element, array('societe','member','user','expensereport')))
{
$result=$object->fetch_thirdparty();
if ($object->element == 'user' && $result == 0) $result=1; // Even if not found, we consider ok
@ -445,7 +445,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
if ($error)
{
dol_print_error($db);
// error message event set by trigger interface
}
else
{