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
    • Estate 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
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Product weight calculation based on BoM

Subscribe

Get notified when there's activity on this post

This question has been flagged
inventorydeliveryweightcalculationdeliveryslipBoMKeepItSimpleproduct_weight
5 Replies
10512 Views
Avatar
Ricardo Gross

Manufacturing and delivery weights:

In the Manufacturing app, I would like to know how to auto calculate the weights?

If my product C weight = A + B weights, why are the weights not calculated and printed in the delivery slip (A weight+ B weight = C weight) ?

Thanks

Ricardo

2
Avatar
Discard
Ricardo Gross
Author

4 years later and I am faced with the same question, maybe it is badly elaborated:
So let's go:
in a product with a BOM and a manufacturing route, can I not obtain the weight and, why not, also the volume automatically?
product C Weight = component A + component B weight
is it so hard to automatically calculate and provide this information in an integrated system?

Avatar
vishalratani
Best Answer

There is no law of conservation of mass in Odoo manufacturing :) 

If your UoM of every product is Kg here then you take care of it while creating products/ BoM. But if you are working through different units and still want to act on "law of conservation of weight" you've got to figure out a customized solution or consult an expert.

Thanks

Vishal

1
Avatar
Discard
Ricardo Gross
Author

Thanks, but why the system does not sum all the BOM products weights automatically?

Avatar
OdooThinking
Best Answer

A simple solution to this question could be the creation of the following server action (image from Odoo version 18):

hope it helps!

code:

for product in records:
    bom = product.bom_ids and product.bom_ids[0] or False
    if not bom:
        continue
    bom_lines = bom.bom_line_ids
    if not bom_lines:
        continue
    total_weight = 0.0
    for line in bom_lines:
        component = line.product_id
        quantity = line.product_qty  # Quantity in units
        component_weight = component.weight or 0.0  # Weight in kg
        weight_contribution = component_weight * quantity
        total_weight += weight_contribution
    product.write({'weight': total_weight})
   
1
Avatar
Discard
Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

Hi,

You can check this community module : https://www.odoo.com/apps/modules/10.0/product_weight/

This will help you to get the weight of a product as the sum of its component products. Have a look at the module.


Then regarding the weight in delivery slip you can inherit the report template and access the weight of the product from the product master and add to it.


Thanks

1
Avatar
Discard
Avatar
Ettore Alberto Pietro Lampertico
Best Answer

I have slightly improved the code by inserting UOM conversion


for product in records:

    bom = product.bom_ids and product.bom_ids[0] or False

    if not bom:

        continue

    bom_lines = bom.bom_line_ids

    if not bom_lines:

        continue

    total_weight = 0.0

    for line in bom_lines:

        component = line.product_id

        component_uom=component.uom_id.relative_factor

        quantity = line.product_qty  # Quantity in units

        line_uom = line.product_uom_id.relative_factor

        component_weight = component.weight or 0.0  # Weight in kg

        weight_contribution = line_uom/component_uom * component_weight * quantity

        total_weight += weight_contribution

    product.write({'weight': total_weight})


0
Avatar
Discard
Avatar
Ricardo Gross
Author Best Answer

Thanks for the reply, but I still have not found a solution for Odoo 11

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Weight and volume in the Transfers
inventory delivery volume v15 KeepItSimple
Avatar
Avatar
1
Aug 22
3716
Inventory management v12 delivering another warehouse Solved
inventory delivery
Avatar
Avatar
Avatar
2
May 19
3691
1 product which comes in multiple boxes
orders inventory delivery
Avatar
Avatar
1
Mar 23
2622
Quantity done not working properly?
models inventory weight
Avatar
0
Apr 21
2844
Sales > Warehouse pickup
sales inventory delivery
Avatar
Avatar
1
Jul 19
3596
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
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

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

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now