Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Intelligence artificielle
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Supermarché
    • Quincaillerie
    • Magasin de jouets
    Restauration & Hôtellerie
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Homme à tout faire
    • Matériel informatique & support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Parcourir toutes les industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenir partenaire
    • Services pour partenaires
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Sale price computed based on BOM

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
salesmanufacturing
1 Répondre
1396 Vues
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
Ignorer
Avatar
Ysaline Van Wallendael
Auteur Meilleure réponse

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
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Air France Téléphone France
sales manufacturing
Avatar
0
avr. 26
33
How get a report about the Consumption of raw materials to delivery orders per month?
sales manufacturing
Avatar
Avatar
1
juin 23
5648
How to group and filter order lines for manufacturing order?
sales manufacturing
Avatar
0
janv. 23
4300
How to do sale of per-customer custom-product that spawns manufacturing order. Résolu
sales manufacturing
Avatar
Avatar
1
juin 22
5004
BOM configuration with Variants "AND" connections
sales manufacturing bom
Avatar
Avatar
Avatar
2
juin 26
424
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenir partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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