Point of Sale

Commerce et restauration

Place de marchéOpérationsVersion 0.3.0AGPL-3.0-or-latermanifest

À quoi elle sert ​

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.

Ce que fait et ne fait pas le paquet ​

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.

Détails du module ​

  • Version: 0.3.0
  • Auteur: SpaceCorps
  • Licence: AGPL-3.0-or-later
  • Noyau requis: ^0.2 (le noyau actuel est 0.2.0)
  • Maturité: Expérimental
  • Catégories: Ventes

Modèles ​

pos_config ​

A point of sale (a till or a shop) and its rules

Groupe de lecture: pos.user. Groupe d'écriture: pos.manager.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
nametextnonenonpos.useren clairName of the till or shop, for example Main street shop
currencytextnonenonpos.useren clairISO 4217 currency code, for example EUR
receipt_headerlongtextnonenonpos.useren clairText printed at the top of receipts
cash_controlboolnonenonpos.useren clairWhether sessions must count the cash in the drawer when they open and close
default_opening_cashmoneynonenonpos.useren clairCash normally left in the drawer overnight (minor currency units)
allow_refundsboolnonenonpos.useren clairWhether cashiers may propose refunds at this point of sale
activeboolnonenonpos.useren clairWhether 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

Groupe de lecture: pos.user. Groupe d'écriture: pos.user.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
config_idref → pos_confignonenonpos.useren clairThe point of sale the session belongs to
cashiertextinternalouipos.usermasquéName of the cashier who opened the session
opened_ondatenonenonpos.useren clairDay the session was opened (YYYY-MM-DD)
closed_ondatenonenonpos.useren clairDay the session was closed (YYYY-MM-DD)
opening_cashmoneyfinancialnonpos.usernon communiquéCash counted in the drawer at opening (minor currency units)
expected_cashmoneyfinancialnonpos.usernon communiquéCash the drawer should hold at closing: opening cash plus cash payments (entered, not computed)
closing_cashmoneyfinancialnonpos.usernon communiquéCash actually counted in the drawer at closing
cash_differencemoneyfinancialnonpos.usernon communiquéClosing cash minus expected cash; negative means money is missing
notelongtextnonenonpos.useren clairExplanation for any cash difference
stateselect (open, closed)nonenonpos.useren clairSession status: open, closed

pos_order ​

A sale rung up at a point of sale

Groupe de lecture: pos.user. Groupe d'écriture: pos.user.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
session_idref → pos_sessionnonenonpos.useren clairThe session the sale was made in
receipt_numbersequencenonenonpos.useren clairNumber 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_idref → inventory_locationnonenonpos.useren clairWhere the goods leave stock; paying creates the stock moves from this location
ordered_ondatenonenonpos.useren clairDay of the sale (YYYY-MM-DD)
customer_idref → partynonenonpos.useren clairThe customer, when one was identified
tax_totalmoneynonenonpos.useren clairTax included in the total (minor currency units)
totalmoneynonenonpos.useren clairTotal paid by the customer including tax: the sum of the line subtotals (minor currency units)
notelongtextnonenonpos.useren clairRemark about the sale
stateselect (draft, paid, refunded, cancelled)nonenonpos.useren clairSale status: draft, paid, refunded, cancelled

pos_order_line ​

One product line of a sale

Groupe de lecture: pos.user. Groupe d'écriture: pos.user.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
order_idref → pos_ordernonenonpos.useren clairThe sale the line belongs to
product_idref → productnonenonpos.useren clairThe product sold
descriptiontextnonenonpos.useren clairText shown on the receipt
quantitynumbernonenonpos.useren clairUnits sold
unit_pricemoneynonenonpos.useren clairPrice per unit including tax (minor currency units)
discount_bpnumbernonenonpos.useren clairDiscount in basis points: 1000 means 10.00 percent
subtotalmoneynonenonpos.useren clairLine 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

Groupe de lecture: pos.user. Groupe d'écriture: pos.user.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
order_idref → pos_ordernonenonpos.useren clairThe sale the payment is for
methodselect (cash, card, bank_transfer, voucher, other)nonenonpos.useren clairHow the customer paid: cash, card, bank_transfer, voucher, other
amountmoneyfinancialnonpos.usernon communiquéAmount paid with this method (minor currency units)
paid_ondatenonenonpos.useren clairDay of the payment (YYYY-MM-DD)
provider_referencetextfinancialouipos.usernon communiquéReference from the card terminal or payment provider; never a card number

Flux de travail ​

pos_session ​

ActionTransitionQui peut l'exécuterApprobation
pos_session.closestate: open → closedpos.manageroui

pos_order ​

ActionTransitionQui peut l'exécuterApprobation
pos_order.paystate: draft → paidpos.usernon
pos_order.cancelstate: draft → cancelledpos.usernon
pos_order.refundstate: paid → refundedpos.manageroui

Groupes de permissions ​

Groupes utilisés par cette application :

  • pos.manager
  • pos.user

Étapes d'approbation ​

Étapes qu'un agent ne peut que proposer :

  • pos_session.close
  • pos_order.refund

Ce que les agents peuvent et ne peuvent pas faire ​

Un agent peut lire, rechercher, créer et modifier les enregistrements de cette application, et exécuter les actions qui ne requièrent pas d'approbation, dans les limites des groupes de permissions de son jeton.

Il ne peut que proposer ces étapes, qu'une personne doit approuver : pos_session.close, pos_order.refund, pos_config.delete, pos_session.delete, pos_order.delete, pos_order_line.delete, pos_payment.delete.

Les données personnelles sont masquées sous forme de jetons de substitution : pos_session.cashier.

Ces champs ne sont pas communiqués aux agents : pos_session.opening_cash, pos_session.expected_cash, pos_session.closing_cash, pos_session.cash_difference, pos_payment.amount, pos_payment.provider_reference.

Dépendances ​

Chaque dépendance indique les versions qu’elle accepte. Les applications intégrées suivent les versions du noyau : une exigence à leur égard est donc vérifiée par rapport à la version du noyau.

Installer cette application depuis la place de marché installe aussi les dépendances manquantes, dans un seul plan à confirmer une fois.

Installation ​

Installez-la depuis l'application Customize (Place de marché), ou en ligne de commande :

bash
obop modules install-from pos

Nécessite une base de données et des droits d'administrateur.

Créer la vôtre ​

Le guide des modules montre comment sont écrites les applications de ce type