Skip to main content

Company Hub — Multi-Company Selector

Company Hub gives an ERPNext v16 group an Odoo-style company selector without modifying Frappe or ERPNext core. A user selects an authorised company in the Desk navbar, the selection becomes their native company default, and new transactions automatically start in that company.

The app has two deliberately separate controls:

  • Company User Permissions are the security boundary. They restrict list queries, reports, document access, and direct URLs on the server.
  • Company Workspace Profiles are the user experience. They decide which workspaces appear while a company is active.

Hiding a workspace is not a security control. Always configure User Permissions before relying on the workspace profile.

Before you start

  • Install ecosire_company_hub, ERPNext v16, and ecosire_license_client.
  • Create every operating and holding company as a normal ERPNext Company.
  • Sign in as System Manager.
  • Confirm the ECOSIRE licence is active.

1. Grant company access

For each restricted user, create one or more native User Permission records:

  1. Open User Permission and create a new record.
  2. Set User to the staff member.
  3. Set Allow to Company.
  4. Set For Value to an operating company the user may access.
  5. Save and repeat only for the other companies that user needs.

Management users who genuinely require unrestricted consolidated access can remain without a Company User Permission. Review that exception carefully; it grants access across the group.

2. Configure workspace profiles

Create one Company Workspace Profile for each company:

  1. Select the Company.
  2. Leave Enabled checked.
  3. Add the workspaces relevant to that business in Visible Workspaces.
  4. Save and reload the Desk.

Home and Users remain visible. An empty or disabled profile does not filter the Desk, but server-side User Permissions still apply.

For a holding company, select Is Group Company. Its authorised management users receive an unfiltered workspace view for consolidated work.

3. Switch companies

Users who can access more than one company see the selector in the navbar:

  1. Open the company selector.
  2. Choose an authorised company.
  3. Let the Desk reload.
  4. Confirm the company name before creating a transaction.

The app stores the choice as Frappe's per-user company default. Sales Invoices, Purchase Orders, Journal Entries, and other company-owned documents therefore use ERPNext's normal defaulting behavior.

List views receive a removable default company filter. Opening a document from another active company raises a non-blocking warning; access is still decided by the server-side permission.

Security verification

Test with a non-administrator account:

  1. Switch to each authorised company and confirm its expected workspaces.
  2. Create a draft transaction and confirm the Company default.
  3. Search for a record belonging to an unauthorised company.
  4. Try its direct URL and a report that includes Company.
  5. Confirm every unauthorised path is denied, not merely hidden.

If an unauthorised record is visible, fix the User Permission configuration before go-live.

Troubleshooting

SymptomCheck
Selector is not visibleThe user must be authorised for more than one company
Wrong workspaces appearCheck the active company's enabled Workspace Profile
New documents use the wrong companySwitch again and confirm the user's Company default
User can access another company's recordsFix Company User Permissions immediately
Profile change is not visibleReload the Desk; saving a profile clears the relevant cache