[FIX] calendar: rrule computation of private events
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
This commit is contained in:
parent
9ecd80eaeb
commit
0eb9772ab8
|
@ -1708,7 +1708,9 @@ class calendar_event(osv.Model):
|
|||
continue
|
||||
if r['class'] == 'private':
|
||||
for f in r.keys():
|
||||
if f not in ('id', 'allday', 'start', 'stop', 'duration', 'user_id', 'state', 'interval', 'count', 'recurrent_id_date', 'rrule'):
|
||||
recurrent_fields = self._get_recurrent_fields(cr, uid, context=context)
|
||||
public_fields = list(set(recurrent_fields + ['id', 'allday', 'start', 'stop', 'duration', 'user_id', 'state', 'interval', 'count', 'recurrent_id_date', 'rrule']))
|
||||
if f not in public_fields:
|
||||
if isinstance(r[f], list):
|
||||
r[f] = []
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue