Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Artificial Intelligence
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Property Management
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Sale price computed based on BOM

Subscriure's

Get notified when there's activity on this post

This question has been flagged
salesmanufacturing
1 Respondre
1400 Vistes
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
Descartar
Avatar
Ysaline Van Wallendael
Autor 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
Descartar
Enjoying the discussion? Don't just read, join in!

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

Registrar-se
Related Posts Respostes Vistes Activitat
Air France Téléphone France
sales manufacturing
Avatar
0
d’abr. 26
33
How get a report about the Consumption of raw materials to delivery orders per month?
sales manufacturing
Avatar
Avatar
1
de juny 23
5651
How to group and filter order lines for manufacturing order?
sales manufacturing
Avatar
0
de gen. 23
4303
How to do sale of per-customer custom-product that spawns manufacturing order. Solved
sales manufacturing
Avatar
Avatar
1
de juny 22
5006
BOM configuration with Variants "AND" connections
sales manufacturing bom
Avatar
Avatar
Avatar
2
de juny 26
426
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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