product_packaging_calculator
Provide a helper to break down product quantities by packaging so users can guide picking and display counts clearly.
Key Features
- product.product: Computes packaging-contained mapping to know how many smaller packages fit inside each packaging level for nested breakdowns.
- product.product: Calculates required packaging quantities for a target amount using ordered packaging, optional filters, custom naming, and optional contained details.
- product.product: Formats quantity-by-packaging results as human-readable strings with options to include total units or omit unit-only outputs.
- product.qty_by_packaging.mixin: Adds a computed display field that shows packaging-based quantities on any model defining product and quantity fields, honoring context flags for total units or packaging-only display.
- technical: Pre-init hook migrates model references from the former stock_packaging_calculator module to preserve compatibility.