Dimension UoM Calculator
Enter cut dimensions — get kg automatically
Designed for steel service centers, pipe & tube distributors, metal fabricators, and any business where stock is tracked by weight but ordered by cut dimensions.
How it works
Instead of entering a final quantity, users enter physical dimensions (length, width, thickness) and piece count on the order line. The module selects the right formula based on the product's section type and writes the computed weight directly to the order quantity.
- Select a product — dimension fields appear automatically for that section type
- Enter pieces and length (+ width / height where required)
- Computed Qty updates instantly and fills the order quantity
5 Built-in Section Types
| Section Type | Formula | Fixed attributes from variant |
|---|---|---|
| Flat / Plate / Rectangular Bar | width × height × length × density / 1,000,000 | Width, Thickness |
| Pipe / Tube | π × (D − t) × t × length × density / 1,000,000 | Outer Diameter, Wall Thickness |
| Solid Round Bar | π/4 × D² × length × density / 1,000,000 | Diameter |
| Structural Profile (I, H, L, T, C…) | linear_mass × length / 1,000 | Linear Mass (kg/m) |
| Free Formula | User-defined Python expression | Any combination |
Fixed Attribute Reference & Annotated Formula
The product template shows which variant attributes must be configured for the selected section type, with live ✓ / ✗ status per role. The formula display colour-codes each variable: configured attributes appear as green badges, missing ones as red badges, manual inputs in blue italic.
Attribute & Variant Setup
Fixed dimensions (outer diameter, wall thickness, width, thickness, linear mass) are stored as product variant attributes. Each combination becomes a separate variant. Add values and fill in the Numeric Value field — the module reads this value directly in the formula.
Key Features
- Variant-aware — fixed dimensions travel with the variant, not the order line
- Context-sensitive columns — only relevant dimension fields shown per section type
- Works everywhere — purchase order lines, sale order lines, BoM component lines
- Document locking — dimension fields become read-only when an order is locked or cancelled
- Free formula mode — write any Python expression using named dimension variables
Free Formula Variables
| Variable | Description |
|---|---|
length | Length entered on the order line (mm) |
width | Width entered on the order line (mm) |
height | Height / thickness entered (mm) |
diameter | Outer diameter from variant attribute (mm) |
wall_thick | Wall thickness from variant attribute (mm) |
kg_per_m | Linear mass from variant attribute (kg/m) |
density / rho | Density from product template (g/cm³) |
pi | 3.14159… |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Manufacturing (mrp)
• Purchase (purchase) • Sales (sale_management) • Inventory (stock) • Discuss (mail) • Invoicing (account) |
| Lines of code | 594 |
| Technical Name |
fabrika_dimension_uom |
| License | OPL-1 |
| Website | https://github.com/fab-agent/fabrika-dimension-uom |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module