[IMP] view: only first alias displayed
bzr revid: chm@openerp.com-20130201095133-i3p6vehexh7a9bqh
This commit is contained in:
parent
d8f18175b9
commit
0d3004e829
|
@ -1406,23 +1406,11 @@ instance.web.View = instance.web.Widget.extend({
|
|||
'model': this.options.action.res_model,
|
||||
'alias_defaults': context.help_alias
|
||||
}).then(function (alias_ids) {
|
||||
if (alias_ids.length) {
|
||||
if (alias_ids.length && alias_ids[0].email.match(/@.+/)) {
|
||||
// alias_ids[0].global
|
||||
var $alias = $(QWeb.render('View.nocontent_alias'));
|
||||
var global = false;
|
||||
var inc = 0;
|
||||
_.each(alias_ids, function (alias_id) {
|
||||
if (alias_id.email.match(/@.+/)) {
|
||||
if (inc && global != alias_id.global) {
|
||||
$alias.append('<br/>' + _t("or"));
|
||||
global = alias_id.global;
|
||||
}
|
||||
$alias.append('<br/><a href="mailto:' + alias_id.email + '">' + alias_id.email + '</a>');
|
||||
inc++;
|
||||
}
|
||||
})
|
||||
if(inc) {
|
||||
$dom.append($alias);
|
||||
}
|
||||
$alias.append('<a href="mailto:' + alias_ids[0].email + '">' + alias_ids[0].email + '</a>');
|
||||
$dom.append($alias);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1873,7 +1873,7 @@
|
|||
</t>
|
||||
<t t-name="View.nocontent_alias">
|
||||
<p class="oe_view_nocontent_alias">
|
||||
You can also create the document by sending an email to :
|
||||
You can also create documents by sending an email to:
|
||||
</p>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
Loading…
Reference in New Issue