summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-02-17 11:28:06 +0100
committerOlivier Dony <odo@openerp.com>2014-02-17 11:28:06 +0100
commit15a1aef33cb107d153d10ec04a5c5770b1aa3be2 (patch)
tree106eb94c6b5b6ac7f2fc39ffb36192884feb01a4 /addons/web/static/src/js
parent0227d6a05610e8aeb091dd9e6112a95fff347207 (diff)
parentacb010a9852755668bbe3f2419ae5038683f4a93 (diff)
[MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 3901 dle@openerp.com-20140214114445-krexrwm9o2nrxepk
The following fixes have intentionally been reverted, as the code has significantly changed and the bugs cannot be reproduced: - web_calendar fix (revid:dle@openerp.com-20140214114258-0hcsfdwyl61gph0v) - CSS fix for buttons (revid:mat@openerp.com-20140213145755-txvtwqbfc83vnw9o) bzr revid: odo@openerp.com-20140217102806-qg6kwk2jomdvvmlj
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/data.js3
-rw-r--r--addons/web/static/src/js/search.js2
-rw-r--r--addons/web/static/src/js/view_form.js2
-rw-r--r--addons/web/static/src/js/views.js2
4 files changed, 5 insertions, 4 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js
index 78e3001d746..f2a55bbc44b 100644
--- a/addons/web/static/src/js/data.js
+++ b/addons/web/static/src/js/data.js
@@ -872,7 +872,8 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({
});
var return_records = function() {
var records = _.map(ids, function(id) {
- return _.extend({}, _.detect(self.cache, function(c) {return c.id === id;}).values, {"id": id});
+ var c = _.find(self.cache, function(c) {return c.id === id;});
+ return _.isUndefined(c) ? c : _.extend({}, c.values, {"id": id});
});
if (self.debug_mode) {
if (_.include(records, undefined)) {
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index 903a9f4683e..b667d135bdd 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -414,7 +414,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
context: this.dataset.get_context(),
});
- $.when(load_view).then(function (r) {
+ this.alive($.when(load_view)).then(function (r) {
return self.search_view_loaded(r);
}).fail(function () {
self.ready.reject.apply(null, arguments);
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 4576e9d328d..0a30d4db649 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -5129,7 +5129,7 @@ instance.web.form.FieldReference = instance.web.form.AbstractField.extend(instan
.on('blurred', null, function () {self.trigger('blurred');});
this.m2o = new instance.web.form.FieldMany2One(fm, { attrs: {
- name: 'm2o',
+ name: 'Referenced Document',
modifiers: JSON.stringify({readonly: this.get('effective_readonly')}),
}});
this.m2o.on("change:value", this, this.data_changed);
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index eed98f9fc31..cb0d130e305 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -1264,7 +1264,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
this.dataset = dataset;
this.model_id = model_id;
if (args && args[0].error) {
- this.do_warn( instance.web.qweb.render('message_error_uploading'), args[0].error);
+ this.do_warn(_t('Uploading Error'), args[0].error);
}
if (!model_id) {
this.on_attachments_loaded([]);