[FIX] calendar: display_start and stop are not private
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
This commit is contained in:
@@ -1709,7 +1709,7 @@ class calendar_event(osv.Model):
|
||||
if r['class'] == 'private':
|
||||
for f in r.keys():
|
||||
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']))
|
||||
public_fields = list(set(recurrent_fields + ['id', 'allday', 'start', 'stop', 'display_start', 'display_stop', 'duration', 'user_id', 'state', 'interval', 'count', 'recurrent_id_date', 'rrule']))
|
||||
if f not in public_fields:
|
||||
if isinstance(r[f], list):
|
||||
r[f] = []
|
||||
|
||||
Reference in New Issue
Block a user