web mailing list archives
web@odoo-community.org
Browse archives
Re: [OCA/web] [11.0][ADD] web_view_calendar_list (#1512)
Re: [OCA/web] [11.0][ADD] web_view_calendar_list (#1512)
Re: [OCA/web] [11.0][ADD] web_view_calendar_list (#1512)
by Enric Tobella <notifications@github.com> - 13/07/2020 10:58:12@etobella commented on this pull request.
In web_view_calendar_list/static/src/js/calendar_list_renderer.js:
> + if (self.state.context.default_name) { + data.title = self.state.context.default_name; + } + self.trigger_up('openCreate', data); + self.$calendar.fullCalendar('unselect'); + }, + eventRender: function (event, element) { + var $render = $(self._eventRender(event)); + event.title = $render.find('.o_field_type_char:first').text(); + element.find('.fc-list-item-title').html($render.html()); + element.addClass($render.attr('class')); + var display_hour = ''; + if (!event.allDay) { + var start = event.r_start || event.start; + var end = event.r_end || event.end; + var timeFormat = _t.database.parameters.time_format.search("%H") != -1 ? 'HH:mm': 'h:mma';
The field is a datetime, and no parser exists on field_utils in order to parse datetime to time. I am following the same behavior found on odoo. It might not be the best, but I tried to follow the same logic in order to not make much changes.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.