openepcis_connector_events_pos: point-of-sale events
The bridge to Point of Sale. A till's orders leave the warehouse through an operation type that looks exactly like a delivery to the stock module; this addon knows the difference and reports a sale as retail_selling with the goods retail_sold: and keeps that reading current as tills are configured and moved.
A point-of-sale order leaves the warehouse through an ordinary outgoing operation, and to the stock module it looks exactly like a delivery: outgoing, shipping, in_transit. In reality the goods have been sold and carried out of the shop, and nothing is in transit to a customer's address.
EPCIS has its own terms for this: the business step retail_selling, which leaves the goods retail_sold. None of the codes on the operation type reveal that a sale is taking place. This bridge knows where to find that information and does nothing else.
| Module | openepcis_connector_events_pos |
| Depends on | openepcis_connector_events, point_of_sale |
| Installs | Automatically, once the events addon and Point of Sale are both present |
| Settings | None; it reseeds the operation type's business step and disposition |
| Source | openepcis-odoo · LGPL-3 |
What makes an operation type a till
An operation type is a till when a point-of-sale configuration points at it; its name, "PoS Orders", is the same in both cases. Pointing a till at an operation type changes none of the codes the events addon pre-fills from, so an operation type seeded before the till existed would go on reporting sales as shipments, even though the correct values are available.
The bridge therefore reacts at the moments when this relationship changes:
- When a till is created or re-pointed, the operation type it now points at is marked as a sale.
- When the last till is pointed elsewhere, the old operation type goes back to being a loading bay with plain
shippingandin_transit. - At install, every existing till is processed once, so a database that adds the bridge later needs no manual change to each configuration.
On the instance in the walkthrough, the operation type read shipping / in_transit until a till was created, and retail_selling / retail_sold immediately afterwards.
A value somebody chose by hand is still never overwritten. The reseed fills the two fields the same way the pre-fill does, and the pre-fill leaves any existing value in place.