The customer feature integrates with Odoo’sDocumentation Index
Fetch the complete documentation index at: https://docs.laportenard.com/llms.txt
Use this file to discover all available pages before exploring further.
res.partner model and supports RNC/Cédula validation via DGII (Dominican tax authority).
Modes
| Mode | Route | Purpose |
|---|---|---|
| Browse | /pos-react/customers/ | View, search, create, and edit customers |
| Assign | /pos-react/order/customer/ | Select and assign a customer to the current order |
API endpoints
All endpoints under/pos-react/api/customers/ require authentication and point_of_sale.group_pos_user membership:
| Endpoint | Purpose |
|---|---|
POST /search | Search by name, phone, email, or RNC |
POST /get | Get a single customer by ID |
POST /create | Create new customer (automatic DGII validation on save) |
POST /update | Update existing customer |
POST /validate-rnc | Validate RNC/Cédula against DGII and retrieve company name |
RNC/Cédula validation
RNC is the Dominican Republic’s tax ID system:- RNC — 9-digit tax ID for companies
- Cédula — 11-digit personal ID
When RNC is required
| Situation | Requirement |
|---|---|
| NCF Types 01, 14, 15 | Required |
| Invoice ≥ RD$250,000 | Required |
| Other cases | Optional |
UI validation states
- Idle — No validation icon
- Validating — Spinner
- Valid — Green checkmark + success message + auto-filled name
- Invalid — Red X + error message
User flow — assigning a customer
Open customer lookup
Tap “Select Customer” in the order panel. Navigates to
/pos-react/order/customer/?orderId=X&table=Y.Customer select button
TheCustomerSelectButton component provides a compact way to assign or view the customer on an order. It appears in the order panel header.
- Displays the assigned customer name or a “Select Customer” placeholder
- Shows a pricelist badge (amber) if the customer has a non-default pricelist
- Navigates to the customer lookup screen on tap, preserving return context via
sessionStorage
Credit limit
Customers can have acreditLimit field (from Odoo’s res.partner.credit_limit). When assigned to an order, the payment screen enables a credit payment button if the credit limit is greater than zero.
See Credit payments for the full credit payment flow.
Fiscal position
Each customer can have aproperty_account_position_id (fiscal position) assigned in Odoo. When a customer is selected for an order, their fiscal position overrides the config default and triggers real-time tax remapping on the frontend.
The Customer model includes fiscalPositionId?: number, populated from property_account_position_id in both the bootstrap partners array and the customer API responses (search, get, create, update).
See Tax calculation — Fiscal position tax remapping for the full resolution chain and how order type interacts with customer fiscal positions.
State management
TheusePOS hook has a SET_CUSTOMER action:
Keyboard shortcuts (customer lookup screen)
| Key | Action |
|---|---|
Esc | Go back |
/ | Focus search |
Enter | Select single result |
Known limitations
- State/country dropdowns not implemented (M2O fields are read-only)
pos.config.default_partner_idis not auto-selected- No customer order history display
- No duplicate customer detection
- Offline RNC validation requires internet connection
Common issues
'Access denied to POS API'
'Access denied to POS API'
Ensure the user has
point_of_sale.group_pos_user membership in Odoo.'CSRF token missing'
'CSRF token missing'
Check that the CSRF token is cached correctly and the session is valid.
'RNC validation failed'
'RNC validation failed'
- Check internet connection (DGII requires external access)
- Verify the DGII module is installed on Odoo
- Personal cédulas may not be in the DGII registry — this is expected