[MIG] document_url: Migration to 14.0

[MIG] document_url: Migration to 14.0
This commit is contained in:
davidborromeo
2021-09-01 14:59:52 +02:00
committed by FernandoRomera
parent 713539b38f
commit 5efdde8269
4 changed files with 18 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ odoo.define("document_url", function (require) {
AttachmentBox.include({
events: _.extend(AttachmentBox.prototype.events, {
"click span.o_add_url_button": "_onAddUrl",
"click button.o_add_url_button": "_onAddUrl",
}),
_onAddUrl: function () {
// Opens wizard to add an URL attachment to the current record

View File

@@ -2,11 +2,16 @@
<!-- Copyright 2018 Tecnativa - Ernesto Tejeda
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<templates id="template" xml:space="preserve">
<t t-extend="mail.chatter.AttachmentBox">
<t t-jquery="span.o_upload_attachments_button" t-operation="after">
<span class="btn btn-link o_add_url_button"><span
class="fa fa-plus-square"
/> Add URL</span>
<t t-extend="mail.AttachmentBox">
<t t-jquery="button.o_AttachmentBox_buttonAdd" t-operation="after">
<button
type="button"
class="o_add_url_button btn btn-link"
t-on-click="_onClickAdd"
>
<i class="fa fa-plus-square" />
Add URL
</button>
</t>
</t>
</templates>