diff options
| author | Nasreddin (bon) <bon@odoo.com> | 2021-02-16 12:47:21 +0000 |
|---|---|---|
| committer | Nasreddin (bon) <bon@odoo.com> | 2021-02-16 14:24:44 +0000 |
| commit | 5e85ee521edb70d4d2c7cdbf59c29794a8cd98b9 (patch) | |
| tree | 6596a662029f4d96c3cb2b8fca1eaae08fd827de /addons/web/static/tests | |
| parent | 261bf437e806fbf105597b66464c3a697e17e4d1 (diff) | |
[FIX] calendar: Add start week day to weekly recurrence rrule generator + unit test
Issue
- Install 'Calendar' module
- Create new event from Calendar view
- Edit event
- Set True to 'Recurrent' in options tab
- Repeat every 2 weeks
- Until : Number of repetitions 2
- Save and go back to calendar view
- Events are shifted (+ 1 week)
Cause
The rrule.rrule (who create the generator with the recurrence ranges dates) use
by default `calendar.firstweekday()` as first week day ('wkst').
Solution
If recurrence frequency is 'weekly', get first week day based on user language,
and add it as param ('wkst') to the rrule.rrule.
https://dateutil.readthedocs.io/en/stable/rrule.html#classes
opw-2448325
closes odoo/odoo#66265
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Co-authored-by: LucasLefevre (lul) <lul@odoo.com>
Diffstat (limited to 'addons/web/static/tests')
0 files changed, 0 insertions, 0 deletions
