Skip to Content
Menu
This question has been flagged

I'm using Odoo 18 with a multi-company setup:

  • Main company (NBS COMPANY) has its own warehouse (WH №1​).
  • A branch company also has its own warehouse.
  • I created an internal user assigned only to the branch company (not the main company).

When the user tries to update On Hand Quantity in their branch warehouse, they get this error:

Uh-oh! Looks like you have stumbled upon some top-secret records.

Sorry, User (id=2) doesn't have 'read' access to:
- Inventory Locations, WH №1/Stock (stock.location: 8, company=NBS COMPANY)

Blame the following rules:
- Location multi-company

If you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies. This seems to be a multi-company issue, you might be able to access the record by switching to the company: NBS COMPANY."

This seems to be related to Odoo's multi-company access rules, but I don't understand why it's referencing the main company's warehouse when the user is working in the branch.

The error disappears if I assign the user access to both companies, but I want to avoid giving them access to the main company.

How can I:

  • Restrict the user to the branch only,
  • But still allow them to update stock in their own warehouse,
  • Without access to the main company's data?

Thanks!

Portretas
Atmesti

This behavior can not be reproduced in https://demo.odoo.com given this limited information. You will need to investigate your Warehouse, Location and Operation Type configuration, specifically about the Company assigned to each and whether the related records are assigned to the same Company.

Best Answer

Hi,


The error you’re facing is caused by Odoo’s multi-company access rules. In a multi-company setup, every warehouse location (stock, scrap, inventory adjustment, etc.) is linked to a specific company. The security rule “Location multi-company” prevents users from seeing or using locations that belong to companies they don’t have access to. When your branch user tries to update On Hand Quantity, Odoo internally creates stock moves between the warehouse and special virtual locations. If one of those virtual locations (such as “Inventory Adjustment” or “Scrap”) is tied to the main company, Odoo will block the operation because the branch user doesn’t have access rights to that company.


This explains why the system is referencing the main company’s warehouse (NBS COMPANY) even though the user is working in the branch. The process of adjusting inventory isn’t just about the branch warehouse; it also involves virtual locations, and if those are not set up per company, Odoo ends up pointing to the wrong one. That’s why the error disappears when you give the user access to both companies: they suddenly have permission to see the main company’s locations. But that also means they can see data you don’t want them to, which breaks the principle of separation between companies.


The correct solution is not to expand the user’s company access, but to fix the location ownership. Each company in Odoo should have its own complete set of stock locations: Stock, Input, Output, Inventory Adjustment, and Scrap. If your branch company’s warehouse is using adjustment or scrap locations that still belong to the main company, you need to duplicate those locations, assign them to the branch company, and update the warehouse and routes to use the branch-owned versions. That way, when branch users adjust stock, all moves stay within the scope of the branch company, and the security rules are respected.


Once you ensure that every warehouse and virtual location is properly assigned to the correct company, your branch users will be able to update On Hand Quantity freely in their own warehouse, without ever touching records from the main company. This keeps data isolated per company and removes the need to grant unnecessary access to NBS COMPANY.


Hope it helps

Portretas
Atmesti
Autorius

Hello, thanks for your answer. I've checked locations and found out that each company has its own locations set I guess.
Location | Location Type | Company
----------------------------------------|------------------|-------------
Partners | View |
Partners/Customers | Customer Location|
Partners/Vendors | Vendor Location |
Physical Locations | View |
Virtual Locations | View |
Virtual Locations/Inter-company transit | Transit Location |
Virtual Locations/Inventory adjustment | Inventory Loss | NBS
Virtual Locations/Inventory adjustment | Inventory Loss | ARK
Virtual Locations/Production | Production | NBS
Virtual Locations/Production | Production | ARK
Virtual Locations/Scrap | Inventory Loss | NBS
Virtual Locations/Scrap | Inventory Loss | ARK
WH №1 | View | NBS
WH №1/Stock | Internal Location| NBS
WHARK | View | ARK
WHARK/Stock | Internal Location| ARK

NBS is main company and ARK is the branch of NBS

Related Posts Replies Rodiniai Veikla
0
kov. 15
3434
1
birž. 20
3996
1
rugp. 16
10421
0
kov. 15
4640
2
kov. 15
9399