Merge pull request #25999 from bloxera/devcamp2023-5

Fix: inventory card missing ability to add or remove tabs
This commit is contained in:
Laurent Destailleur 2023-09-25 02:17:55 +02:00 committed by GitHub
commit 674424c120
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,10 +68,17 @@ function inventoryAdminPrepareHead()
*/
function inventoryPrepareHead(&$inventory, $title = 'Inventory', $get = '')
{
global $langs;
global $langs, $conf;
return array(
$head = array(
array(dol_buildpath('/product/inventory/card.php?id='.$inventory->id.$get, 1), $langs->trans('Card'), 'card'),
array(dol_buildpath('/product/inventory/inventory.php?id='.$inventory->id.$get, 1), $langs->trans('Inventory'), 'inventory')
);
$h=2;
complete_head_from_modules($conf, $langs, $inventory, $head, $h, 'inventory');
complete_head_from_modules($conf, $langs, $inventory, $head, $h, 'inventory', 'remove');
return $head;
}