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
    • Artificial Intelligence
    • 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
    • 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
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

Sale price computed based on BOM

Subscribe

Get notified when there's activity on this post

This question has been flagged
salesmanufacturing
1 Reply
1388 Views
Avatar
Ysaline Van Wallendael
In Odoo, I can already recompute the cost of a manufactured product using the standard server action (action_bom_cost).
I would like to achieve a similar behavior, but instead of recomputing the cost, I want to recompute the sale price of the finished product.
The idea is:
  • each component in the BOM already has its own sale price (margin included)
  • the sale price of the finished product should be the sum of the sale prices of the BOM components, multiplied by their quantities
Is there an existing method or best practice in Odoo to do this (server action, override, computed field), similar to action_bom_cost?
Any guidance would be greatly appreciated.
0
Avatar
Discard
Avatar
Ysaline Van Wallendael
Author Best Answer

I finally found a solution that works well without custom development, using Odoo Studio + Automations.

Context

The goal was to compute the sale price of a manufactured product based on the sale prices of its BOM components (margin already included at component level), similar to what action_bom_cost does for costs.

Add a sale price column on the BOM lines

First, I added a sale price column on the BOM lines (coming from the component product).

⚠️ Important point:

All BOM quantities must use the same Unit of Measure as the product sale UoM.

Odoo Studio does not handle UoM conversions automatically.

Example:

  • Product sold in hours

  • BOM needs 15 minutes → use 0.25 hours in the BOM

Create a computed Studio field on the BOM

I created a Studio computed field on the BOM (e.g. x_studio_prix_de_vente_calcule) with this Python code:

for record in self:

total = 0.0


for line in record.bom_line_ids:

unit_price = line.product_id.list_price or 0.0

qty = line.product_qty or 0.0

total += unit_price * qty


record['x_studio_prix_de_vente_calcule'] = total

Dependencies used:

bom_line_ids

This ensures the value is recalculated whenever BOM lines are modified.

Use an Automation to update the product sale price

Then, I used an Automated Action on the product to compute the final sale price from the BOM(s):

sum(

line['x_studio_prix_de_vente_calcule']

for line in record.bom_ids

)

This value is then written into the product’s sale price field.

Result

  • Sale price of the finished product = sum of sale prices of BOM components

  • No margin recalculation at product level

  • Fully compatible with Odoo Studio

  • No custom module required

  • Works reliably as long as UoMs are consistent

Notes

This approach is intentionally simple and avoids deep dependency chains (bom_line_ids.product_id.list_price) that are not supported in Studio.

For more advanced scenarios (multi-BOM logic, automatic UoM conversion, complex pricing rules), a custom module would be required.

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
Air France Téléphone France
sales manufacturing
Avatar
0
Apr 26
33
How get a report about the Consumption of raw materials to delivery orders per month?
sales manufacturing
Avatar
Avatar
1
Jun 23
5648
How to group and filter order lines for manufacturing order?
sales manufacturing
Avatar
0
Jan 23
4299
How to do sale of per-customer custom-product that spawns manufacturing order. Solved
sales manufacturing
Avatar
Avatar
1
Jun 22
5000
BOM configuration with Variants "AND" connections
sales manufacturing bom
Avatar
Avatar
Avatar
2
Jun 26
420
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 Svenska ภาษาไทย 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