Barcode Purchase
barcode_purchase · OCA/barcode-interface
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Description
Create purchase orders directly from the Barcode scanner app.
The operator picks a vendor, a destination location and a buyer, then scans or
adds the products to order (with a GS1 parser installed, a GS1 label also gives
its lot/serial and piece count) and confirms. The module creates a
purchase.order and, when asked, confirms it — which raises the incoming
picking — so a purchase can be raised on the warehouse floor without opening the
back office. The server does it all in one call: a failure leaves no half-made
order behind.
This is a feature module on top of barcode_scanner: it registers its own
screens and home-screen tile into the scanner core without patching it, so you
install only what you need.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
purchase_order_form |
purchase.order.form - barcode_purchase | purchase.order | form | Inherits purchase.purchase_order_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
No new fields.
Public methods (2)-
action_barcode_purchase(self, partner_id, lines, confirm=False, location_dest_id=False, user_id=False, partner_ref=False)@api.modelCreate the purchase order the scanner drafted, and confirm it when asked -- all in one transaction, so a failure leaves no half-made order. ``lines`` are ``{product_id, qty, price_unit, lot_name}``; a missing ``price_unit`` lets Odoo price the line from the vendor's prices. Both the destination and the lots are kept on the order, so they hold however the order is confirmed: from here, or approved later in the back office. ``location_dest_id`` picks the receipt operation of its warehouse and is each line's final location, which the stock moves follow (in a reception in several steps, through the steps). The lots read are kept on their lines and written on the receipt when it is created. A lot-tracked product without a lot does not hold the order back: a vendor's lot is usually unknown until the goods turn up, and it belongs on the receipt. Those products are returned in ``missing_lots``. -
barcode_purchase_prices(self, partner_id, lines)@api.modelThe unit price each line would get on an order for the vendor, so the scanner can show it before the order exists: computed as the order computes it, from the vendor's prices, in the purchase unit and in the order's currency. ``lines`` are ``{product_id, qty}``; a line whose product is gone gets None.
-
barcode_lot_nameCharcopy=Falsehelp='The lot or serial number read from the label when the order was raised from the Barcode app. It goes onto the receipt when the receipt is created.'string='Lot/Serial Read'
No public methods.