Depending on the version of dateutil, rule._bynweekday can either be
a tuple or a set (see https://github.com/dateutil/dateutil/pull/54), which,
in the case of a set, breaks the access by index (see related issue:
https://github.com/dateutil/dateutil/issues/24).
By casting it into a list, we make sure that we can access [0] in both case.
Credits to jke ; closes opw-690761.
Old check was always ignored since 0 is False.
This commit closes#12715
Other fix; when we detach an event, we reset the rrule_type to avoid to have a
warning popup (about empty final_date) if the old one value was end_date.
Add `display_start` and `display_stop` to the fields
which are public even if the event is marked as private.
There is no reason it should be public,
especially if `start` and `stop` are. Besides,
this leads to issues in
`get_search_fields`, when doing:
```
sort_fields['sort_start'] = browse_event['display_start'].replace(' ', '').replace('-', '')
```
opw-672997
If an event is private, a bunch of fields
are hidden for the users not being
the owner of the event, even for sudo.
The fields on which depends the `rrule`
computation were part of the hidden/private
fields.
In addition, the `rrule` is always computed
as sudo. See `_get_rulestring`.
Therefore, the `rrule` of recurrent private events
was not correctly computed when the owner wasn't
the administrator.
opw-670295
When changing anything regarding the recurrence,
e.g. the number of repetitions, the weekdays, ...
the event require an update by Google side
As the `rrule` is a computed field, we need to mark
the event as needing an update by Google side as soon
as one of the fields on which depend the `rrule` field
is updated.
opw-659963
The time_display is present in a translatable email template but was not
translated. Added the missing term.
Updated .pot file for a few missing terms.
Removed base_calendar.pot that has no reason to be in 8.0
Fixes#9573
When we export a recurring event, there was an error since there is
virtual ids (like '{real_id}-{date_of_the_event}').
Events steming from a recurring events are in fact shown virtually. In
the database there is really only one event and a suffix is appended to
the id to target a given instance of a recurring event.
If we want to separate a recurring event from the instances, we can edit
the instance and use the link "Update only this instance", once done
this instance is separated for the recurring event.
This commit if one or more recurring events instances are selected when
an export is done, will only export one source event of each of the
events occurences.
fixes#7932closes#8262
opw-647676
Delete the code introduced by 656f8241d5
Group by didn't work in calendar tree view, group of records showed (0)
as number of related records for each group.
closes#7602
opw:644735
This issue is related to 4f03a6224d.
The above revision aimed to not fetch uselessly fields values
The thing is, `partner_id` of `get_next_potential_limit_alarm` method
expects a partner id, while partner['id'] is actually a user id.
The `partner_id` of the user must be taken, not the user id itself.
`calendar_last_notif_ack` is not in the self readable fields list
of `res.users`. See `SELF_READABLE_FIELDS` in res_users.py.
This field must therefore be read as SUPERUSER.
opw-634402
In calendar, using recurrent events leads to the use of
virtual ids, which are strings.
It wasn't possible to change the message subscriptions
for recurring events,
neither for the user himself, neither for the other followers
opw-627895
default_get method of mail.wizard.invite model uses
the key 'default_res_id' to retrieve the res_id of the record
to add the followers.
In the case of recurrent events, virtual ids are used, and
the conversion from virtual ids to real ids is needed.
When you try to load calendar_demo.xml, the loading of demo event
`calendar_event_1` fails with fr_BE locale (and probably some others).
This is due to the rendering of the mail template
`calendar_template_meeting_invitation` (which is used when you create
an event).
This template used a method `get_interval()` in calendar.py, which
does not always return Unicode strings. Furthermore, these strings
are dates and should be formatted according to user locale.
PS: Yeah, we love Python2's management of encodings and Unicode...
Fix error where if no email_from was in openerp.tool.config, notif by mail was not sent
Add optionnal param 'missing' to allow to have missing alarm.
Missing field is the date from the last time that cron had run.
Now we stop to process the next 30 minutes, but we process all alarm since the next cron.
So, an email alarm will be always in delay, but a mail will be sent !
In v8 we use ICP to save the date, but it should be changed in master, maybe we should
save the last execution time in the ir_cron model directly ?
Setting a constraint on an old api style computed field is broken in Odoo 8.0
The constraint is checked with the old value of the computed field, not the new one
So, it was possible to update an event with a start date greater than the stop date
And once done, it was impossible to correct the mistake
The calendar module generates string values with
a date/time formatted according to the user
language. Those formats may contain non-ascii
characters and are read as unicode strings,
but fed to str{p,t}time, which only accepts
byte strings (in Python 2).
This would cause an exception when loading calendar
notifications for a user using e.g. Chinese with
some CJK unicode chars in the date/time format.
The selection of records in cache for prefetching was moved to method
_read_from_database() by xmo at rev 785018cc in order to fix an access right
bug. But this introduced an issue: to explicitly avoid prefetching, you should
use read() instead of browsing records. We revert the change by xmo, without
reintroducing the bug (which apparently was fixed by another way).
Bug was that when you click on meeting button from a res_partner form (Customers in menu), the button overwrites the context to use the active partner as a default in the calendar meeting. By consequence, the context overwritte the default partner who are the creator. Now the context could be removed from action and that is in get_default for partner_ids (from model calendar_event) that we add the creator AND the active_id if from a model res_partner.