What it does
wms-gl bridges Warehouse Management (wms) and the General Ledger (gl): it turns
inventory movements into balanced GL journal entries using the standard three-way-match
model. It owns nothing of its own — no folder, no data — just two extensions and two posting
actions on existing wms documents. Posting stays in the GL, so all balance mechanics run
through the ledger engine.
It is a bridge module in the same family as fin-gl, crm-fin, and wms-fin: small, depends
on exactly the two modules it integrates (plus pricing for valuation), and keeps the core
modules independent of each other.
The postings
| Trigger | Action | Journal entry | Valued at |
|---|---|---|---|
| Purchase order reaches Received | post_goods_receipt_to_gl |
Dt 1200 Inventory / Cr 2050 GR/IR | net PO line value (Σ quantity × unit_price) |
| Stock movement is a Shipment or Write-off | post_goods_issue_to_gl |
Dt 5000 COGS / Cr 1200 Inventory | weighted-average cost (pricing.product_cost.current_cost × quantity) |
Each action produces a balanced draft entry (balance_registry = false) linked back to its
source document, then an accountant reviews and posts it in the GL. The receipt parks the
liability in the GR/IR clearing account (account 2050); the matching vendor bill — posted
by fin-gl's post_bill_to_gl — later clears GR/IR and recognises the actual payable plus tax.
That is the three-way match: goods receipt, vendor invoice, and PO all reconcile through GR/IR.
Re-running an action on an already-posted document is a no-op: the idempotency guard reads the
gl_*_entry_id link (an extension column, loaded into the action record context) and exits.
What it adds
- Extension on
wms.purchase_order—gl_receipt_entry_id/gl_receipt_entry(link to the goods-receipt GL entry). - Extension on
wms.stock_movement—gl_entry_id/gl_entry(link to the goods-issue GL entry). - Role
wms-gl.admin— execute rights on both actions. Like every bridge, the role is registered at install but not auto-assigned (the bridge owns no folder); a tenant admin grants it at thewmshost folder.
Dependencies
wms >= 0.1.0, gl >= 0.6.0 (needs the GR/IR account 2050), pricing >= 0.1.0 (needs
product_cost for COGS valuation).