I work primarly with subscription services. Currently, Odoo doesn't natively support the extension of the subscription end dates to account for holidays (public holidays or business closure).
I think a lot of users relying on subscription services would also need this feature.
I've looked up in the app store but not sure if there are apps that can do that.
Any advice on that question?
For reference, here's what Deepseek say:
________________________
To extend subscription end dates in Odoo to account for holidays (e.g., business closures), you’ll need to customize the subscription logic. Here are the best approaches:
1. Native Odoo Solution (Limited)
Odoo’s Subscription module doesn’t natively support holiday-based extensions, but you can manually adjust dates:
- Go to Sales > Subscriptions.
- Open the subscription and edit the End Date field.
- Add the number of holiday days to the original end date (e.g., extend by 7 days for a week-long closure).
Limitation: Manual and time-consuming for large customer bases.
2. Automated Solution (Custom Development)
Step 1: Create a Holiday Calendar
- Go to Settings > Technical > Calendar > Calendars and create a "Business Holidays" calendar.
- Add holidays as events (e.g., "Annual Closure: Dec 25–Jan 1").
Step 2: Override Subscription Renewal Logic
Use a custom Python method to skip holidays when calculating end dates:
python
Copy
from datetime import timedelta from odoo import fields, models class Subscription(models.Model): _inherit = 'sale.subscription' def _compute_end_date(self): for sub in self: end_date = sub.start_date + timedelta(days=sub.template_id.duration) # Skip holidays holidays = self.env['calendar.event'].search([ ('start_date', '<=', end_date), ('stop_date', '>=', end_date), ('holiday_calendar_id', '=', sub.company_id.holiday_calendar_id.id) ]) if holidays: end_date += timedelta(days=len(holidays)) # Extend by holiday duration sub.end_date = end_date
Step 3: Link Holidays to Subscriptions
- Add a field to link subscriptions to your holiday calendar:
python
Copyholiday_calendar_id = fields.Many2one('calendar.calendar', string="Holiday Calendar")
3. Alternative: Use "Pause Subscription" Functionality
- Manually pause subscriptions during holidays:
- Go to Subscriptions, select records, and click "Pause".
- Resubscriptions will auto-extend by the paused duration.
- Automate pausing with a scheduled action triggered by holidays.
4. Third-Party Apps
- Explore Odoo apps like "Subscription Extensions" or "Advanced Subscriptions" (check the Odoo App Store).
- Look for features like:
- "Skip holidays in billing cycles".
- "Auto-adjust end dates".
Key Considerations
- Prorated Billing: If extending subscriptions, decide whether to charge customers for the extra days.
- Notifications: Send emails to inform customers of adjusted dates.
- Testing: Dry-run with a test subscription before deploying.
Why This Works
- Holiday Awareness: Subscriptions now account for business closures.
- Scalability: Automated for large customer bases.
For a no-code fix, use manual date edits or pause subscriptions. For automation, custom development is required (cost: ~€200–€500 via freelancer).