-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Investigate how Odoo's multi-company context works and how to properly handle allowed_company_ids in the client.
Background
Odoo uses allowed_company_ids in the context to determine the active companies for the current session. Important distinction:
allowed_company_ids= companies the user wants to see (selected in UI)- NOT the same as companies the user can access (which may be more)
The variable name is misleading - it's more like "active_company_ids" or "selected_company_ids".
This affects:
- Which records are shown by default
- Default company for new records
- Which company's settings/sequences apply
Questions to investigate
- How does
allowed_company_idsfilter results insearchandsearchRead? - How to determine which companies the user actually has access to?
- How to switch active companies mid-session via API?
- What's the relationship with
company_idvscompany_idsfields on records?
Acceptance criteria
- Document the behavior in a new skill file (
base/multi-company.md) - Add examples for common multi-company patterns
- Consider if client needs a
setActiveCompanies()helper
🤖 Identified by Pi (pi-mono)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels