OdooWiki OCA HUB

Account Global Discount

account_global_discount folder_open OCA/account-invoicing open_in_new
Accounting License: AGPL-3

Apply global discounts to invoices

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Apply global discounts to customer and vendor invoices and refunds in Odoo. Discounts are automatically added as separate lines, shown in the invoice totals and printed on the invoice PDF.

This module lets you apply one or more global discounts to invoices and refunds, both customer and vendor documents. Global discounts are defined in the Global Discounts menu under Invoicing, where each discount now also requires an expense/income account and can carry an analytic account.

On an invoice form, a Discounts field appears next to the payment terms. Discounts are suggested automatically from the customer's or vendor's configured global discounts, and you can add or remove them while the invoice is in draft. The module then creates detailed discount lines by tax group, showing the base before discount, the discount percentage, the discounted amount and the base after discount. These lines are visible in the Other Info tab.

New totals are added to the invoice: Untaxed Amount Before Disc. and Global Discounts, and the invoice PDF report shows a Subtotal w/o disc. line and a Global Discounts line with the applied percentages.

Business rules: with global discounts, every product line must have taxes, and incompatible tax combinations are rejected. Lines whose product is marked to bypass global discounts are ignored. Discount lines are recalculated whenever invoice lines or discounts change, and are cleaned up on refunds. The module also includes discount amounts in the invoice analysis report and applies multi-company rules to discount records.

Depends on

Required by other modules

Menus it adds

Global Discounts
Models and fields (4)
  • account.move · extends an existing modelglobal_discount_ids (Invoice Global Discounts), amount_global_discount (Total Global Discounts), invoice_global_discount_ids, global_discount_ids_readonly (Invoice Global Discounts (readonly)), amount_untaxed_before_global_discounts (Amount Untaxed Before Discounts)
  • global.discount · extends an existing modelaccount_id (Account), account_analytic_id (Analytic account)
  • account.move.line · extends an existing modelinvoice_global_discount_id (Invoice Global Discount), base_before_global_discounts (Amount Untaxed Before Discounts)
  • account.invoice.global.discount · new modelbase (Base before discount), name (Discount Name), tax_ids (Taxes), discount (Discount (number)), account_id (Account), company_id, invoice_id (Invoice), currency_id, base_discounted (Base after discount), discount_amount (Discounted Amount), discount_display (Discount), global_discount_id (Global Discount), account_analytic_id (Analytic account)

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 8 confirmed, 1 with no information of 9 versions.

Sources · Odoo 18.0

Confirmed on 2026-11-03 in branch 18.0 of OCA/account-invoicing.

terminal Installation and usage

OCA documentation · Odoo 19.0

To configure this module, you need to:

  • Go to Settings \> Parameters \> Global Discounts.
  • Add a new discount percentage.
  • Choose the discount scope (sales or purchases).
  • You can also restrict it to a certain company if needed.

You can assign global discounts to partners as well:

  • Go to a partner that is a company.
  • Go to the Sales & Purchases tab.
  • In section sale, you can set sale discounts.
  • In section purchase, you can set purchase discounts.

To use this module, you need to:

  • Go to Invoicing \> Customers \> Invoices.
  • Create a new sales invoice, choose a customer with a defined global discount and you will see how the value of the 'Invoice Global Discounts' field is auto-completed with the global discounts defined in the customer (See configuration section in this readme), although you can choose then other global discounts defined in configuration.
  • Add several invoice lines.
  • At the bottom of the form you will see how global discounts affect the total values.
  • Go to the 'Journal Items' tab (if you have permissions for that). There you will see how the tax lines have the discount percentage applied and you will also see the lines that reflect the global discount applied.
  • In the 'Other info' tab, you can see in the 'Global Discounts' table, the global discounts applied to each of the invoice lines.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.