From aff682dab457ccc6189b9d8acef85365aeb38273 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Fri, 13 Mar 2026 10:53:04 +0700 Subject: [PATCH] feat: Rename POS employee role 'Waiter/Server' to 'Server', add module documentation, and include a .gitignore file. --- .gitignore | 17 +++++++++++++++++ README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ __manifest__.py | 2 +- models/hr_employee.py | 2 +- 4 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..51314e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# IDE configurations +.vscode/ +.idea/ + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db diff --git a/README.md b/README.md new file mode 100644 index 0000000..c739f06 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# POS Employee Role for Odoo 19 + +This custom Odoo module extends the Point of Sale application to allow managing employee roles when using the "Log in with Employees" feature. + +## Features +It adds a **POS Role** selector to the Employee profile under the `HR Settings -> Attendance/Point of Sale` tab. + +The module provides four distinct roles to restrict UI elements: +1. **Server** (formerly Waiter/Server): + - Can only take orders. + - **Cannot** access the Payment screen. + - **Cannot** issue Refunds. + - **Cannot** Print Reports or Close the Register. + - **Cannot** access the Odoo Backend. +2. **Cashier**: + - Can take orders and process payments. + - **Cannot** issue Refunds. + - **Cannot** Print Reports. + - **Cannot** access the Odoo Backend. +3. **Outlet Manager**: + - Has full access to order management. + - **Can** issue Refunds. + - **Can** Print Reports and Close the Register. + - **Can** access the Odoo Backend. +4. **Area Manager**: + - Has all access (same as Outlet Manager). + +## Installation +1. Ensure the `point_of_sale` and `pos_hr` modules are installed. +2. Place the `pos_employee_role` directory into your Odoo custom addons directory. +3. Update the App List and install the "POS Employee Role" module. + +## Configuration +1. Go to **Employees** -> Select an Employee. +2. Navigate to the **HR Settings** tab. +3. Under the **Attendance/Point of Sale** section, select the desired **POS Role**. +4. Ensure the employee has a **PIN Code** assigned for POS Login. +5. In your POS configuration, make sure the employee is added to the "Employees with access" list. + +## Dependencies +- `point_of_sale` +- `pos_hr` diff --git a/__manifest__.py b/__manifest__.py index 593b977..fcd3128 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -6,7 +6,7 @@ 'summary': 'Add roles to employees for POS permissions', 'description': """ This module adds a role to employees for Point of Sale. -Roles: Waiter/Server, Cashier, Outlet Manager, Area Manager. +Roles: Server, Cashier, Outlet Manager, Area Manager. These roles are used to restrict POS UI features dynamically. """, 'depends': ['point_of_sale', 'pos_hr'], diff --git a/models/hr_employee.py b/models/hr_employee.py index 4e0eff4..c1f4184 100644 --- a/models/hr_employee.py +++ b/models/hr_employee.py @@ -6,7 +6,7 @@ class HrEmployee(models.Model): _inherit = 'hr.employee' pos_role = fields.Selection([ - ('waiter', 'Waiter/Server'), + ('waiter', 'Server'), ('cashier', 'Cashier'), ('outlet_manager', 'Outlet Manager'), ('area_manager', 'Area Manager')