| models | ||
| security | ||
| views | ||
| __init__.py | ||
| __manifest__.py | ||
| .gitignore | ||
| README.md | ||
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
- Open an Employee form.
- In the header/top section, find the Branches field.
- Select all the branch companies this employee should belong to.
- The first branch in the list will automatically be set as the "Primary Company" for standard Odoo processes.
Technical Details
- Overrides
hr.employee'scompany_idto be a computed field based oncompany_ids. - Overrides
_searchandir.ruleto support Many2many company filtering. - Overrides
pos.config's_employee_domainfor POS login visibility. - Includes transition logic for existing data.