Early payments discounts


Some companies may offer early payments discounts to it’s customers in order to be reduce the payment days.

On tryton we can have the two cases:

  • The company is offering a discount to it’s customer for early payment.
  • A supplier offers the company a discount for early payment.

For both cases we should be able to compute:

  • The amount to be paid with the discount (if still aplicable)
  • The day until the discount is applicable.

This information should be normally included on the invoice report.


Add a new module account_invoice_early_discount which will extend the payment term to include the following information:

  • The % of discount for early payment
  • The number of days until the discount is aplicable.
  • The write_off method to account the early discount.

On the invoice we will be show:

  • The early payment amount if applicable
  • The date until the discount applies

Once receiving a payment for the invoice, if the early discount is applicable the write_off method will be used to reconcile the discounted amount. This will generate the account move to record the discount amount as expense.


I would drop early and make it generic enough that it can work for other condition than time.

I think it should allow to have multiple discounts for a payment term. Like 3% in 7 days, 2% in 14 days etc.

I think we could have just a single global configuration for the write_off.

We should care of multiple term. The reconciliation should work for early payment of each term.

Please do not forget that the accounting moves may differ whether or not paid in advance with cash discount (escompte de règlement/skonto)… and, in France at least, usually differ as well according to the type of purchase! That is, most frequently cash discounts directly affect purchase price and are not registered via a separate account.

But also on the supplier line, the amount to pay should be computed by applying the discount.

I’m wondering if the module should be only depending on invoice. I think we should be able to make it work with only accounting (or with other document than invoice). I see it similar to account_payment.

Then probably to name it account_invoice_payment_discount as the discount is only related to payment but not to a comercial discount.


I initialy thought that probably we should add a list of discounts to be aplicable but I’ve just found this odoo video explaining payment terms and i’ve discovered they declare discounts as a special type of payment term line, which uses a percent of the total amount to be paid.

I think this is a good setup as it allows to reuse the relativedeltas for declaring the due date of the discount providing a more flexible desing and allows to reuse the date logic computation.


For me, the video is wrong about the behavior of Odoo. The payment term as defined does not create a discount for early payment but just two terms (as the Tryton payment term).

But anyway, I think it will be a bad idea to mix the payment term and the payment discount because it will prevent (or make it more complex) to define multiple discount base on different payment delay.

About the duplication of relativedelta, the current model could be improved to allow to be linked to different models (instead of just the payment term line). So we could reuse it for the payment discount.