FIX Directory Issue with Multicompany
Before : Cannot show documents added entity who created the product/service Now : show all files. Warning : all products must be generated in $object->entity directory and not in $conf->entity.
This commit is contained in:
parent
7f746af10e
commit
e85b4a5a20
@ -2255,7 +2255,11 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete')
|
||||
// Documents
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$relativepath = $comref.'/'.$objectref.'.pdf';
|
||||
$filedir = $conf->product->dir_output.'/'.$objectref;
|
||||
if ($conf->product->entity != $object->entity) {
|
||||
$filedir = $conf->product->multidir_output[$object->entity].'/'.$objectref; //Check repertories of current entities
|
||||
} else {
|
||||
$filedir = $conf->product->dir_output.'/'.$objectref; //Check repertory of the current product
|
||||
}
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = $usercanread;
|
||||
$delallowed = $usercancreate;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user