I'd like to have a new recurrence pattern added in Odoo Events module.
I hope this can be included in a future update.
Below is how Deepseek would do it.
___________________________
In Odoo, creating an "every other" recurrence pattern (e.g., every other Tuesday) for events isn’t natively supported in the standard Events module. However, you can achieve this with custom development or workarounds. Here’s how:
1. Native Recurrence Limitations
Odoo’s built-in recurrence options (in Website > Events) only allow:
- Daily/Weekly/Monthly/Yearly intervals (e.g., "Every Tuesday").
- Fixed intervals (e.g., "Every 1 week"), but not "every 2 weeks" directly.
2. Workarounds to Create "Every Other" Events
Option 1: Manual Workaround (No Coding)
- Create the First Event:
- Go to Website > Events > Create and set the initial date (e.g., Tuesday, June 4).
- Duplicate and Adjust Dates:
- Click Duplicate, then manually change the date to 2 weeks later (e.g., Tuesday, June 18).
- Repeat for future dates.
Option 2: Custom Recurrence with Python (Developer Needed)
- Create a Custom Field:
- Add a field like recurrence_interval (e.g., 2 for "every 2 weeks") to the event.event model.
- Scheduled Action to Generate Events:
- Go to Settings > Technical > Automation > Scheduled Actions.
- Create a Python script to generate events every X weeks:
python
Copyfrom datetime import timedelta from odoo import models, fields class Event(models.Model): _inherit = 'event.event' def generate_recurring_events(self): events = self.search([('recurrence_interval', '>', 1)]) for event in events: next_date = fields.Datetime.to_datetime(event.date_begin) + timedelta(weeks=event.recurrence_interval) event.copy({'date_begin': next_date})
Option 3: Use External Calendar + Sync
- Google Calendar:
- Create a recurring event in Google Calendar (supports "every 2 weeks").
- Sync with Odoo via the Calendar module or API.
3. Example: "Every Other Tuesday" Setup
- Custom Field:
- Add recurrence_interval = fields.Integer(default=2) to the event.event model.
- Automated Logic:
- When an event is created with recurrence_interval=2, the scheduled action copies it every 2 weeks.
4. Alternative for Advanced Users
- Odoo Studio (Custom Edition):
- Use Studio to create a custom recurrence rule (limited flexibility).
- Third-Party Modules:
- Explore apps like "Advanced Event Recurrence" on the Odoo App Store (may require payment).
5. Key Considerations
- Native Support: Odoo’s default recurrence is simple (e.g., "every week"). Complex patterns require customization.
- Time Zones: Ensure dates are generated in the user’s timezone.
- Performance: For large-scale events, test automated scripts for efficiency.
Conclusion
To set up "every other [day/week/month]" in Odoo:
- Basic Needs: Manually duplicate events and adjust dates.
- Advanced Needs: Hire a developer to create a custom recurrence script or use external tools like Google Calendar.
If you need a no-code solution, explore Odoo Studio or third-party modules. For precise control, custom development is the best route.