From e93ead9093fb194b8d6fde57f510d56bc0cc3e33 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 13 Mar 2015 13:24:35 +0100 Subject: [PATCH] [FIX] web_calendar: error in case of creation with quick_create disabled Broken in 82fee7dfe83 porting of quick create to Bootstrap modals: in case quick_create is disabled, the creation of the quick_create dialog is bypassed and so is defining this.$input, but focus() calls still happen and blow up. Create a dummy $input in the constructor so it's alway possible to call this.$input.focus(). --- addons/web_calendar/static/src/js/web_calendar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_calendar/static/src/js/web_calendar.js b/addons/web_calendar/static/src/js/web_calendar.js index f92e6e2262a..8d1e444a5fd 100644 --- a/addons/web_calendar/static/src/js/web_calendar.js +++ b/addons/web_calendar/static/src/js/web_calendar.js @@ -967,6 +967,7 @@ openerp.web_calendar = function(instance) { // Can hold data pre-set from where you clicked on agenda this.data_template = data_template || {}; + this.$input = $(); }, get_title: function () { var parent = this.getParent();