Bỏ qua để đến Nội dung
Odoo Menu
  • Đăng nhập
  • Dùng thử miễn phí
  • Ứng dụng
    Tài chính
    • Kế toán
    • Hóa đơn
    • Chi phí
    • Bảng tính (BI)
    • Tài liệu
    • Ký tên
    Bán hàng
    • CRM
    • Bán hàng
    • POS Cửa hàng
    • POS Nhà hàng
    • Đăng ký
    • Cho thuê
    Trang web
    • Trình tạo trang web
    • Thương mại điện tử
    • Blog
    • Diễn đàn
    • Trò chuyện trực tiếp
    • Học trực tuyến
    Chuỗi cung ứng
    • Tồn kho
    • Sản xuất
    • PLM
    • Mua hàng
    • Bảo dưỡng
    • Chất lượng
    Nhân sự
    • Nhân viên
    • Tuyển dụng
    • Ngày nghỉ
    • Đánh giá
    • Giới thiệu
    • Đội xe
    Marketing
    • Marketing trên MXH
    • Marketing qua email
    • Marketing qua SMS
    • Sự kiện
    • Tự động hóa Marketing
    • Khảo sát
    Dịch vụ
    • Dự án
    • Bảng chấm công
    • Dịch vụ hiện trường
    • Hỗ trợ
    • Kế hoạch
    • Lịch hẹn
    Năng suất
    • Thảo luận
    • Phê duyệt
    • IoT
    • VoIP
    • Kiến thức
    • WhatsApp
    Ứng dụng của bên thứ ba Studio Odoo Nền tảng Đám mây Odoo
  • Ngành
    Bán lẻ
    • Nhà sách
    • Cửa hàng quần áo
    • Cửa hàng nội thất
    • Cửa hàng tạp hóa
    • Cửa hàng đồ kim khí
    • Cửa hàng đồ chơi
    Ẩm thực & Dịch vụ lưu trú
    • Bar và quán rượu
    • Nhà hàng
    • Đồ ăn nhanh
    • Guest house
    • Nhà phân phối đồ uống
    • Khách sạn
    Bất động sản
    • Công ty môi giới bất động sản
    • Công ty kiến trúc
    • Xây dựng
    • Quản lý bất động sản
    • Làm vườn
    • Hiệp hội chủ sở hữu bất động sản
    Tư vấn
    • Công ty kế toán
    • Đối tác Odoo
    • Công ty marketing
    • Công ty luật
    • Tuyển dụng
    • Thanh tra & chứng nhận
    Sản xuất
    • Dệt may
    • Kim loại
    • Nội thất
    • Ẩm thực
    • Nhà máy bia
    • Quà tặng doanh nghiệp
    Sức khoẻ & fitness
    • CLB thể thao
    • Cửa hàng kính mắt
    • Trung tâm fitness
    • Chuyên gia chăm sóc sức khỏe
    • Hiệu thuốc
    • Tiệm làm tóc
    Thương mại
    • Dịch vụ sửa chữa
    • Phần cứng CNTT & Hỗ trợ
    • Hệ thống năng lượng mặt trời
    • Công ty sản xuất giày
    • Dịch vụ vệ sinh
    • Dịch vụ HVAC
    Khác
    • Tổ chức phi lợi nhuận
    • Cơ quan môi trường
    • Cho thuê biển quảng cáo
    • Nhiếp ảnh
    • Cho thuê xe đạp
    • Đại lý phần mềm
    Xem tất cả ngành
  • Cộng đồng
    Học tập
    • Khóa học
    • Tài liệu
    • Chứng chỉ
    • Đào tạo
    • Blog
    • Podcast
    Thúc đẩy đào tạo
    • Chương trình đào tạo
    • Trò chơi kinh doanh Scale Up!
    • Tham quan Odoo
    Nhận phần mềm
    • Tải xuống
    • So sánh các phiên bản
    • Phiên bản
    Hợp tác
    • Github
    • Diễn đàn
    • Sự kiện
    • Dịch thuật
    • Trở thành đối tác
    • Dịch vụ dành cho Đối tác
    • Đăng ký công ty kế toán của bạn
    Nhận dịch vụ
    • Tìm đối tác
    • Tìm kế toán
    • Gặp chuyên gia hỗ trợ
    • Dịch vụ Triển khai
    • Khách hàng tham khảo
    • Hỗ trợ
    • Nâng cấp
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Nhận một buổi demo
  • Bảng giá
  • Trợ giúp

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

  • CRM
  • e-Commerce
  • Kế toán
  • Tồn kho
  • PoS
  • Dự án
  • MRP
All apps
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Hỗ trợ

Sales: How to compute a final price based on a desired margin?

