Merge pull request #10321 from bafbes/abb80046

link back to list if cancelled on create
This commit is contained in:
Laurent Destailleur 2019-01-16 12:46:51 +01:00 committed by GitHub
commit 8b2c4fbf82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,8 +119,11 @@ if (empty($reshook))
$permissiontoadd = $user->rights->mymodule->write;
$permissiontodelete = $user->rights->mymodule->delete || ($permissiontoadd && $object->status == 0);
if (empty($backtopage)) $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).'?id='.($id > 0 ? $id : '__ID__');
$backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1);
$backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1);
if (empty($backtopage)) {
if (empty($id)) $backtopage = $backurlforlist;
else $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).($id > 0 ? $id : '__ID__');
}
$triggermodname = 'MYMODULE_MYOBJECT_MODIFY'; // Name of trigger action code to execute when we modify record
// Actions cancel, add, update, delete or clone