diff --git a/document_url/README.rst b/document_url/README.rst index 2aacc4a7..a02bd2f6 100644 --- a/document_url/README.rst +++ b/document_url/README.rst @@ -17,13 +17,13 @@ URL attachment :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github - :target: https://github.com/OCA/knowledge/tree/17.0/document_url + :target: https://github.com/OCA/knowledge/tree/18.0/document_url :alt: OCA/knowledge .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/knowledge-17-0/knowledge-17-0-document_url + :target: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_url :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -54,7 +54,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -69,14 +69,18 @@ Authors Contributors ------------ -- Jonathan Nemry -- `Tecnativa `__: +- Jonathan Nemry +- `Tecnativa `__: - - Pedro M. Baeza - - Ernesto Tejeda - - Manuel Calero - - Víctor Martínez - - Matias Peralta - Adhoc SA + - Pedro M. Baeza + - Ernesto Tejeda + - Manuel Calero + - Víctor Martínez + +- Matias Peralta - Adhoc SA +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia Maintainers ----------- @@ -91,6 +95,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/knowledge `_ project on GitHub. +This module is part of the `OCA/knowledge `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/document_url/__manifest__.py b/document_url/__manifest__.py index 758c1527..c9ff42ff 100644 --- a/document_url/__manifest__.py +++ b/document_url/__manifest__.py @@ -2,7 +2,7 @@ # Copyright 2020 Tecnativa - Manuel Calero { "name": "URL attachment", - "version": "17.0.1.0.1", + "version": "18.0.1.0.0", "category": "Tools", "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/knowledge", diff --git a/document_url/readme/CONTRIBUTORS.md b/document_url/readme/CONTRIBUTORS.md index fbacc8c2..183de445 100644 --- a/document_url/readme/CONTRIBUTORS.md +++ b/document_url/readme/CONTRIBUTORS.md @@ -4,4 +4,6 @@ - Ernesto Tejeda - Manuel Calero - Víctor Martínez - - Matias Peralta - Adhoc SA +- Matias Peralta - Adhoc SA +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia diff --git a/document_url/static/description/index.html b/document_url/static/description/index.html index b70cd40e..c4ce53eb 100644 --- a/document_url/static/description/index.html +++ b/document_url/static/description/index.html @@ -369,7 +369,7 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:f8e881059b3485a5938ae6869a8bce008e4c891fc341fc845932995301df5402 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/knowledge Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/knowledge Translate me on Weblate Try me on Runboat

Module that allows to attach an URL as a document.

Table of contents

@@ -402,7 +402,7 @@ related to the object.

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -422,7 +422,11 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
  • Ernesto Tejeda
  • Manuel Calero
  • Víctor Martínez
  • + +
  • Matias Peralta - Adhoc SA
  • +
  • Heliconia Solutions Pvt. Ltd.
      +
    • Bhavesh Heliconia
  • @@ -436,7 +440,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/knowledge project on GitHub.

    +

    This module is part of the OCA/knowledge project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/document_url/static/src/js/url.esm.js b/document_url/static/src/js/url.esm.js index c2b4e1b1..684ee1f6 100644 --- a/document_url/static/src/js/url.esm.js +++ b/document_url/static/src/js/url.esm.js @@ -1,11 +1,18 @@ /** @odoo-module **/ import {AttachmentList} from "@mail/core/common/attachment_list"; -import {Chatter} from "@mail/core/web/chatter"; +import {ConfirmationDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; +import {Chatter} from "@mail/chatter/web_portal/chatter"; import {patch} from "@web/core/utils/patch"; +import {useService} from "@web/core/utils/hooks"; import {url} from "@web/core/utils/urls"; +import {_t} from "@web/core/l10n/translation"; patch(Chatter.prototype, { + setup() { + super.setup(); + this.action = useService("action"); + }, _onAddUrl(event) { event.preventDefault(); event.stopPropagation(); @@ -64,4 +71,15 @@ patch(AttachmentList.prototype, { download: true, }); }, + onClickUnlink(attachment) { + if (this.env.inComposer) { + return this.props.unlinkAttachment(attachment); + } + this.dialog.add(ConfirmationDialog, { + body: _t('Do you really want to delete "%s"?', attachment.name), + // eslint-disable-next-line no-empty-function + cancel: () => {}, + confirm: () => this.onConfirmUnlink(attachment), + }); + }, }); diff --git a/document_url/static/src/xml/url.xml b/document_url/static/src/xml/url.xml index 01a03e56..f66be7d1 100644 --- a/document_url/static/src/xml/url.xml +++ b/document_url/static/src/xml/url.xml @@ -29,21 +29,6 @@ - - - new form - - - ir.attachment.add_url.form - ir.attachment.add_url - -
    - - - - -
    -
    -
    -
    -
    -
    + + + ir.attachment.add_url.form + ir.attachment.add_url + +
    + + + + + +
    +
    +