Hi!
I need to assign certain users to manage stock on specific warehouses, but avoiding the viewing and modifying of others. Is it any advanced permissions module or even a way to do this?
Thank you very much
Hi!
I need to assign certain users to manage stock on specific warehouses, but avoiding the viewing and modifying of others. Is it any advanced permissions module or even a way to do this?
Thank you very much
I suppose, that either this question is not possible to respond at the time, or its solution is obvious. Is it either?
Thank you!
Hello,
Not possible with core modules and I donât know an external module that allows it.
Thank you very much, ksar.
As far as I have checked, thereâs no module with this function.
I tried using hooks however it ended to be hard so I changed standard code so I got it done by adding a extrafield âwarehouseownerâ of multiple selectlist, then in stock descriptor (usually found in /htdocs/core/modules/modStock.class.php) assign the advance permission such as
$r++;
$this->rights[$r][0] = $this->numero . sprintf(â%02dâ, (0 * 10) + 0 + 1); //autogenerate permission id based on the module ID;
$this->rights[$r][1] = âViewModifyOwnWarehouse (assigned in WarehouseOwner list field)â;
$this->rights[$r][2] = âwâ;
$this->rights[$r][3] = 0;
$this->rights[$r][4] = âstock_advanceâ;
$this->rights[$r][5] = âwriteâ;
Disable, renable Stock module, finally
in stock page.php assign the permission such as $permissiontoviewownwarehouse = $user->hasRight(âstockâ, âwarehouses_advanceâ, âwriteâ);
and place it where you need to check on that specific permission. HTH