Closed (works as designed)
Project:
Commerce Stock
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2011 at 12:35 UTC
Updated:
5 Aug 2013 at 16:14 UTC
It would be great to be able to assign a "edit stock levels" permission to a specific user role.
My current client will have a real shop and web-shop selling products from the same stock. In case of a sale in the real store we need the salesclerk to be able to reduce the stock accordingly. If I'm not missing something it seems that currently they could also change other product details like price etc. which is not preferable.
Comments
Comment #1
rfayStock levels are a field on the product.... Doesn't the permissioning for editing the project do the job for you?
Comment #2
ranx commentedThank you for the quick answer.
I try to explain my problem in more detail. While i was playing around with the permissions i found out that one of the following have to be enabled for a role to be able to change the stock levels:
Administer entities of type Commerce Product
Edit any entity of type Commerce Product of any bundle
First one even comes with the warning to give it to trusted roles only. If I grant the clerks these permissions they can change the SKU and the price or even disable the product altogether. I don't feel comfortable giving such power to people who sometimes need to remove one item from the stock.
In Ubercart there is a special permission for managing the stock.
I have reasonable experience with Drupal but am just taking my first steps with Drupal Commerce. So it is possible that I am missing something really obvious. In your answer you mention permissioning for editing a project. I don't quite understand what you mean.
Comment #3
rfayHi haven't tried it, but have you experimented with the Field Permissions module for D7?
Comment #4
ranx commentedSeems to me that I need to edit the content type or in this case the product type to enable the Field Permissions on a certain field. The filed "Stock" (machine name: commerce_stock) can not be edited though. I get the following message:
The field Stock is locked and cannot be edited.
Same is true for the price field.
Comment #5
joachim commentedI think that given this is such a common use case, setup with field permission is a rather a bind.
What about adding some UI for users who have the stock permission but not the product permissions?
Either a 'stock' tab, or present the stock count as a widget on the product view page?
Comment #6
guy_schneerson commentedfield permission works great if at some point a locked issue existed it is no longer the case.