Đăng ký nhận tin

Nhận thông báo khi có hoạt động trên bài viết này

Câu hỏi này đã bị gắn cờ
salespricelistQuickstart
4 Trả lời
10074 Lượt xem
Ảnh đại diện
Marco Alejandro Morales Sosa (mams)

Currently Odoo has an Advanced Pricelists feature for sale pricing computation based on "many factors" such as discounts, currency, etc; BUT ... what happens if we want to compute a pricelist based on profit?

3
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Marco Alejandro Morales Sosa (mams)
Tác giả Câu trả lời hay nhất

First of all, we want to our pricelists configuration to be in "advanced" and not simple. Simple pricelists are pretty lame.

Once this feature is activated, we go to Products - Pricelists and create a new one.

In here, we will click on "add a line" and we'll see the following pop up:

Since we want our price to be computed on a desired margin from a product cost, we'll select: Formula +  Based on: Cost + Discount: -30% (it is negative since we actually want this "discount" to be added as the desired margin)

Fianlly, we leave all the other configurations the same (unless we want to add fixed fees or want to apply it for specific products ...), we save, we close and we are ready to go! :)


Until ...


We notice this configuration doesn't give you the 30% margin ...

Whyyyyyy? Does Odoo still have a lot of bugs? Am I stupid and didn't configure the product cost right? Am I not enough as a person?

Maybe it's all three ... But today I'll show you why this configuration was not correct (and how to do it right)


This logic of adding the -30% discount is partially correct. The system in fact will add this 30% percent and give a final price of the product cost +30% ... BUT ... margins are actually computed backwards: We have a final price and reducing 30% should give us the product cost. 

For example: If my cost is 100$, the 30% of this cost is 30$. If I add up the 30$ for a final product price of 130$, and try to compute the 30% margin, the result would be 39$ not 30$ as we previously calculated. 

The margin is computed based on final product price, not product cost, therefore adding the 30% of our cost result on a miscalculation related to what we are actually looking for. So .. how do we get the 30% margin computation if I don't have a final product price to calculate it from? ... in fact, this is what we are actually looking for: A final product price.

Well, we'll use Algebra.

Statement: 70% is to 100% what 100% is to x. Explained with apples: We know 70$ are the 70% of 100$, so ... from which price could 100$ be the 70% of?


if we solve for x, we get the following statement


What does this mean? It means that if we have a "100%" of a cost that we want it to represent a 70% of a 100% of a final product price ... then we should add 42.8571% ((142.8571-100)/100) to reach this 100%. So, if my product price is 100$ and I add 42.85%, my final product price will be 142.85$ 

If I get the 30% from 142.85, this will be 42.85$, which is what we actually computed from our original 100$

Kind of confusing ... but let's put it into practice.

Well ... it seems like IT WORKED. 


In this example I used 100$ as the cost to better explain all this logic, but if you change the product cost and leave this percentage it will always work (for a 30% margin). 


Hope this works for you and don't hesitate to send me a message in case of questions :)




5
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Paul Conroy
Câu trả lời hay nhất

You could try this formula

Price = cost/(1-margin% as a decimal)

So if you want to make 20% margin on a product that costs $100

Price = $100/(1-.2)

Price = $1000/.8

Price = $125

1
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Elimane NDOYE
Câu trả lời hay nhất

In Odoo, the Advanced Pricelists feature allows for complex pricing rules based on various conditions such as customer groups, quantities, discounts, currencies, etc. However, computing a price based on the profit margin is not a standard built-in feature of Odoo’s pricelist functionality, at least not directly.

That said, there are ways you can implement this kind of pricing logic, and they depend on how you want to define and calculate profit. Typically, the goal is to set a price that ensures a certain profit margin over the cost price of the product. Here are a few options for achieving this in Odoo:

1. Custom Pricelist Computation with Profit Margin

You could create a custom Pricelist Computationformula that calculates the price based on the cost price and desired profit margin. 

To implement this:

   - Cost Price: This is the price at which you acquire or produce the product (or it  be the "standard cost" of the product in Odoo).

   - Profit Margin: This is a percentage you would like to apply over the cost price to determine the sale price.

   You would need to create a custom Python function in Odoo that calculates the sale price by applying the profit margin over the cost price. For example, if your cost price is `$50` and you want a 20% profit margin, the formula would be:

This formula can be integrated into a custom pricelist computation logic.

   To do this in Odoo:

   - Go to the Sales > Products > Pricelists menu.

   - Create a new pricelist or modify an existing one.

   - In the Pricelist Computation field, select Python and add the necessary Python code that computes the price based on the cost and desired profit margin.

2. Custom Product Cost and Markup Fields

