/
url.js
executable file
·30 lines (28 loc) · 970 Bytes
/
url.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* © 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
* © 2016 ACSONE SA/NV (<http://acsone.eu>)
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
*/
odoo.define('document_url', function(require) {
"use strict";
var Sidebar = require('web.Sidebar');
Sidebar.include({
init: function (parent, options) {
var result = this._super(parent, options);
this.items.url_doc = [
{
action: {
id: "document_url.action_ir_attachment_add_url"
}
}
];
return result;
},
redraw: function () {
var result = this._super();
// Open URLs in a different browser tab
this.$el.find("a[href]").attr('target', '_blank');
return result;
}
});
});