mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-13 15:34:49 -06:00
[MIG] document_url: Migration to 14.0
[MIG] document_url: Migration to 14.0
This commit is contained in:
parent
a76d179ff7
commit
4ec002bcb9
@ -2,13 +2,16 @@
|
||||
# Copyright 2020 Tecnativa - Manuel Calero
|
||||
{
|
||||
"name": "URL attachment",
|
||||
"version": "13.0.1.0.1",
|
||||
"version": "14.0.1.0.0",
|
||||
"category": "Tools",
|
||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||
"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,
|
||||
}
|
||||
|
2
document_url/security/ir.model.access.csv
Normal file
2
document_url/security/ir.model.access.csv
Normal 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
|
|
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user