When a user (non admin) is trying to submit a stock entry - this error is thrown “Not allowed to create stock entry for material issue or material receipt”
This user has all required permissions (screenshot attached below)
In addition, the permissions for Warehouse, Serial Number, items, item group is also given.
Trying to understand what is missed here.
In fact - even if I assign an in-built role to the user - such as Stock Manager, Stock User etc. still the problem persists.
We figured out the problem. As @ankush pointed out, it was indeed a customisation hidden in our code.
Now that we changed it, it’s working as expected.
Thank you @ankush