[MIG] mail_attach_existing_attachment: Migration to 13.0

This commit is contained in:
Radovan Skolnik 2020-08-24 16:24:53 +02:00 committed by Alvaro
parent 7b5df9ee22
commit 9355ef8128
16 changed files with 27 additions and 114 deletions

View File

@ -14,13 +14,13 @@ Mail Attach Existing Attachment
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/12.0/mail_attach_existing_attachment :target: https://github.com/OCA/social/tree/13.0/mail_attach_existing_attachment
:alt: OCA/social :alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-12-0/social-12-0-mail_attach_existing_attachment :target: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mail_attach_existing_attachment
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/205/12.0 :target: https://runbot.odoo-community.org/runbot/205/13.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -40,12 +40,12 @@ To use this module, you need to:
* Adding some attachments on an object by creating a new *Log note* * Adding some attachments on an object by creating a new *Log note*
.. figure:: https://raw.githubusercontent.com/OCA/social/12.0/mail_attach_existing_attachment/static/description/attachment.png .. figure:: https://raw.githubusercontent.com/OCA/social/13.0/mail_attach_existing_attachment/static/description/attachment.png
:alt: Attachment on purchase order :alt: Attachment on purchase order
* Then, by sending the object via email, you can select the attachment added earlier * Then, by sending the object via email, you can select the attachment added earlier
.. figure:: https://raw.githubusercontent.com/OCA/social/12.0/mail_attach_existing_attachment/static/description/ex_mail_compose_message.png .. figure:: https://raw.githubusercontent.com/OCA/social/13.0/mail_attach_existing_attachment/static/description/ex_mail_compose_message.png
:alt: Sends the Purchase Order by email :alt: Sends the Purchase Order by email
Known issues / Roadmap Known issues / Roadmap
@ -59,7 +59,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_attach_existing_attachment%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_attach_existing_attachment%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues. Do not contact contributors directly about support or help with technical issues.
@ -94,6 +94,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/social <https://github.com/OCA/social/tree/12.0/mail_attach_existing_attachment>`_ project on GitHub. This module is part of the `OCA/social <https://github.com/OCA/social/tree/13.0/mail_attach_existing_attachment>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -1,35 +1,15 @@
############################################################################## # Copyright 2015 ACSONE SA/NV
# # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
# This file is part of mail_attach_existing_attachment,
# an Odoo module.
#
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
#
# mail_attach_existing_attachment is free software:
# you can redistribute it and/or modify it under the terms of the GNU
# Affero General Public License as published by the Free Software
# Foundation,either version 3 of the License, or (at your option) any
# later version.
#
# mail_attach_existing_attachment is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with mail_attach_existing_attachment.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{ {
"name": "Mail Attach Existing Attachment", "name": "Mail Attach Existing Attachment",
"summary": "Adding attachment on the object by sending this one", "summary": "Adding attachment on the object by sending this one",
"author": "ACSONE SA/NV, " "Tecnativa, " "Odoo Community Association (OCA)", "author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social", "website": "https://github.com/OCA/social",
"category": "Social Network", "category": "Social Network",
"version": "12.0.1.0.0", "version": "13.0.1.0.0",
"license": "AGPL-3", "license": "AGPL-3",
"depends": ["mail", "document"], "depends": ["mail"],
"data": ["wizard/mail_compose_message_view.xml"], "data": ["wizard/mail_compose_message_view.xml"],
"installable": True, "installable": True,
} }

View File

@ -19,7 +19,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "" msgstr ""
@ -30,7 +29,6 @@ msgid "Email composition wizard"
msgstr "Assistent per composició de correus electrònics" msgstr "Assistent per composició de correus electrònics"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
msgid "Object Attachments" msgid "Object Attachments"
msgstr "" msgstr ""

View File

@ -20,7 +20,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "Kann Anhang anhängen" msgstr "Kann Anhang anhängen"
@ -31,7 +30,6 @@ msgid "Email composition wizard"
msgstr "Assistent zum Email verfassen" msgstr "Assistent zum Email verfassen"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
#, fuzzy #, fuzzy
msgid "Object Attachments" msgid "Object Attachments"

View File

