Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Construction
  3. CBM Converter v 19.0
  4. Sales Conditions FAQ

CBM Converter

by Anmol Patil https://github.com/anmol6213
Odoo
v 19.0 Third Party 1
Download for v 19.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Inventory (stock)
• Invoicing (account)
• Sales (sale_management)
• Discuss (mail)
Lines of code 226
Technical Name cbm_converter
LicenseLGPL-3
Websitehttps://github.com/anmol6213
  • Description
  • Manifest
  • Documentation

📦 CBM Converter

Your browser does not support the video tag.

📢 Available for Hire!

Looking for a skilled and reliable Odoo Developer to build, fix or customize your Odoo system?

Let's build something great together! I specialize in custom module development, ERP implementation, integrations, and performance optimization.


📬 Hire Me wa.me/+91 82082 45035 /anmolpatil83

Overview

CBM Converter automatically calculates the number of pieces from CBM (Cubic Meter) quantity for construction materials like AAC Blocks. It extracts dimensions directly from the product name (e.g. 600x200x225) and computes the correct piece count — no manual entry needed.

Works seamlessly across Sale Orders, Customer Invoices, and Stock Deliveries. Bidirectional: enter CBM to get Pieces, or enter Pieces to get CBM.

grain
grain-two

Key Features

CBM to Pieces Pieces to CBM Smart Rounding No Loop
CBM to Pieces

Enter quantity in CBM — pieces are calculated automatically from product dimensions.

  • Dimensions parsed from product name (e.g. 600x200x225)
  • Works on Sale Orders, Invoices, and Deliveries
  • Ceiling rounding — never under-order
  • Example: 7.67 CBM → 285 pieces
Pieces to CBM

Enter pieces directly — CBM quantity updates automatically. Perfect for ordering by piece count.

  • Enter 285 pieces → get 7.695 CBM
  • Exact calculation, no rounding on reverse
  • Works in all 3 models
Smart Rounding

Pieces are always rounded up (ceiling) to ensure you never order fewer blocks than needed. Floating point errors handled with 4-decimal precision.

  • 7.67 / 0.027 = 284.07 → ceil → 285 ✅
  • 10.80 / 0.018 = 600.0 → 600 (not 601) ✅
No Infinite Loop

Smart onchange logic prevents quantity from overwriting itself. Uses expected vs current pieces comparison to detect manual edits only.

  • Quantity change → pieces update (compute)
  • Pieces change → quantity update (onchange, UI only)
  • No recursive triggers, no DB corruption

How to Use

  • Enter Quantity (CBM) on Sale Order — Pcs auto-calculated:
  • Pieces appear on Customer Invoice too:
  • Works on Delivery Orders:

Screenshots

Found any issue? Raise here -> https://github.com/anmol6213/OdoosApps/issues/new

CBM Converter | Compatible with Odoo 19 Community, Enterprise, and Odoo.sh


Contact Details

📬 Email wa.me/+91 82082 45035 /anmolpatil83 Explore Other Apps
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Inventory (stock)
• Invoicing (account)
• Sales (sale_management)
• Discuss (mail)
Lines of code 226
Technical Name cbm_converter
LicenseLGPL-3
Websitehttps://github.com/anmol6213

CBM Converter

Auto-convert CBM (cubic meter) quantity to Pieces for construction materials — directly inside Sale Orders, Invoices, Deliveries and Return Pickings, with no separate app or manual calculation required.

  • Features
  • Installation
  • Product Naming Convention
  • Fields Added
  • Changelog
  • Support

Features

Automatic Volume Detection

The product's dimensions are read straight from its name — e.g. a product named Tile 600x200x225 is parsed as 600 mm x 200 mm x 225 mm, and the per-piece volume (in m³) is derived from that automatically. No separate dimension fields need to be maintained.

CBM → Pieces

Whenever the CBM quantity changes, the Pieces field recomputes automatically:

Pieces = ceil(Quantity / Volume per piece)   if Quantity > 5
Pieces = round(Quantity / Volume per piece, 2)   otherwise

Ceiling rounding is used for larger quantities so that a partial piece is never under-counted.

Pieces → CBM

Pieces can also be edited directly (in the UI). When a user changes the Pieces value by hand, the quantity is recalculated the other way:

Quantity = Pieces x Volume per piece

This bidirectional flow works without creating an update loop — the module uses a context flag / value comparison to detect whether the change was triggered by quantity or by pieces before recomputing.

Works Across Documents

The Pcs column is available on:

Installation

Requirements

  • Odoo 19.0
  • Standard Odoo apps: account, sale_management, stock (installed automatically as dependencies)

Steps

  1. Copy the cbm_converter folder into your Odoo addons path.
  2. Restart the Odoo server (or update the apps list).
  3. In Odoo, go to Apps → search for CBM Converter → click Install.
  4. Open any Sale Order, Invoice, Delivery, or Return Picking — the Pcs column appears next to the Quantity column (toggle via the optional columns menu if hidden).

Product Naming Convention

For the volume to be detected, the product name must contain three dimension numbers (in millimetres), each greater than 50, in any order within the name — separated by x, spaces, or both. For example:

  • Tile 600x200x225
  • Block 400 x 200 x 100 Grey

If fewer than three valid dimensions are found, the volume is treated as zero and Pieces is left at 0.0 (no conversion is attempted).

Fields Added

Changelog

19.0.1.0.0

  • Initial release
  • Auto-calculates Pieces from CBM quantity on Sale Orders, Invoices and Deliveries
  • Support for Return Picking lines
  • Ceiling rounding for accurate piece counts on larger quantities
  • Bidirectional conversion: Pieces -> CBM and CBM -> Pieces
  • Floating point rounding fix on the CBM -> Pieces calculation

Support

  • GitHub: https://github.com/anmol6213
  • Contact: anmol621314@gmail.com

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with