Point of Sale

Einzelhandel und Gastronomie

MarktplatzBetriebVersion 0.1.0manifest

Wofür sie gedacht ist ​

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.

Was das Paket leistet und was nicht ​

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. Totals, change and cash differences are entered, not computed. Card numbers must never be stored; keep only the payment provider's reference. Needs the Products package.

Modelle ​

pos_config ​

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

Lesegruppe: pos.user. Schreibgruppe: pos.manager.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
nametextnoneneinpos.userim KlartextName of the till or shop, for example Main street shop
currencytextnoneneinpos.userim KlartextISO 4217 currency code, for example EUR
receipt_headerlongtextnoneneinpos.userim KlartextText printed at the top of receipts
cash_controlboolnoneneinpos.userim KlartextWhether sessions must count the cash in the drawer when they open and close
default_opening_cashmoneynoneneinpos.userim KlartextCash normally left in the drawer overnight (minor currency units)
allow_refundsboolnoneneinpos.userim KlartextWhether cashiers may propose refunds at this point of sale
activeboolnoneneinpos.userim KlartextWhether 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

Lesegruppe: pos.user. Schreibgruppe: pos.user.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
config_idref → pos_confignoneneinpos.userim KlartextThe point of sale the session belongs to
cashiertextinternaljapos.usermaskiertName of the cashier who opened the session
opened_ondatenoneneinpos.userim KlartextDay the session was opened (YYYY-MM-DD)
closed_ondatenoneneinpos.userim KlartextDay the session was closed (YYYY-MM-DD)
opening_cashmoneyfinancialneinpos.userzurückgehaltenCash counted in the drawer at opening (minor currency units)
expected_cashmoneyfinancialneinpos.userzurückgehaltenCash the drawer should hold at closing: opening cash plus cash payments (entered, not computed)
closing_cashmoneyfinancialneinpos.userzurückgehaltenCash actually counted in the drawer at closing
cash_differencemoneyfinancialneinpos.userzurückgehaltenClosing cash minus expected cash; negative means money is missing
notelongtextnoneneinpos.userim KlartextExplanation for any cash difference
stateselect (open, closed)noneneinpos.userim KlartextSession status: open, closed

pos_order ​

A sale rung up at a point of sale

Lesegruppe: pos.user. Schreibgruppe: pos.user.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
session_idref → pos_sessionnoneneinpos.userim KlartextThe session the sale was made in
receipt_numbertextnoneneinpos.userim KlartextNumber printed on the receipt. Free text: packages cannot generate sequences
ordered_ondatenoneneinpos.userim KlartextDay of the sale (YYYY-MM-DD)
customer_idref → partynoneneinpos.userim KlartextThe customer, when one was identified
tax_totalmoneynoneneinpos.userim KlartextTax included in the total (minor currency units)
totalmoneynoneneinpos.userim KlartextTotal paid by the customer including tax (minor currency units, entered not computed)
notelongtextnoneneinpos.userim KlartextRemark about the sale
stateselect (draft, paid, refunded, cancelled)noneneinpos.userim KlartextSale status: draft, paid, refunded, cancelled

pos_order_line ​

One product line of a sale

Lesegruppe: pos.user. Schreibgruppe: pos.user.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
order_idref → pos_ordernoneneinpos.userim KlartextThe sale the line belongs to
product_idref → productnoneneinpos.userim KlartextThe product sold
descriptiontextnoneneinpos.userim KlartextText shown on the receipt
quantitynumbernoneneinpos.userim KlartextUnits sold
unit_pricemoneynoneneinpos.userim KlartextPrice per unit including tax (minor currency units)
discount_bpnumbernoneneinpos.userim KlartextDiscount in basis points: 1000 means 10.00 percent
subtotalmoneynoneneinpos.userim KlartextLine total after discount (minor currency units, entered not computed)

pos_payment ​

A payment received against a sale; a sale may be paid with several methods

Lesegruppe: pos.user. Schreibgruppe: pos.user.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
order_idref → pos_ordernoneneinpos.userim KlartextThe sale the payment is for
methodselect (cash, card, bank_transfer, voucher, other)noneneinpos.userim KlartextHow the customer paid: cash, card, bank_transfer, voucher, other
amountmoneyfinancialneinpos.userzurückgehaltenAmount paid with this method (minor currency units)
paid_ondatenoneneinpos.userim KlartextDay of the payment (YYYY-MM-DD)
provider_referencetextfinancialjapos.userzurückgehaltenReference from the card terminal or payment provider; never a card number

Workflows ​

pos_session ​

AktionBewegtWer sie ausführen darfFreigabe
pos_session.closestate: open → closedpos.managerja

pos_order ​

AktionBewegtWer sie ausführen darfFreigabe
pos_order.paystate: draft → paidpos.usernein
pos_order.cancelstate: draft → cancelledpos.usernein
pos_order.refundstate: paid → refundedpos.managerja

Berechtigungsgruppen ​

Von dieser App verwendete Gruppen:

  • pos.manager
  • pos.user

Freigabeschritte ​

Schritte, die ein Agent nur vorschlagen kann:

  • pos_session.close
  • pos_order.refund

Was Agenten tun können und was nicht ​

Ein Agent kann Datensätze dieser App lesen, durchsuchen, anlegen und aktualisieren sowie Aktionen ausführen, die keine Freigabe brauchen, und zwar innerhalb der Berechtigungsgruppen seines Tokens.

Diese Schritte kann er nur vorschlagen, und eine Person muss sie freigeben: pos_session.close, pos_order.refund, pos_config.delete, pos_session.delete, pos_order.delete, pos_order_line.delete, pos_payment.delete.

Personenbezogene Daten werden als Platzhalter maskiert: pos_session.cashier.

Diese Felder werden Agenten vollständig vorenthalten: pos_session.opening_cash, pos_session.expected_cash, pos_session.closing_cash, pos_session.cash_difference, pos_payment.amount, pos_payment.provider_reference.

Abhängigkeiten ​

  • base
  • product

Installation ​

Installieren Sie sie in der App Customize (Marktplatz) oder über die Kommandozeile:

bash
obop modules install-from pos

Erfordert eine Datenbank und Administratorrechte.

Selbst bauen ​

Der Modulleitfaden zeigt, wie Apps wie diese geschrieben werden