This commit is contained in:
Regis Houssin 2025-01-29 07:32:22 +01:00
parent 995e0792e5
commit c43f74687a
2 changed files with 2 additions and 2 deletions

View File

@ -800,7 +800,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = $user->hasRight('bom', 'read'); // If you can read, you can build the PDF to read content
$delallowed = $user->hasRight('bom', 'write'); // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang, '', $object);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('bom'));

View File

@ -853,7 +853,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = $user->hasRight('mrp', 'read'); // If you can read, you can build the PDF to read content
$delallowed = $user->hasRight("mrp", "creer"); // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('mrp:mo', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang);
print $formfile->showdocuments('mrp:mo', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang, '', $object);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('mo'));