[19.0][IMP] subscription_oca: compute MRR and ARR#1451
Conversation
29a291c to
e701e06
Compare
szalatyzuzanna
left a comment
There was a problem hiding this comment.
I have a question regarding the scope of this feature. Since MRR/ARR are reporting-oriented KPIs rather than core subscription functionality, was a separate extension module considered instead of adding them directly to subscription_oca?
|
Thanks for raising the scope question. I considered a separate extension module, but I kept MRR/ARR in
If anyone feels strongly that the KPI should not be forced on everyone, I can gate the display (stat buttons / list columns) behind a group or a setting rather than splitting the module — but the compute itself stays on the model. Happy to go either way; my recommendation is to keep it as is. |
e701e06 to
9010bd4
Compare
Add two stored computed monetary fields on `sale.subscription`: * `recurring_monthly` — sum of the subscription lines normalised to a monthly amount (Monthly Recurring Revenue). * `recurring_yearly` — twelve times the monthly figure (Annual Recurring Revenue). Each line also exposes its own `recurring_monthly`, derived from `price_subtotal` and the template recurrence. A line that bills every N `days`, `weeks`, `months` or `years` is converted to months using 30.4375 average days per month for sub-monthly cadences and a direct multiplier otherwise, then divided by the `recurring_interval`. This makes subscriptions of different cadences directly comparable and sum-able, so reports can answer the basic "how much do I bill per month?" question without external spreadsheets. The fields are visible as a new MRR/ARR stat button on the subscription form, as optional columns with sum aggregation on the list view, and as a "With recurring revenue" filter on the search view. Migration: pure ORM recompute on `-u subscription_oca`. Expect roughly two seconds per ten thousand subscription lines.
9010bd4 to
fe91224
Compare
Adds MRR/ARR to subscriptions:
recurring_monthlyon each subscription line:price_subtotalnormalised to a monthly amount from the template recurrence (30.4375 days/month average for daily/weekly cadences), converted to the company currency so subscriptions in different currencies can be compared and summed.recurring_monthly/recurring_yearlyon the subscription: sum of the lines, ARR being 12 x MRR.They are shown as a stat button on the form, optional sum columns on the list view and a "With recurring revenue" search filter.
Supersedes #1443.