Point of Sale
Comercios y restaurantes
Para qué sirve
Model a shop till: configuration, cash-controlled sessions, orders with lines and payment lines per method. It records what happened at the till; it is not a payment terminal integration, and card numbers must never be stored.
Qué hace y qué no hace el paquete
Shop tills: a point-of-sale configuration, cash-controlled sessions that are opened and closed, orders with lines, and payment lines per method. A refund and the closing of a session need a human approval from a manager; agents may only propose them. Line subtotals and the order total are computed from the lines, receipts get a gapless yearly number, and paying is refused until the payments cover the total; change and cash differences are still entered. Paying also creates a draft stock move per line from the order's stock location, for the warehouse to validate. Card numbers must never be stored; keep only the payment provider's reference. Needs the Products package.
Detalles del módulo
- Versión:
0.3.0 - Autor: SpaceCorps
- Licencia: AGPL-3.0-or-later
- Requiere núcleo:
^0.2(el núcleo actual es 0.2.0) - Madurez: Experimental
- Categorías: Ventas
Modelos
pos_config
A point of sale (a till or a shop) and its rules
Grupo de lectura: pos.user. Grupo de escritura: pos.manager.
| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
name | text | none | no | pos.user | en claro | Name of the till or shop, for example Main street shop |
currency | text | none | no | pos.user | en claro | ISO 4217 currency code, for example EUR |
receipt_header | longtext | none | no | pos.user | en claro | Text printed at the top of receipts |
cash_control | bool | none | no | pos.user | en claro | Whether sessions must count the cash in the drawer when they open and close |
default_opening_cash | money | none | no | pos.user | en claro | Cash normally left in the drawer overnight (minor currency units) |
allow_refunds | bool | none | no | pos.user | en claro | Whether cashiers may propose refunds at this point of sale |
active | bool | none | no | pos.user | en claro | Whether the point of sale is in use |
pos_session
One shift of selling at a point of sale, from opening to closing the cash drawer
Grupo de lectura: pos.user. Grupo de escritura: pos.user.
| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
config_id | ref → pos_config | none | no | pos.user | en claro | The point of sale the session belongs to |
cashier | text | internal | sí | pos.user | enmascarado | Name of the cashier who opened the session |
opened_on | date | none | no | pos.user | en claro | Day the session was opened (YYYY-MM-DD) |
closed_on | date | none | no | pos.user | en claro | Day the session was closed (YYYY-MM-DD) |
opening_cash | money | financial | no | pos.user | retenido | Cash counted in the drawer at opening (minor currency units) |
expected_cash | money | financial | no | pos.user | retenido | Cash the drawer should hold at closing: opening cash plus cash payments (entered, not computed) |
closing_cash | money | financial | no | pos.user | retenido | Cash actually counted in the drawer at closing |
cash_difference | money | financial | no | pos.user | retenido | Closing cash minus expected cash; negative means money is missing |
note | longtext | none | no | pos.user | en claro | Explanation for any cash difference |
state | select (open, closed) | none | no | pos.user | en claro | Session status: open, closed |
pos_order
A sale rung up at a point of sale
Grupo de lectura: pos.user. Grupo de escritura: pos.user.
| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
session_id | ref → pos_session | none | no | pos.user | en claro | The session the sale was made in |
receipt_number | sequence | none | no | pos.user | en claro | Number printed on the receipt, such as R-2026-000042: a gapless series that starts again each year, assigned when the sale is created |
stock_location_id | ref → inventory_location | none | no | pos.user | en claro | Where the goods leave stock; paying creates the stock moves from this location |
ordered_on | date | none | no | pos.user | en claro | Day of the sale (YYYY-MM-DD) |
customer_id | ref → party | none | no | pos.user | en claro | The customer, when one was identified |
tax_total | money | none | no | pos.user | en claro | Tax included in the total (minor currency units) |
total | money | none | no | pos.user | en claro | Total paid by the customer including tax: the sum of the line subtotals (minor currency units) |
note | longtext | none | no | pos.user | en claro | Remark about the sale |
state | select (draft, paid, refunded, cancelled) | none | no | pos.user | en claro | Sale status: draft, paid, refunded, cancelled |
pos_order_line
One product line of a sale
Grupo de lectura: pos.user. Grupo de escritura: pos.user.
| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
order_id | ref → pos_order | none | no | pos.user | en claro | The sale the line belongs to |
product_id | ref → product | none | no | pos.user | en claro | The product sold |
description | text | none | no | pos.user | en claro | Text shown on the receipt |
quantity | number | none | no | pos.user | en claro | Units sold |
unit_price | money | none | no | pos.user | en claro | Price per unit including tax (minor currency units) |
discount_bp | number | none | no | pos.user | en claro | Discount in basis points: 1000 means 10.00 percent |
subtotal | money | none | no | pos.user | en claro | Line total after discount: quantity times unit price, less the discount (minor currency units) |
pos_payment
A payment received against a sale; a sale may be paid with several methods
Grupo de lectura: pos.user. Grupo de escritura: pos.user.
| Campo | Tipo | Clase de datos | Datos personales | Grupo | Los agentes ven | Descripción |
|---|---|---|---|---|---|---|
order_id | ref → pos_order | none | no | pos.user | en claro | The sale the payment is for |
method | select (cash, card, bank_transfer, voucher, other) | none | no | pos.user | en claro | How the customer paid: cash, card, bank_transfer, voucher, other |
amount | money | financial | no | pos.user | retenido | Amount paid with this method (minor currency units) |
paid_on | date | none | no | pos.user | en claro | Day of the payment (YYYY-MM-DD) |
provider_reference | text | financial | sí | pos.user | retenido | Reference from the card terminal or payment provider; never a card number |
Flujos de trabajo
pos_session
| Acción | Mueve | Quién puede ejecutarla | Aprobación |
|---|---|---|---|
pos_session.close | state: open → closed | pos.manager | sí |
pos_order
| Acción | Mueve | Quién puede ejecutarla | Aprobación |
|---|---|---|---|
pos_order.pay | state: draft → paid | pos.user | no |
pos_order.cancel | state: draft → cancelled | pos.user | no |
pos_order.refund | state: paid → refunded | pos.manager | sí |
Grupos de permisos
Grupos que usa esta aplicación:
pos.managerpos.user
Pasos con aprobación
Pasos que un agente solo puede proponer:
pos_session.closepos_order.refund
Qué pueden y qué no pueden hacer los agentes
Un agente puede leer, buscar, crear y actualizar registros de esta aplicación, y ejecutar las acciones que no requieren aprobación, dentro de los grupos de permisos de su token.
Solo puede proponer estos pasos, y una persona debe aprobarlos: pos_session.close, pos_order.refund, pos_config.delete, pos_session.delete, pos_order.delete, pos_order_line.delete, pos_payment.delete.
Los datos personales se enmascaran como tokens marcadores: pos_session.cashier.
Estos campos se retienen por completo y los agentes no los ven: pos_session.opening_cash, pos_session.expected_cash, pos_session.closing_cash, pos_session.cash_difference, pos_payment.amount, pos_payment.provider_reference.
Dependencias
Cada dependencia indica las versiones que acepta. Las aplicaciones integradas se versionan con el núcleo, así que un requisito sobre ellas se comprueba con la versión del núcleo.
Al instalar esta aplicación desde el mercado también se instalan las dependencias que falten, en un único plan que se confirma una vez.
Instalación
Instálala desde la aplicación Customize (Marketplace) o desde la línea de comandos:
obop modules install-from posRequiere una base de datos y derechos de administrador.
Crea la tuya
La guía de módulos explica cómo se escriben aplicaciones como esta