If you prefer a more user-friendly approach without custom Python code, you could:

   - Add a custom field for the Desired Profit Margin in the product form (e.g., a field where the user specifies the markup percentage).

   - Use the Product Cost field (or Standard Price) as the base cost.

   - Then, you could create an automated action, a scheduled task, or a custom module that updates the Sale Price based on these inputs. For instance, a simple calculation could be done automatically whenever the cost or markup is updated.

3. Odoo Studio Customization (No Coding)

If you're using Odoo Studio, you can create custom fields for the markup and profit margin, then use Automated Actions or Server Actions to recalculate the sale price whenever relevant fields are updated.

For example:

   - Create a custom field for Desired Profit Margin on the product.

   - Create an automated action to trigger whenever the Cost or Desired Profit Margin changes.

   - The action would calculate the new sale price based on the formula and update the Sale Price.

4. Third-Party Modules

If you don't want to implement this yourself, there might be third-party Odoo apps in the Odoo App Store that offer more advanced pricelist management, including pricing based on profit margins. You can search for Profit Margin Pricing or Advanced Pricelist modules.

Example Custom Code (Python) for Pricelist Computation:

If you're comfortable with coding, here’s an example of what custom Python code might look like for computing the sale price based on profit margin:

# This Python code could be used for pricelist computation
# Assuming 'product' is the product record, 'profit_margin' is the desired margin (as a percentage)
cost_price = product.standard_price  # Get the cost price of the product
profit_margin = 20  # Example: 20% profit margin
sale_price = cost_price * (1 + profit_margin / 100)  # Apply the margin to the cost price
return sale_price  # Return the computed sale price


This custom function could be linked to the Pricelist Rule to adjust the sale price dynamically.

Conclusion:

While Odoo’s standard pricelist features don’t directly support profit-based pricing out of the box, you can achieve this through customization—either via custom Python code, fields for profit margin, or using Odoo Studio to automate the calculation. If you're familiar with Python and the Odoo development environment, custom code gives you the most flexibility. Alternatively, third-party modules might simplify this process if you prefer a plug-and-play solution.

0
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Juan Castro
Câu trả lời hay nhất

Hola Marco, 

Tu ejemplo me ayudó a solucionar una lista de precios. 

Sin embargo, quería consultar contigo si ¿es posible utilizar operadores ternarios para calcular un precio?

Como ejemplo, evaluar el "precio base" y si cumple alguna de las condiciones, calcular un nuevo precio ya sea con una tarifa adicional o con un descuento. 

Un ejemplo sería el siguiente: 

result = PRECIO

if PRECIO > 3540 / 1.16:

    result = PRECIO - 300 / 1.16

elif PRECIO > 2299 / 1.16:

    result = PRECIO - 200 / 1.16

elif PRECIO > 1649 / 1.16:

    result = PRECIO - 100 / 1.16


¿lo puedo lograr en Odoo V17?

0
Ảnh đại diện
Huỷ bỏ
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!

Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!

Đăng ký
Bài viết liên quan Trả lời Lượt xem Hoạt động
¿How can i sell courtains by measure?
sales pricelist
Ảnh đại diện
0
thg 7 20
2776
View all products in a pricelist in Odoo sales module
sales pricelist
Ảnh đại diện
0
thg 9 19
3877
How to do pricelist per line? Đã xử lý
pricelist quickstart Quickstart
Ảnh đại diện
1
thg 3 25
1679
Pricelist rule on product category Đã xử lý
sales categories pricelist
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
3
thg 3 25
1672
Odoo 17.4 - Pricelist - Discount Visibility?? Đã xử lý
sales pricelist sales_price
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
2
thg 12 24
525
Cộng đồng
  • Khóa học
  • Tài liệu
  • Diễn đàn
Open source
  • Tải xuống
  • Github
  • Runbot
  • Dịch thuật
Dịch vụ
  • Lưu trữ Odoo.sh
  • Hỗ trợ
  • Nâng cấp
  • Phát triển tùy chỉnh
  • Đào tạo
  • Tìm kế toán
  • Tìm đối tác
  • Trở thành đối tác
Giới thiệu công ty
  • Công ty của chúng tôi
  • Tài sản thương hiệu
  • Liên hệ
  • Việc làm
  • Sự kiện
  • Podcast
  • Blog
  • Khách hàng
  • Pháp lý • Riêng tư
  • Bảo mật
الْعَرَبيّة 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 là bộ ứng dụng kinh doanh có open source đáp ứng tất cả các nhu cầu của công ty bạn: CRM, thương mại điện tử, kế toán, tồn kho, POS, quản lý dự án, v.v.

Định hướng giá trị riêng biệt của Odoo là tích hợp hoàn toàn và dễ dàng sử dụng.

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