From 49ccdb96027960ad4f583ddf10cc403c35ba9b13 Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Mon, 28 Jan 2019 05:06:02 +0100 Subject: [PATCH] Update movement_list.php For it to work you have to create this script htdocs\core\modules\stock\doc\pdf_stdmouvement.modules.php instead htdocs\core\modules\stock\doc\pdf_stdmovement.modules.php this mixture of fr/en confused me and I'm sure you better control the structure to make it work properly it tested & works but with htdocs\core\modules\stock\doc\pdf_stdmouvement.modules.php thx --- htdocs/product/stock/movement_list.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index ce77f120db4..4435ea98f42 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -1160,14 +1160,14 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id>0) if(!empty($search_inventorycode)) $objectref.="_".$id."_".$search_inventorycode; if($search_type_mouvement) $objectref.="_".$search_type_mouvement; $relativepath = $comref . '/' . $objectref . '.pdf'; - $filedir = $conf->stock->dir_output . '/movement/' . $objectref; + $filedir = $conf->stock->dir_output . '/' . $modulepart .'/' . $objectref; $urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id."&search_inventorycode=".$search_inventorycode."&search_type_mouvement=$search_type_mouvement"; $genallowed=$usercanread; $delallowed=$usercancreate; - $genallowed=$user->rights->stock->mouvement->lire; - $delallowed=$user->rights->stock->mouvement->creer; + $genallowed=$user->rights->stock->lire; + $delallowed=$user->rights->stock->creer; print $formfile->showdocuments($modulepart,$objectref,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$object->default_lang, '', $object); $somethingshown=$formfile->numoffiles; @@ -1183,7 +1183,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id>0) // List of actions on element include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'mouvement', 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product + $somethingshown = $formactions->showactions($object, $modulepart, 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product print ''; }