diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-06-25 12:43:41 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-06-25 12:43:41 +0200 |
| commit | 9e8e3653f2168b4f32ee08e98b3f41e8eb8474d7 (patch) | |
| tree | 03e5b7ac83fd38938e8588fe66dcd35b0eaef8cc /addons/web/static/src | |
| parent | 4cb5381deecdf28d2a0f6b1e7f4b16a611ec9de9 (diff) | |
| parent | f68c83545af89d7793884b177b1f5679c8619b84 (diff) | |
[MERGE] forward port of branch saas-4 up to f68c835
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 6 | ||||
| -rw-r--r-- | addons/web/static/src/js/formats.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/js/view_list.js | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 1ea14ee8c81..c8cc7ce8a4b 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -493,7 +493,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ size: 'medium', title: error.title, buttons: [ - {text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }} + {text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }} ] }, $('<div>').html(error.error)).open(); }, @@ -706,7 +706,7 @@ instance.web.ChangePassword = instance.web.Widget.extend({ var $button = self.$el.find('.oe_form_button'); $button.appendTo(this.getParent().$buttons); $button.eq(2).click(function(){ - self.getParent().close(); + self.$el.parents('.modal').modal('hide'); }); $button.eq(0).click(function(){ self.rpc("/web/session/change_password",{ @@ -726,7 +726,7 @@ instance.web.ChangePassword = instance.web.Widget.extend({ size: 'medium', title: error.title, buttons: [ - {text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }} + {text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }} ] }, $('<div>').html(error.error)).open(); }, diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js index f08dc31021a..3d7b574e56a 100644 --- a/addons/web/static/src/js/formats.js +++ b/addons/web/static/src/js/formats.js @@ -271,7 +271,7 @@ instance.web.parse_value = function (value, descriptor, value_if_empty) { value, (date_pattern + ' ' + time_pattern)); if (datetime !== null) return instance.web.datetime_to_str(datetime); - datetime = Date.parseExact(value.replace(/\d+/g, function(m){ + datetime = Date.parseExact(value.toString().replace(/\d+/g, function(m){ return m.length === 1 ? "0" + m : m ; }), (date_pattern + ' ' + time_pattern)); if (datetime !== null) @@ -284,7 +284,7 @@ instance.web.parse_value = function (value, descriptor, value_if_empty) { var date = Date.parseExact(value, date_pattern); if (date !== null) return instance.web.date_to_str(date); - date = Date.parseExact(value.replace(/\d+/g, function(m){ + date = Date.parseExact(value.toString().replace(/\d+/g, function(m){ return m.length === 1 ? "0" + m : m ; }), date_pattern); if (date !== null) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 16d0310ab4d..714f7a640d8 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -1108,7 +1108,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. ids = value; } new instance.web.Model(column.relation) - .call('name_get', [ids]).done(function (names) { + .call('name_get', [ids, this.dataset.context]).done(function (names) { // FIXME: nth horrible hack in this poor listview record.set(column.id + '__display', _(names).pluck(1).join(', ')); |