@ -20,7 +20,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "Puede adjuntar adjuntos" msgstr "Puede adjuntar adjuntos"
@ -31,7 +30,6 @@ msgid "Email composition wizard"
msgstr "Asistente composición Correo Electrónico" msgstr "Asistente composición Correo Electrónico"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
#, fuzzy #, fuzzy
msgid "Object Attachments" msgid "Object Attachments"

View File

@ -19,7 +19,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "" msgstr ""
@ -30,7 +29,6 @@ msgid "Email composition wizard"
msgstr "Asistente de redacción de E-mail" msgstr "Asistente de redacción de E-mail"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
msgid "Object Attachments" msgid "Object Attachments"
msgstr "" msgstr ""

View File

@ -20,7 +20,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "Il est possible d'attacher des pièces jointes" msgstr "Il est possible d'attacher des pièces jointes"
@ -31,7 +30,6 @@ msgid "Email composition wizard"
msgstr "Assistant de composition de courriel" msgstr "Assistant de composition de courriel"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
#, fuzzy #, fuzzy
msgid "Object Attachments" msgid "Object Attachments"

View File

@ -21,7 +21,6 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "Može pridružiti privitak" msgstr "Može pridružiti privitak"
@ -32,7 +31,6 @@ msgid "Email composition wizard"
msgstr "Čarobnjak za sastavljanje maila" msgstr "Čarobnjak za sastavljanje maila"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
#, fuzzy #, fuzzy
msgid "Object Attachments" msgid "Object Attachments"

View File

@ -20,7 +20,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "Inserimento Allegati Ammesso" msgstr "Inserimento Allegati Ammesso"
@ -31,7 +30,6 @@ msgid "Email composition wizard"
msgstr "Wizard Creazione Email" msgstr "Wizard Creazione Email"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
#, fuzzy #, fuzzy
msgid "Object Attachments" msgid "Object Attachments"

View File

@ -4,9 +4,9 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 12.0\n" "Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -14,7 +14,6 @@ msgstr ""
"Plural-Forms: \n" "Plural-Forms: \n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "" msgstr ""
@ -25,8 +24,6 @@ msgid "Email composition wizard"
msgstr "" msgstr ""
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
msgid "Object Attachments" msgid "Object Attachments"
msgstr "" msgstr ""

View File

@ -21,7 +21,6 @@ msgstr ""
"X-Generator: Weblate 3.8\n" "X-Generator: Weblate 3.8\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "Pode Anexar Anexo" msgstr "Pode Anexar Anexo"
@ -32,7 +31,6 @@ msgid "Email composition wizard"
msgstr "Assistente de Composição de Email" msgstr "Assistente de Composição de Email"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
msgid "Object Attachments" msgid "Object Attachments"
msgstr "Anexos de Objeto" msgstr "Anexos de Objeto"

View File

@ -22,7 +22,6 @@ msgstr ""
"X-Generator: Weblate 3.10\n" "X-Generator: Weblate 3.10\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "Lahko pripenja priponke" msgstr "Lahko pripenja priponke"
@ -33,7 +32,6 @@ msgid "Email composition wizard"
msgstr "Čarovnik za sestavljanje e-pošte" msgstr "Čarovnik za sestavljanje e-pošte"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
msgid "Object Attachments" msgid "Object Attachments"
msgstr "Priponke objekta" msgstr "Priponke objekta"

View File

@ -20,7 +20,6 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__can_attach_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment
msgid "Can Attach Attachment" msgid "Can Attach Attachment"
msgstr "" msgstr ""
@ -31,7 +30,6 @@ msgid "Email composition wizard"
msgstr "" msgstr ""
#. module: mail_attach_existing_attachment #. module: mail_attach_existing_attachment
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_account_invoice_send__object_attachment_ids
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids #: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids
#, fuzzy #, fuzzy
msgid "Object Attachments" msgid "Object Attachments"

