← Back to team overview

openerp-community team mailing list archive

Best practice for warehouse access control

 

Hi,

I'm trying to implement a system for a company with multiple locations/warehouses. Warehouse users should view/edit stock moves and pickings for their warehouse only. I thought about the following options:

Using record level rules
------------------------

A group is created for each warehouse that has the required rules based on source/destination locations and location type. While pickings have source/destination fields, they are not populated and each move has its own source/destination. I think it is made like this so moves do not have to be linked to picking. As a result, warehouse users will see pickings for all locations. A rule can be defined that users can see only pickings that have moves in locations related to their warehouses. But It seems to be very complex especially with complex location hierarchy.


Sub-company for each warehouse
------------------------------
This seems to be the scenario implemented in the documentation and demo data.It is not perfect too. I have to create a company for each warehouse. Also I need to create a stock journal for each company and add additional stock input/output and valuation accounts properties to each product category. The gui does not support adding these properties to product categories for multiple companies. Also, new categories must be updated to include accounting definitions for all companies.

Apparently, the multicompany support is not well tested. At least with realtime stock valuation.


Each solution seems to require complex customization to the OpenERP stock handling modules which is supposed to be completely rewritten in v8.

I hope someone could provide ideas from their implementation experience.


Best regards,

Mohammad Alhashash