Fix back to page when canceling an edit in the module template

This commit is contained in:
Laurent Destailleur 2018-08-23 20:21:27 +02:00
parent 781a55429a
commit 64427dafb6

View File

@ -122,7 +122,7 @@ if (empty($reshook))
$permissiontoadd = $user->rights->mymodule->write;
$permissiontodelete = $user->rights->mymodule->delete;
if (empty($backtopage)) $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).'?id=__ID__';
if (empty($backtopage)) $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).'?id='.($id > 0 ? $id : '__ID__');
$backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1);
$triggermodname = 'MYMODULE_MYOBJECT_MODIFY'; // Name of trigger action code to execute when we modify record