Skip to Content

PMIS Audit

Beta License: AGPL-3 PMISuite/stock-accounting Version: 18.0

This module provides audit views for stock valuation, live vendor-bill filters for landed costs, and zero-price controls on sales and purchase order lines. The audit values support investigation; they do not automatically reconcile stock valuation or allocate landed costs.

Table of contents

Key features

  • Shows billed purchase costs, tracked incoming/outgoing values, and delta columns on Stock Valuation Layers, with access to related journal items.

  • On Vendor Bills and Journal Items, provides live Undistributed LC and Vendor Bills with LC search filters. These query current bill lines and linked landed costs directly, without refreshing or writing audit flags.

  • Blocks zero unit prices on sales and purchase lines in the states described below, with exceptions for explicit 100% discounts.

  • Adds a Stock Value tab to journal entries that have valuation layers.

  • Uses Product Unit of Measure decimal precision for counted and available quantities on stock quants.

Configuration

The addon requires pmis_account_dates, pmis_ux, pmis_stock_move_fiscal_month, pmis_stock_account, stock_landed_costs, stock_valuation_layer_tracking, and pmis_stock_reconcile. It has no separate settings page.

Assign Data Auditing / Audit User to users who need to see remaining value, current product cost, and journal items on the valuation audit form. Audit Manager includes Audit User but adds no separate management actions or model access rights in this addon. Normal stock and accounting access rights still apply.

Upgrading existing installations

When deploying version 18.0.1.2.1 or later, upgrade pmis_audit together with pmis_audit_server_actions if the latter is installed. That compatibility addon now lives in the sibling temporary repository; keep that repository in Odoo's addons_path and follow its coordinated upgrade notes. The audit pre-migration deactivates the two obsolete server-actions valuation views and the obsolete journal-item form and list audit views before loading the addon's views. These legacy views reference the removed unit_cost_override, audit_undistributed_lc, and audit_bills_with_lc fields and otherwise prevent the registry from loading. The cleanup uses XML IDs, preserves business data, and tolerates missing or already inactive views. Updating the source and restarting alone does not run the migration; a module upgrade is required.

The pre-migration runs when Odoo reaches pmis_audit in dependency order. During a full upgrade, other addons can validate the shared journal-item views earlier. In that case, deactivate pmis_audit.view_move_line_form_audit and pmis_audit.view_move_line_tree_audit before retrying the upgrade. The migration safely accepts this prior cleanup.

Usage

Locate landed-cost bills

  1. Open Accounting > Vendors > Bills.

  2. Select Filters > Undistributed LC to find bills with no linked landed costs. Combine it with Posted if only posted bills should be included.

  3. Open a matching bill and review its landed costs before allocating them through the standard landed-cost workflow.

The filter includes vendor bills containing an invoice-line product configured as a landed cost and having no linked landed-cost records. A linked record in any state, including draft or canceled, excludes the bill. The filter does not verify completed or partial allocation and excludes vendor refunds. It checks the product's landed-cost setting, not the bill line's landed-cost flag.

Use Vendor Bills with LC to include bills that already have linked landed costs. Both filters are also available on Journal Items and reflect changes when the search is refreshed. On Journal Items, they select all journal items belonging to matching bills, not just the landed-cost expense lines.

Valuation audit

In the stock valuation list, enable the optional billed-cost and delta columns. Use the balance-scale Audit Entry button on a layer to open its form and compare Record Values with Control Values.

The valuation form shows billed costs based only on posted vendor bills and refunds. Amounts use the journal lines' signed balances in company currency; quantities are converted to the product unit of measure. Later currency-rate changes do not revalue already posted bills in this audit.

Layers with a direct purchase line use that line's net billed unit cost when the product and company match. Layers without a direct purchase line use the billed costs of their immediate tracked purchase sources, weighted by the quantities actually taken. Source bill totals count each purchase line once, even when multiple tracking records refer to it. These are current estimates from billed purchase costs, not historical inventory valuations or landed-cost-inclusive amounts.

Billed Quantity is the net posted bill quantity across distinct source purchase lines, not the quantity consumed by this valuation layer. Billed Value is the billed cost attributed to the layer's quantity, signed according to the layer quantity and rounded in company currency.

Billed Cost Status distinguishes a valid zero cost from unavailable data. Partial Billed Cost means that priced tracking quantities do not match the layer quantity; the displayed billed value includes only priced sources. Availability does not mean that all received units have been invoiced. Sources without a direct purchase link, such as intermediate manufacturing or return layers, are not recursively priced. Zero or negative net billed quantities do not produce a unit cost.

Current Product Cost is read-only and belongs to the valuation layer's company. It is neither a historical cost nor the next FIFO layer's price.

Incoming Delta is abs(value_in) - abs(value) when incoming tracking exists; Outgoing Delta is abs(value_out) - abs(value) when outgoing tracking exists. Otherwise, the respective delta is zero. An outgoing difference is expected for partially consumed stock, and zero without tracking is not evidence of a successful reconciliation.

Zero-price controls

When a line's unit price, display type, or state is created or updated, the following constraints reject zero unit prices with an error:

  • Sales lines: all states except draft and cancel, unless discount is exactly 100%.

  • Purchase lines: all states except draft, done, and cancel, unless any of discount, discount2, or discount3 is exactly 100%. Additional discount fields are considered only when installed.

Sections and notes are excluded. These checks are not limited to order confirmation; for example, they also apply to the sent state. Correct the unit price or apply an intentional full discount before retrying the operation.

Bug Tracker

Bugs are tracked on PMISuite Repository Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Authors

Contributors

  • Matjaž Mozetič

Maintainers

LUXIM MATMOZ

Current maintainer:

sysadminmatmoz

Luxim is an independent R&D and deployment company focused on solving complex problems in the Odoo ecosystem.

Odoo Community Association

Luxim is an active member of OCA (Odoo Community Association).