pos_loyalty_member_custom/README.md
2026-05-21 17:04:01 +07:00

29 lines
1.6 KiB
Markdown

# POS Loyalty Member Customization
This custom Odoo module enhances the POS Loyalty interface and partner creation wizard, optimizing workflow efficiency and resolving critical multi-company operational constraints.
## Features
1. **Strict Customer Selection Filter:**
- Limits customer loading and search lists in the POS UI strictly to real individuals who hold an active membership or loyalty card (`is_loyalty_member = True`).
- Automatically excludes cashier accounts, user accounts, and company partners from being selected as customers.
2. **Simplified Customer Creation Wizard:**
- Overrides the POS Customer Edit/Creation screen to show only essential details:
* Name
* Phone
* Email
* Address (Street, Zip, City, State, Country)
* Birthday
3. **Automatic Lowest Level Membership Assignment:**
- Automatically provisions new partners with a loyalty card for the lowest membership tier (`Membership Silver`) immediately upon registration.
4. **Robust Multi-Company Loyalty Processing:**
- Solves a core Odoo 19 multi-company operational bug where cashiers in branch companies encounter "Access Errors" when validating orders for customers whose loyalty cards belong to the parent company.
- Bypasses company-specific record rules during POS loyalty audit logging using standard and safe `sudo` environment execution.
## Technical Details
- **JS OWL Patching:** Overrides POS frontend partner management safely using clean, standard owl-level class overrides.
- **Python Inheritance:** Customizes backend models (`res.partner`, `pos.order`) to clean loading domains and securely provision cross-company data.