diff --git a/mail_attach_existing_attachment/README.rst b/mail_attach_existing_attachment/README.rst new file mode 100644 index 0000000000..95e2deaa9b --- /dev/null +++ b/mail_attach_existing_attachment/README.rst @@ -0,0 +1,99 @@ +=============================== +Mail Attach Existing Attachment +=============================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github + :target: https://github.com/OCA/social/tree/16.0/mail_attach_existing_attachment + :alt: OCA/social +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_attach_existing_attachment + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/205/16.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +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 + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +* Adding some attachments on an object by creating a new *Log note* + +.. figure:: https://raw.githubusercontent.com/OCA/social/16.0/mail_attach_existing_attachment/static/description/attachment.png + :alt: Attachment on purchase order + +* Then, by sending the object via email, you can select the attachment added earlier + +.. figure:: https://raw.githubusercontent.com/OCA/social/16.0/mail_attach_existing_attachment/static/description/ex_mail_compose_message.png + :alt: Sends the Purchase Order by email + +Known issues / Roadmap +====================== + +* The module only allows the addition of attachments linked to the object. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ACSONE SA/NV +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Adrien Peiffer +* `Tecnativa `_: + + * Sergio Teruel + * Ernesto Tejeda + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/social `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_attach_existing_attachment/__init__.py b/mail_attach_existing_attachment/__init__.py new file mode 100644 index 0000000000..40272379f7 --- /dev/null +++ b/mail_attach_existing_attachment/__init__.py @@ -0,0 +1 @@ +from . import wizard diff --git a/mail_attach_existing_attachment/__manifest__.py b/mail_attach_existing_attachment/__manifest__.py new file mode 100644 index 0000000000..40f134bc7a --- /dev/null +++ b/mail_attach_existing_attachment/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2015 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Mail Attach Existing Attachment", + "summary": "Adding attachment on the object by sending this one", + "author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/social", + "category": "Social Network", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["mail"], + "data": ["wizard/mail_compose_message_view.xml"], + "installable": True, +} diff --git a/mail_attach_existing_attachment/i18n/ca.po b/mail_attach_existing_attachment/i18n/ca.po new file mode 100644 index 0000000000..27d5dde930 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/ca.po @@ -0,0 +1,53 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: social (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-13 02:44+0000\n" +"PO-Revision-Date: 2016-06-12 23:57+0000\n" +"Last-Translator: <>\n" +"Language-Team: Catalan (http://www.transifex.com/oca/OCA-social-9-0/language/" +"ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Assistent per composició de correus electrònics" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +msgid "Object Attachments" +msgstr "" diff --git a/mail_attach_existing_attachment/i18n/de.po b/mail_attach_existing_attachment/i18n/de.po new file mode 100644 index 0000000000..2ac0ff00e4 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/de.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +# OCA Transbot , 2016 +# Niki Waibel , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-29 14:24+0000\n" +"PO-Revision-Date: 2016-11-29 14:24+0000\n" +"Last-Translator: Niki Waibel , 2016\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "Kann Anhang anhängen" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Assistent zum Email verfassen" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +#, fuzzy +msgid "Object Attachments" +msgstr "Anhänge" diff --git a/mail_attach_existing_attachment/i18n/es.po b/mail_attach_existing_attachment/i18n/es.po new file mode 100644 index 0000000000..412d165f5a --- /dev/null +++ b/mail_attach_existing_attachment/i18n/es.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +# OCA Transbot , 2017 +# Pedro M. Baeza , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:19+0000\n" +"PO-Revision-Date: 2017-12-01 02:19+0000\n" +"Last-Translator: Pedro M. Baeza , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "Puede adjuntar adjuntos" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Asistente composición Correo Electrónico" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +#, fuzzy +msgid "Object Attachments" +msgstr "Adjuntos" diff --git a/mail_attach_existing_attachment/i18n/es_CO.po b/mail_attach_existing_attachment/i18n/es_CO.po new file mode 100644 index 0000000000..3682fc5ff9 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/es_CO.po @@ -0,0 +1,53 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: social (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-13 02:44+0000\n" +"PO-Revision-Date: 2016-06-12 23:57+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (Colombia) (http://www.transifex.com/oca/OCA-" +"social-9-0/language/es_CO/)\n" +"Language: es_CO\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Asistente de redacción de E-mail" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +msgid "Object Attachments" +msgstr "" diff --git a/mail_attach_existing_attachment/i18n/fr.po b/mail_attach_existing_attachment/i18n/fr.po new file mode 100644 index 0000000000..b2b4adb9c5 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/fr.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +# OCA Transbot , 2016 +# Quentin THEURET , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-22 09:45+0000\n" +"PO-Revision-Date: 2017-07-22 09:45+0000\n" +"Last-Translator: Quentin THEURET , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "Il est possible d'attacher des pièces jointes" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Assistant de composition de courriel" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +#, fuzzy +msgid "Object Attachments" +msgstr "Pièces jointes" diff --git a/mail_attach_existing_attachment/i18n/he.po b/mail_attach_existing_attachment/i18n/he.po new file mode 100644 index 0000000000..9da5d64965 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/he.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-10-19 08:08+0000\n" +"Last-Translator: Yves Goldberg \n" +"Language-Team: none\n" +"Language: he\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && " +"n % 10 == 0) ? 2 : 3));\n" +"X-Generator: Weblate 3.10\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "ניתן לצרף קובץ מצורף" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "אשף יצירת דואר אלקטרוני" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +msgid "Object Attachments" +msgstr "קבצים מצורפים לאובייקט" diff --git a/mail_attach_existing_attachment/i18n/hr.po b/mail_attach_existing_attachment/i18n/hr.po new file mode 100644 index 0000000000..127ca01cfb --- /dev/null +++ b/mail_attach_existing_attachment/i18n/hr.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +# Bole , 2016 +msgid "" +msgstr "" +"Project-Id-Version: social (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-13 02:44+0000\n" +"PO-Revision-Date: 2016-06-14 11:29+0000\n" +"Last-Translator: Bole \n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-social-9-0/" +"language/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "Može pridružiti privitak" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Čarobnjak za sastavljanje maila" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +#, fuzzy +msgid "Object Attachments" +msgstr "Privitci" diff --git a/mail_attach_existing_attachment/i18n/it.po b/mail_attach_existing_attachment/i18n/it.po new file mode 100644 index 0000000000..83e95e83c6 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/it.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +# OCA Transbot , 2016 +# Marius Marolla , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-17 01:02+0000\n" +"PO-Revision-Date: 2017-05-17 01:02+0000\n" +"Last-Translator: Marius Marolla , 2017\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "Inserimento Allegati Ammesso" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Wizard Creazione Email" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +#, fuzzy +msgid "Object Attachments" +msgstr "Allegati" diff --git a/mail_attach_existing_attachment/i18n/mail_attach_existing_attachment.pot b/mail_attach_existing_attachment/i18n/mail_attach_existing_attachment.pot new file mode 100644 index 0000000000..37e913b7ac --- /dev/null +++ b/mail_attach_existing_attachment/i18n/mail_attach_existing_attachment.pot @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +msgid "Object Attachments" +msgstr "" diff --git a/mail_attach_existing_attachment/i18n/pt_BR.po b/mail_attach_existing_attachment/i18n/pt_BR.po new file mode 100644 index 0000000000..ef1cf65a44 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/pt_BR.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +# Armando Vulcano Junior , 2015 +msgid "" +msgstr "" +"Project-Id-Version: social (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-13 02:44+0000\n" +"PO-Revision-Date: 2019-08-26 16:01+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-" +"social-9-0/language/pt_BR/)\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.8\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "Pode Anexar Anexo" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Assistente de Composição de Email" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +msgid "Object Attachments" +msgstr "Anexos de Objeto" diff --git a/mail_attach_existing_attachment/i18n/sl.po b/mail_attach_existing_attachment/i18n/sl.po new file mode 100644 index 0000000000..7e3e4e4c70 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/sl.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: social (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-13 02:44+0000\n" +"PO-Revision-Date: 2020-03-19 10:13+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-social-9-0/" +"language/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 3.10\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "Lahko pripenja priponke" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "Čarovnik za sestavljanje e-pošte" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +msgid "Object Attachments" +msgstr "Priponke objekta" diff --git a/mail_attach_existing_attachment/i18n/zh_CN.po b/mail_attach_existing_attachment/i18n/zh_CN.po new file mode 100644 index 0000000000..81713acbe2 --- /dev/null +++ b/mail_attach_existing_attachment/i18n/zh_CN.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_attach_existing_attachment +# +# Translators: +# Jeffery Chenn , 2016 +msgid "" +msgstr "" +"Project-Id-Version: social (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-09-02 00:46+0000\n" +"PO-Revision-Date: 2016-09-04 05:54+0000\n" +"Last-Translator: Jeffery Chenn \n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-social-9-0/" +"language/zh_CN/)\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. 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_account_tour_upload_bill__can_attach_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__can_attach_attachment +msgid "Can Attach Attachment" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message +msgid "Email composition wizard" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__id +msgid "ID" +msgstr "" + +#. module: mail_attach_existing_attachment +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message____last_update +msgid "Last Modified on" +msgstr "" + +#. 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_account_tour_upload_bill__object_attachment_ids +#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message__object_attachment_ids +#, fuzzy +msgid "Object Attachments" +msgstr "附件" diff --git a/mail_attach_existing_attachment/readme/CONTRIBUTORS.rst b/mail_attach_existing_attachment/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..4113412635 --- /dev/null +++ b/mail_attach_existing_attachment/readme/CONTRIBUTORS.rst @@ -0,0 +1,6 @@ +* Adrien Peiffer +* Benoit Aimont +* `Tecnativa `_: + + * Sergio Teruel + * Ernesto Tejeda diff --git a/mail_attach_existing_attachment/readme/DESCRIPTION.rst b/mail_attach_existing_attachment/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..189719c21e --- /dev/null +++ b/mail_attach_existing_attachment/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +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 diff --git a/mail_attach_existing_attachment/readme/ROADMAP.rst b/mail_attach_existing_attachment/readme/ROADMAP.rst new file mode 100644 index 0000000000..5d24095fd1 --- /dev/null +++ b/mail_attach_existing_attachment/readme/ROADMAP.rst @@ -0,0 +1 @@ +* The module only allows the addition of attachments linked to the object. diff --git a/mail_attach_existing_attachment/readme/USAGE.rst b/mail_attach_existing_attachment/readme/USAGE.rst new file mode 100644 index 0000000000..68fac75449 --- /dev/null +++ b/mail_attach_existing_attachment/readme/USAGE.rst @@ -0,0 +1,11 @@ +To use this module, you need to: + +* Add some attachments on an object by creating a new *Log note* + +.. figure:: ../static/description/attachment.png + :alt: Attachment on purchase order + +* Then, by sending the object via email, you can select the attachment added earlier + +.. figure:: ../static/description/ex_mail_compose_message.png + :alt: Sends the Purchase Order by email diff --git a/mail_attach_existing_attachment/static/description/attachment.png b/mail_attach_existing_attachment/static/description/attachment.png new file mode 100644 index 0000000000..0a6c2c23b7 Binary files /dev/null and b/mail_attach_existing_attachment/static/description/attachment.png differ diff --git a/mail_attach_existing_attachment/static/description/ex_mail_compose_message.png b/mail_attach_existing_attachment/static/description/ex_mail_compose_message.png new file mode 100644 index 0000000000..c6437475a4 Binary files /dev/null and b/mail_attach_existing_attachment/static/description/ex_mail_compose_message.png differ diff --git a/mail_attach_existing_attachment/static/description/icon.png b/mail_attach_existing_attachment/static/description/icon.png new file mode 100644 index 0000000000..0b6c4d8956 Binary files /dev/null and b/mail_attach_existing_attachment/static/description/icon.png differ diff --git a/mail_attach_existing_attachment/static/description/index.html b/mail_attach_existing_attachment/static/description/index.html new file mode 100644 index 0000000000..db022f9a42 --- /dev/null +++ b/mail_attach_existing_attachment/static/description/index.html @@ -0,0 +1,450 @@ + + + + + + +Mail Attach Existing Attachment + + + +
+

