[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 Bhavesh Heliconia
parent a76d179ff7
commit 4ec002bcb9
4 changed files with 18 additions and 8 deletions

View File

@ -2,13 +2,16 @@
# Copyright 2020 Tecnativa - Manuel Calero # Copyright 2020 Tecnativa - Manuel Calero
{ {
"name": "URL attachment", "name": "URL attachment",
"version": "13.0.1.0.1", "version": "14.0.1.0.0",
"category": "Tools", "category": "Tools",
"author": "Tecnativa, Odoo Community Association (OCA)", "author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/knowledge", "website": "https://github.com/OCA/knowledge",
"license": "AGPL-3", "license": "AGPL-3",
"depends": ["mail"], "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"], "qweb": ["static/src/xml/url.xml"],
"installable": True, "installable": True,
} }

View File

@ -0,0 +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
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({ AttachmentBox.include({
events: _.extend(AttachmentBox.prototype.events, { events: _.extend(AttachmentBox.prototype.events, {
"click span.o_add_url_button": "_onAddUrl", "click button.o_add_url_button": "_onAddUrl",
}), }),
_onAddUrl: function () { _onAddUrl: function () {
// Opens wizard to add an URL attachment to the current record // Opens wizard to add an URL attachment to the current record

View File

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