Default Department/Warehouse for Users – Part 2

In part 1 we discussed the code changes required to define department and warehouse defaults for each user through

In this part we have made some code changes which will restrict a user to the data he or she created for his or her department and/or warehouse.

If the following two conditions are met …

  1. A department and/or warehouse has been defined for a user.
  2. The user belongs to the role ‘user’

… then the user can create new transactions in to his default department and/or warehouse only. He is also restricted to view reports for his department and/or warehouse only.

You can view these code changes here using git diff

Any bugs or suggestions can be sent to [email protected].

Leave a Reply