View File

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/social/tree/12.0/mail_attach_existing_attachment"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/social-12-0/social-12-0-mail_attach_existing_attachment"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/205/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/social/tree/13.0/mail_attach_existing_attachment"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/social-13-0/social-13-0-mail_attach_existing_attachment"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/205/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module was written to add the possibility to add attachments located on <p>This module was written to add the possibility to add attachments located on
the object by sending it by email with the mail compose message wizard</p> the object by sending it by email with the mail compose message wizard</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
@ -391,13 +391,13 @@ the object by sending it by email with the mail compose message wizard</p>
<li>Adding some attachments on an object by creating a new <em>Log note</em></li> <li>Adding some attachments on an object by creating a new <em>Log note</em></li>
</ul> </ul>
<div class="figure"> <div class="figure">
<img alt="Attachment on purchase order" src="https://raw.githubusercontent.com/OCA/social/12.0/mail_attach_existing_attachment/static/description/attachment.png" /> <img alt="Attachment on purchase order" src="https://raw.githubusercontent.com/OCA/social/13.0/mail_attach_existing_attachment/static/description/attachment.png" />
</div> </div>
<ul class="simple"> <ul class="simple">
<li>Then, by sending the object via email, you can select the attachment added earlier</li> <li>Then, by sending the object via email, you can select the attachment added earlier</li>
</ul> </ul>
<div class="figure"> <div class="figure">
<img alt="Sends the Purchase Order by email" src="https://raw.githubusercontent.com/OCA/social/12.0/mail_attach_existing_attachment/static/description/ex_mail_compose_message.png" /> <img alt="Sends the Purchase Order by email" src="https://raw.githubusercontent.com/OCA/social/13.0/mail_attach_existing_attachment/static/description/ex_mail_compose_message.png" />
</div> </div>
</div> </div>
<div class="section" id="known-issues-roadmap"> <div class="section" id="known-issues-roadmap">
@ -411,7 +411,7 @@ the object by sending it by email with the mail compose message wizard</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_attach_existing_attachment%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_attach_existing_attachment%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -441,7 +441,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/12.0/mail_attach_existing_attachment">OCA/social</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/13.0/mail_attach_existing_attachment">OCA/social</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>

View File

@ -1,26 +1,5 @@
############################################################################## # Copyright 2015 ACSONE SA/NV
# # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
# This file is part of mail_attach_existing_attachment,
# an Odoo module.
#
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
#
# mail_attach_existing_attachment is free software:
# you can redistribute it and/or modify it under the terms of the GNU
# Affero General Public License as published by the Free Software
# Foundation,either version 3 of the License, or (at your option) any
# later version.
#
# mail_attach_existing_attachment is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with mail_attach_existing_attachment.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo.tests import common from odoo.tests import common
@ -42,7 +21,6 @@ class TestAttachExistingAttachment(common.TransactionCase):
attach1 = self.env["ir.attachment"].create( attach1 = self.env["ir.attachment"].create(
{ {
"name": "Attach1", "name": "Attach1",
"datas_fname": "Attach1",
"datas": "bWlncmF0aW9uIHRlc3Q=", "datas": "bWlncmF0aW9uIHRlc3Q=",
"res_model": "res.partner", "res_model": "res.partner",
"res_id": self.partner_01.id, "res_id": self.partner_01.id,

View File

@ -1,26 +1,5 @@
############################################################################## # Copyright 2015 ACSONE SA/NV
# # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
# This file is part of mail_attach_existing_attachment,
# an Odoo module.
#
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
#
# mail_attach_existing_attachment is free software:
# you can redistribute it and/or modify it under the terms of the GNU
# Affero General Public License as published by the Free Software
# Foundation,either version 3 of the License, or (at your option) any
# later version.
#
# mail_attach_existing_attachment is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with mail_attach_existing_attachment.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import api, fields, models from odoo import api, fields, models
@ -30,7 +9,7 @@ class MailComposeMessage(models.TransientModel):
@api.model @api.model
def default_get(self, fields_list): def default_get(self, fields_list):
res = super(MailComposeMessage, self).default_get(fields_list) res = super().default_get(fields_list)
if ( if (
res.get("res_id") res.get("res_id")
and res.get("model") and res.get("model")
@ -49,9 +28,8 @@ class MailComposeMessage(models.TransientModel):
string="Object Attachments", string="Object Attachments",
) )
@api.multi
def get_mail_values(self, res_ids): def get_mail_values(self, res_ids):
res = super(MailComposeMessage, self).get_mail_values(res_ids) res = super().get_mail_values(res_ids)
if self.object_attachment_ids.ids and self.model and len(res_ids) == 1: if self.object_attachment_ids.ids and self.model and len(res_ids) == 1:
res[res_ids[0]].setdefault("attachment_ids", []).extend( res[res_ids[0]].setdefault("attachment_ids", []).extend(
self.object_attachment_ids.ids self.object_attachment_ids.ids