diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 7b25aaafc9e..a3adfcf243b 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -889,7 +889,7 @@ class calendar_event(osv.Model): 'display_time': fields.function(_compute, string='Event Time', type="char", multi='attendee'), 'display_start': fields.function(_compute, string='Date', type="char", multi='attendee', store=True), 'allday': fields.boolean('All Day', states={'done': [('readonly', True)]}), - 'start': fields.function(_compute, string='Start', type="datetime", multi='attendee', store=True, required=True, help="Start date of an event, without time for full days events"), + 'start': fields.function(_compute, fnct_inv=lambda *args: None, string='Start', type="datetime", multi='attendee', store=True, required=True, help="Start date of an event, without time for full days events"), 'stop': fields.function(_compute, string='Stop', type="datetime", multi='attendee', store=True, required=True, help="Stop date of an event, without time for full days events"), 'start_date': fields.date('Start Date', states={'done': [('readonly', True)]}, track_visibility='onchange'), 'start_datetime': fields.datetime('Start DateTime', states={'done': [('readonly', True)]}, track_visibility='onchange'), diff --git a/addons/web_calendar/static/src/js/web_calendar.js b/addons/web_calendar/static/src/js/web_calendar.js index f002111fa09..7fdb96f0c7c 100644 --- a/addons/web_calendar/static/src/js/web_calendar.js +++ b/addons/web_calendar/static/src/js/web_calendar.js @@ -127,8 +127,7 @@ var CalendarView = View.extend({ this.attendee_people = attrs.attendee; // Check whether the date field is editable (i.e. if the events can be dragged and dropped) - var main_date_field = this.date_start || this.date_end || this.date_delay; - this.editable = !this.options.read_only_mode && !this.fields_view.fields[main_date_field].readonly; + this.editable = !this.options.read_only_mode && !this.fields_view.fields[this.date_start].readonly; //if quick_add = False, we don't allow quick_add //if quick_add = not specified in view, we use the default quick_create_instance