Go to file
2026-05-15 13:46:07 +07:00
__pycache__ feat: implement multi-branch employee visibility through updated security rules, search overrides, and company sync logic 2026-05-15 13:46:07 +07:00
models feat: implement multi-branch employee visibility through updated security rules, search overrides, and company sync logic 2026-05-15 13:46:07 +07:00
security feat: implement multi-branch employee visibility through updated security rules, search overrides, and company sync logic 2026-05-15 13:46:07 +07:00
views feat: implement multi-branch employee visibility through updated security rules, search overrides, and company sync logic 2026-05-15 13:46:07 +07:00
__init__.py first commit 2026-05-13 16:54:22 +07:00
__manifest__.py first commit 2026-05-13 16:54:22 +07:00
README.md feat: implement multi-branch employee visibility through updated security rules, search overrides, and company sync logic 2026-05-15 13:46:07 +07:00

Multi-Company Employee Assignment (Odoo 19)

This module extends the standard Odoo HR functionality to allow a single employee record to be associated with multiple branch companies.

Features

  • Multi-Branch Assignment: Add a "Branches" (Many2many) field to the employee form.
  • Cross-Branch Visibility: Employees appear in the "Employees" menu and search panel for all assigned branches.
  • POS Integration: Cashiers and employees appear in the POS login interface for all branches they are assigned to.
  • Security Logic: Access control rules are updated to allow visibility across all selected branches.
  • Fallback Mode: Existing employees with no branches assigned remain visible based on their original primary company.

Usage

  1. Open an Employee form.
  2. In the header/top section, find the Branches field.
  3. Select all the branch companies this employee should belong to.
  4. The first branch in the list will automatically be set as the "Primary Company" for standard Odoo processes.

Technical Details

  • Overrides hr.employee's company_id to be a computed field based on company_ids.
  • Overrides _search and ir.rule to support Many2many company filtering.
  • Overrides pos.config's _employee_domain for POS login visibility.
  • Includes transition logic for existing data.