summaryrefslogtreecommitdiff
path: root/addons/base/static/src
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2011-07-22 17:17:52 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2011-07-22 17:17:52 +0200
commit30fcc6872fc2545b0843113a3ae396bf2b501ae2 (patch)
tree8e5d3ffd103ec694bd858c960498272d762c1a9f /addons/base/static/src
parentb15b501b8a8fd199d63a2cf2715944d2cca55c1a (diff)
[fix] problem with attachments loading in o2m
bzr revid: nicolas.vanhoren@openerp.com-20110722151752-l89h16x7j9loh2qi
Diffstat (limited to 'addons/base/static/src')
-rw-r--r--addons/base/static/src/js/form.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/base/static/src/js/form.js b/addons/base/static/src/js/form.js
index e28e42385ec..790a442f810 100644
--- a/addons/base/static/src/js/form.js
+++ b/addons/base/static/src/js/form.js
@@ -407,20 +407,19 @@ openerp.base.FormView = openerp.base.View.extend( /** @lends openerp.base.FormV
this.notification.notify("Cancelling form");
},
do_update_sidebar: function() {
- if (this.flags.sidebar === false) {
+ if (this.flags.sidebar === false || this.view_manager.sidebar === undefined) {
return;
}
if (!this.datarecord.id) {
this.on_attachments_loaded([]);
} else {
- // TODO fme: modify this so it doesn't try to load attachments when there is not sidebar
- /*(new openerp.base.DataSetSearch(
+ (new openerp.base.DataSetSearch(
this, 'ir.attachment', this.dataset.get_context(),
[['res_model', '=', this.dataset.model],
['res_id', '=', this.datarecord.id],
['type', 'in', ['binary', 'url']]])).read_slice(
['name', 'url', 'type'], false, false,
- this.on_attachments_loaded);*/
+ this.on_attachments_loaded);
}
},
on_attachments_loaded: function(attachments) {