Mail Attach Existing Attachment

+ + +

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runbot

+

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

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Adding some attachments on an object by creating a new Log note
  • +
+
+Attachment on purchase order +
+
    +
  • Then, by sending the object via email, you can select the attachment added earlier
  • +
+
+Sends the Purchase Order by email +
+
+
+

Known issues / Roadmap

+
    +
  • The module only allows the addition of attachments linked to the object.
  • +
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • ACSONE SA/NV
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/social project on GitHub.

+

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

+
+
+
+ + diff --git a/mail_attach_existing_attachment/tests/__init__.py b/mail_attach_existing_attachment/tests/__init__.py new file mode 100644 index 0000000000..01f264cc16 --- /dev/null +++ b/mail_attach_existing_attachment/tests/__init__.py @@ -0,0 +1 @@ +from . import test_mail_attach_existing_attachment diff --git a/mail_attach_existing_attachment/tests/test_mail_attach_existing_attachment.py b/mail_attach_existing_attachment/tests/test_mail_attach_existing_attachment.py new file mode 100644 index 0000000000..d762a36b7a --- /dev/null +++ b/mail_attach_existing_attachment/tests/test_mail_attach_existing_attachment.py @@ -0,0 +1,37 @@ +# Copyright 2015 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tests import common + + +class TestAttachExistingAttachment(common.TransactionCase): + def setUp(self): + super().setUp() + self.partner_obj = self.env["res.partner"] + self.partner_01 = self.env["res.partner"].create( + { + "name": "Partner 1", + "email": "partner1@example.org", + "is_company": True, + "parent_id": False, + } + ) + + def test_send_email_attachment(self): + attach1 = self.env["ir.attachment"].create( + { + "name": "Attach1", + "datas": "bWlncmF0aW9uIHRlc3Q=", + "res_model": "res.partner", + "res_id": self.partner_01.id, + } + ) + vals = { + "model": "res.partner", + "partner_ids": [(6, 0, [self.partner_01.id])], + "res_id": self.partner_01.id, + "object_attachment_ids": [(6, 0, [attach1.id])], + } + mail = self.env["mail.compose.message"].create(vals) + values = mail.get_mail_values([self.partner_01.id]) + self.assertTrue(attach1.id in values[self.partner_01.id]["attachment_ids"]) diff --git a/mail_attach_existing_attachment/wizard/__init__.py b/mail_attach_existing_attachment/wizard/__init__.py new file mode 100644 index 0000000000..b528d997d1 --- /dev/null +++ b/mail_attach_existing_attachment/wizard/__init__.py @@ -0,0 +1 @@ +from . import mail_compose_message diff --git a/mail_attach_existing_attachment/wizard/mail_compose_message.py b/mail_attach_existing_attachment/wizard/mail_compose_message.py new file mode 100644 index 0000000000..671bb987c7 --- /dev/null +++ b/mail_attach_existing_attachment/wizard/mail_compose_message.py @@ -0,0 +1,37 @@ +# Copyright 2015 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class MailComposeMessage(models.TransientModel): + _inherit = "mail.compose.message" + + @api.model + def default_get(self, fields_list): + res = super().default_get(fields_list) + if ( + res.get("res_id") + and res.get("model") + and res.get("composition_mode", "") != "mass_mail" + and not res.get("can_attach_attachment") + ): + res["can_attach_attachment"] = True # pragma: no cover + return res + + can_attach_attachment = fields.Boolean() + object_attachment_ids = fields.Many2many( + comodel_name="ir.attachment", + relation="mail_compose_message_ir_attachments_object_rel", + column1="wizard_id", + column2="attachment_id", + string="Object Attachments", + ) + + def get_mail_values(self, res_ids): + res = super().get_mail_values(res_ids) + if self.object_attachment_ids.ids and self.model and len(res_ids) == 1: + res[res_ids[0]].setdefault("attachment_ids", []).extend( + self.object_attachment_ids.ids + ) + return res diff --git a/mail_attach_existing_attachment/wizard/mail_compose_message_view.xml b/mail_attach_existing_attachment/wizard/mail_compose_message_view.xml new file mode 100644 index 0000000000..d75bdc9fe8 --- /dev/null +++ b/mail_attach_existing_attachment/wizard/mail_compose_message_view.xml @@ -0,0 +1,23 @@ + + + + mail.compose.message.form (mail_attach_existing_attachment) + mail.compose.message + + + + +
+
+ +
+
+
+
+
diff --git a/setup/mail_attach_existing_attachment/odoo/addons/mail_attach_existing_attachment b/setup/mail_attach_existing_attachment/odoo/addons/mail_attach_existing_attachment new file mode 120000 index 0000000000..d7f3725c93 --- /dev/null +++ b/setup/mail_attach_existing_attachment/odoo/addons/mail_attach_existing_attachment @@ -0,0 +1 @@ +../../../../mail_attach_existing_attachment \ No newline at end of file diff --git a/setup/mail_attach_existing_attachment/setup.py b/setup/mail_attach_existing_attachment/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/mail_attach_existing_attachment/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)