Contract Auto-Billing
Turn signed contracts and milestones into scheduled invoices automatically
Recurring and milestone billing usually depends on someone remembering to raise invoices by hand, and missed billing days leak revenue and delay cash collection. Subscription businesses, consultancies and services firms with running contracts feel this every cycle. This module converts signed contracts into a billing schedule on gb.contract, supporting recurring, one-off and milestone lines, automatic renewal of expiring contracts, and a daily cron that generates and optionally posts due invoices. It adds the billing-automation layer that contract lifecycle modules leave out.
Key Features
Recurring Billing Schedule
The gb.contract model carries a billing_frequency of weekly, monthly, quarterly or yearly and a next_invoice_date that rolls forward by the matching relativedelta after every invoice. Each due date inside the window produces a real out_invoice on account.move, so recurring revenue bills itself.
Recurring, One-Off & Milestone Lines
gb.contract.line supports recurring and one-off types, while gb.contract.milestone handles stage-based billing. Recurring lines repeat on schedule, one-off lines bill once and flag themselves invoiced, and milestones bill only when complete, covering every contract billing pattern in one record.
Milestone-Gated Invoicing
A milestone bills only after action_mark_done sets its state to done and stamps a completion_date. _create_milestone_invoice then raises and links a customer invoice, moving the milestone to invoiced. This ties payment to delivered work for project and stage-based contracts.
Daily Auto-Billing Cron
An ir.cron runs cron_generate_invoices each day, calling generate_due_invoices on every running contract. It raises every recurring, one-off and completed-milestone invoice that is due, with no one needing to remember billing day.
Automatic Renewal & Expiry
When a contract passes its date_end, _maybe_expire_or_renew either extends date_end by renewal_months for auto_renew contracts and posts a chatter note, or moves the contract to the expired state. Ongoing agreements keep billing without manual re-creation.
Optional Auto-Posting
The auto_post_invoices flag decides whether generated moves are left as drafts for review or posted immediately via action_post. Teams that want a control gate keep drafts; teams that trust the schedule post straight through, all from one checkbox.
Ad-Hoc Generation Wizard
The gb.contract.invoice.wizard raises invoices for selected or all running contracts up to a chosen up_to_date, raising an error if nothing is due. It is ideal for catch-up runs or invoicing ahead of the next scheduled cron pass.
Revenue Projections
Helper methods compute projected_annual_value (ARR-style), remaining_recurring_invoices and projected_remaining_value across recurring lines, open one-offs and milestones. The get_billing_dashboard summary gives finance forward visibility on contract value still to bill.
Use Cases
Screenshots
Contracts
Generate Invoices
Milestones
Why Choose This Module
Milestone and recurring billing usually means someone remembering to raise invoices by hand. This module converts signed contracts into a billing schedule and lets Odoo raise the invoices for you: recurring, one-off and milestone-based lines, automatic renewal of expiring contracts, and a daily cron that generates and posts due invoices. It adds the billing-automation layer that contract lifecycle modules leave out.
Specifications
- Compatible: Odoo 18.0 / 19.0
- License: OPL-1
- Languages: English
- Author: Pokutsoft
- Dependencies: account
- Support: support@pokutsoft.com
Update date: 2026-07-02