[FIX] problem with mail widgets and o2m

bzr revid: nicolas.vanhoren@openerp.com-20120710094250-l8utds8f3wtpqlhc
This commit is contained in:
niv-openerp 2012-07-10 11:42:50 +02:00
parent 24a54675ee
commit e2970d33ee
1 changed files with 5 additions and 1 deletions

View File

@ -540,7 +540,11 @@ openerp.mail = function(session) {
this._super.apply(this, arguments);
var self = this;
this.reinit();
if (! this.view.datarecord.id) { this.$element.find('.oe_mail_thread').hide(); return; }
if (! this.view.datarecord.id ||
instance.web.BufferedDataSet.virtual_id_regex.test(this.view.datarecord.id)) {
this.$element.find('.oe_mail_thread').hide();
return;
}
// fetch followers
var fetch_sub_done = this.fetch_subscribers();
// create and render Thread widget