Skip to Content

Customer's Average Days to Pay

This feature calculates the average days a customer takes to pay their invoices.
October 10, 2025 by
Customer's Average Days to Pay
Silverdale Technology, Somroo Hassaan
| No comments yet

In standard Odoo, while users can track individual invoice due dates and payment statuses, there is no built-in metric that summarizes a customer’s overall payment behavior. Businesses often need to understand how quickly customers pay their invoices to manage credit policies, identify potential delays, and evaluate financial reliability.

This SME feature fills that gap by introducing a computed field on the customer record (res.partner) that automatically calculates the average payment duration across all fully paid customer invoices.

The system determines this metric using the difference between:

  • Invoice Date – the date when the invoice was issued
  • Payment Completion Date – the date when the last payment fully settled the invoice

The feature then averages these values across all applicable invoices for each customer.

Key Functionalities

  • Automatic Calculation:
    Calculates the average number of days between invoice creation and full payment for each customer.
  • Scope:
    Only includes fully paid invoices to ensure accuracy.
  • Display:
    Adds a read-only field labeled “Average Days to Pay” on the Customer Form View under the Accounting section.
  • Dynamic Update:
    Automatically updates when new invoices are paid or existing payments are reconciled.
  • Exclusions:
    Draft, canceled, or partially paid invoices are ignored to maintain data reliability.

Technical Details

  • Model: res.partner
  • Field Type: Computed Float Field (Read-only)
  • Computation Logic:

    avg_days_to_pay = sum((payment_date - invoice_date).days) / number_of_invoices

  • Dependencies:
    Depends on the account.move model (filtered by move_type='out_invoice' and payment_state='paid').

Benefits

  • Improved Cash Flow Management – Enables finance teams to anticipate incoming cash and plan accordingly.
  • Better Credit Control – Helps identify customers who consistently pay late, supporting data-driven credit decisions.
  • Enhanced Customer Insights – Provides a quick reference to assess payment discipline directly from the customer form.
  • Automation and Accuracy – Eliminates manual calculations, ensuring real-time and error-free results.

Example Use Case

A company wants to evaluate the payment reliability of its top customers before renewing annual contracts. By viewing the Average Days to Pay field on each customer record, the finance team can immediately identify which clients pay promptly and which require stricter payment terms or reminders.

For example:

  • Customer A: 5.4 days (Highly reliable)
  • Customer B: 28.7 days (Consistently late payer)

Conclusion

The Customer's Average Days to Pay feature transforms raw payment data into actionable insights. By calculating and displaying average payment timelines for each customer, it strengthens financial analysis, streamlines decision-making, and enhances customer relationship management — all while seamlessly integrating with Odoo’s existing accounting workflows.

Share this post
Sign in to leave a comment