[MIG] document_url: Migration to 14.0

This commit is contained in:
davidborromeo 2021-09-02 11:42:10 +02:00
parent fbb92dc902
commit c8174b8045
4 changed files with 12 additions and 5 deletions

View File

@ -8,7 +8,10 @@
"website": "https://github.com/OCA/knowledge",
"license": "AGPL-3",
"depends": ["mail"],
"data": ["view/document_url_view.xml"],
"data": [
"view/document_url_view.xml",
"security/ir.model.access.csv",
],
"qweb": ["static/src/xml/url.xml"],
"installable": True,
}

View File

@ -1,2 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ir_attachment_add_url,access.ir.attachment.add.url,model_ir_attachment_add_url,base.group_user,1,1,1,1
access_ir_attachment_add_url,access.ir.attachment.add.url,model_ir_attachment_add_url,base.group_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_ir_attachment_add_url access.ir.attachment.add.url model_ir_attachment_add_url base.group_user 1 1 1 1

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

@ -4,8 +4,12 @@
<templates id="template" xml:space="preserve">
<t t-extend="mail.AttachmentBox">
<t t-jquery="button.o_AttachmentBox_buttonAdd" t-operation="after">
<button class="o_add_url_button btn btn-link" type="button" t-on-click="_onClickAdd">
<i class="fa fa-plus-square"/>
<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>