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
    • 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
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Sales
  3. Target Discount Configuration v 18.0
  4. Sales Conditions FAQ

Target Discount Configuration

by NexOrioins Techsphere http://nexorionis.odoo.com
Odoo
v 18.0 Third Party 10
Download for v 18.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Sales (sale_management)
• Discuss (mail)
Lines of code 390
Technical Name noi_target_discount
LicenseLGPL-3
Websitehttp://nexorionis.odoo.com
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Sales (sale_management)
• Discuss (mail)
Lines of code 390
Technical Name noi_target_discount
LicenseLGPL-3
Websitehttp://nexorionis.odoo.com

🎯 Target Discount Configuration

Global discount based on customer historical invoice totals

📋 Overview

The Target Discount Configuration module allows you to automatically apply discounts to sales orders based on customer's historical posted invoice totals within a specified period (yearly or monthly).

📊 Historical Analysis

Automatically calculates customer's total invoiced amount for the configured period.

💰 Slab-based Discounts

Configure multiple discount slabs based on invoice amount thresholds.

📅 Flexible Periods

Support for yearly and monthly period configurations.

📑 Proper Accounting

Discount flows to invoice with dedicated discount account.

🔄 Process Flow

1
Configure
Discount Slabs
→
2
Create
Sale Order
→
3
Select
Customer
→
4
View Historical
& Discount %
→
5
Apply
Discount

Detailed Flow Steps

  1. Configure Discount Slabs: Set up target discount configuration with period type, year/month, and discount slabs.
  2. Create Sale Order: Create a new quotation/sales order.
  3. Select Customer: When you select a customer, the system automatically calculates their historical invoice total.
  4. View Information: The system displays:
    • Historical Invoice Total
    • Target Discount Percentage (based on slab)
    • Target Discount Amount (calculated when applying)
  5. Apply Discount: Click "Apply Target Discount" to add the discount line to the order.

⚙️ Configuration Guide

Step 1: Create Target Discount Product

The module automatically creates a "Target Discount" product. If needed, you can manually create one:

  1. Go to Sales → Products → Products
  2. Create a new product with:
    • Name: "Target Discount"
    • Type: Service
    • Check "Is Target Discount Product" in the Sales tab
    • Remove all taxes (Customer Taxes should be empty)
⚠️ Important: Only one product should have "Is Target Discount Product" checked. The discount product must have no taxes.

Step 2: Create Discount Configuration

  1. Go to Sales → Configuration → Target Discount Configuration
  2. Click Create
  3. Fill in the configuration:
    Field Description
    Name Descriptive name for this configuration
    Period Type Select "Yearly" or "Monthly"
    Year The year for calculating historical invoices
    Month Required if Period Type is "Monthly"
    Discount Account Contra-revenue account for discount journal entries
    Active Only one configuration can be active per company

Step 3: Configure Discount Slabs

Add discount slabs to define discount percentages based on historical invoice amounts:

Minimum Amount Discount (%) Description
0 0% No discount for amounts below first threshold
100,000 2% 2% discount for totals ≥ 100,000
500,000 5% 5% discount for totals ≥ 500,000
1,000,000 10% 10% discount for totals ≥ 1,000,000
📝 Note: The system applies the highest applicable slab. For example, if a customer has 750,000 in historical invoices, they receive the 5% discount (not 2%).

📖 Usage Guide

Creating a Sale Order with Target Discount

  1. Go to Sales → Orders → Quotations
  2. Click Create
  3. Select a Customer
    • The system automatically calculates and displays:
      • Historical Invoice Total: Sum of posted invoices for the configured period
      • Target Discount (%): Discount percentage based on slabs
  4. Add Order Lines (products/services)
  5. Review the Target Discount Information section (below Terms & Conditions)
  6. Click "Apply Target Discount" button
    • This calculates the discount amount based on order subtotal
    • Adds a discount line with negative amount to the order
  7. Confirm the order and create invoice as usual
💡 Tip: The discount is calculated on the subtotal of product lines only (excluding any existing discount lines).

Removing Target Discount

  1. On the sale order, find the Target Discount Information section
  2. Click "Remove Target Discount" button
  3. The discount line will be removed from the order

📊 Accounting Flow

Invoice Journal Entry

When the sale order with target discount is invoiced, the journal entry includes:

Account Debit Credit
Accounts Receivable Net Amount -
Sales Revenue - Gross Amount
Discount Account (Contra-Revenue) Discount Amount -
Tax Payable (if applicable) - Tax Amount
📝 Note: The discount product uses the Discount Account configured in the Target Discount Configuration, overriding the default income account.

❓ Frequently Asked Questions

Q: Why is the Historical Invoice Total showing 0?

A: This can happen if:

  • The customer has no posted invoices in the configured period
  • The order date doesn't match the configuration period (year/month)
  • No active discount configuration exists for the company

Q: Why can't I see the Apply Target Discount button?

A: The button is hidden when:

  • Target Discount Percentage is 0%
  • A discount line has already been applied
  • The order is not in Draft or Sent state

Q: Can I have multiple active configurations?

A: No, only one Target Discount Configuration can be active per company at a time.

Q: Does the discount include taxes?

A: No, the Target Discount product should have no taxes. The discount is applied before tax calculation on other line items.

Q: How are refunds handled?

A: Credit notes (refunds) are included in the historical invoice total calculation using amount_total_signed, which is negative for refunds.

🔧 Technical Information

Models

Model Description
target.discount.config Configuration for target discount periods and settings
target.discount.slab Discount slabs with minimum amounts and percentages
sale.order Extended with target discount fields and methods
sale.order.line Extended with is_target_discount_line flag
product.template Extended with is_target_discount boolean

Key Fields on Sale Order

Field Type Description
historical_invoice_total Monetary Sum of posted invoices for customer in period
target_discount_percentage Float Discount percentage based on slab
target_discount_amount Monetary Calculated discount amount
has_target_discount Boolean Computed: True if discount line exists

Dependencies

  • sale_management - Sales Management
  • account - Invoicing

🏷️ Author & Support

Author: NexOrioins Techsphere
Maintainer: Rowan Ember
Website: nexorionis.odoo.com
Email: nexorionis.info@gmail.com

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
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

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