[FIX] pad condition on name of attachement instead of url

bzr revid: al@openerp.com-20111026225515-rdfxvgk8vv9j055m
This commit is contained in:
Antony Lesuisse
2011-10-27 00:55:15 +02:00
parent 44fc0f6855
commit a0ae570cbd
+1 -1
View File
@@ -9,7 +9,7 @@ instance.web.form.SidebarAttachments = instance.web.form.SidebarAttachments.exte
var self = this;
var $padbtn = self.$element.find('button.pad');
var is_pad = function(a) {
return a.type == 'url' && _(a.url).startsWith(self.pad_prefix);
return a.type == 'url' && a.name == 'Pad';
};
if (_.any(attachments, is_pad)) {
$padbtn.hide();