diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 646b5d0bc6e..f43f1fc3b1c 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -101,13 +101,7 @@ if (empty($reshook)) $error = 0; $backurlforlist = DOL_URL_ROOT.'/product/inventory/list.php'; - - if (empty($backtopage) || ($cancel && empty($id))) { - //var_dump($backurlforlist);exit; - if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; - else $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.($id > 0 ? $id : '__ID__'); - } - + $backtopage = DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id; // Actions cancel, add, update, delete or clone include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; @@ -153,7 +147,7 @@ jQuery(document).ready(function() { // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) +if ($object->id > 0) { $res = $object->fetch_optionals(); @@ -260,7 +254,22 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Buttons for actions - if ($action != 'presend' && $action != 'editline') { + if ($action == 'edit') { + print '
'; + } } // End of page