What are the best way to show the user related data?

So there is this warehouse which distribute product amongst the retail shop . so i was thinking to create a separate module with record rule assigned to groups . so only the retail shop will only see their stock and inventory and sales order and purchase order ? is there any other way to filter data based on user group other than record rule.

Any good example is much appreciated

I guess I would follow the same design as for company rules with a company filter to choose how to filter against the user warehouse.

But there may be some issues with internal shipments between warehouses.

What we want here is to offer a solution for a distribution company with a central warehouse and 60 retailers around. Some are owned and some are franchisees. The distribution company would like to have a solution to manage it’s central warehouse, it’s retail outlets and franchisees managed on a single platform. The retail outlets have access only to their stores stocks clients and accounts and automatic alerts for replenishing stocks etc. The central warehouse needs insight into all units status. A second phase for their growth is to integrate E-commerce to support their stores.

In such case you will need to diferent roles: One for the central and other for the franchises.

  • Users for the central warehouse will not have any access rule applied (will see all moves)
  • Users from franchises will have an access rule to shown only it’s assigned warehouses (like we do for companies)

Thanks for the reply

is access rule and record rule are the same thing ? and this rules would be applied to groups ? should i directly create new module with record rule in it ?

I guess @pokoli mean “record rule”.

See Access Rights — trytond latest documentation, record rules can be global or linked to a group.

You can create them directly on the database but it can be dangerous and hard to test.
So I would advise to setup the rules thanks to a module, like that you can test them and replicate the setup.

Yes, I meat record rule. Sorry for the confusion :sweat: