diff --git a/.docker_files/main/__manifest__.py b/.docker_files/main/__manifest__.py index 7d3cfbd2..3e7d133a 100644 --- a/.docker_files/main/__manifest__.py +++ b/.docker_files/main/__manifest__.py @@ -26,6 +26,7 @@ 'mail_message_from_author', 'mail_notification_no_footer', 'mail_recipient_unchecked', + 'mail_template_archive', 'note_no_default_stage', 'private_data_group', 'queue_job_auto_requeue', diff --git a/Dockerfile b/Dockerfile index 4aa2caec..7faa8d28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,7 @@ COPY mail_follower_picker /mnt/extra-addons/mail_follower_picker COPY mail_message_from_author /mnt/extra-addons/mail_message_from_author COPY mail_notification_no_footer /mnt/extra-addons/mail_notification_no_footer COPY mail_recipient_unchecked /mnt/extra-addons/mail_recipient_unchecked +COPY mail_template_archive /mnt/extra-addons/mail_template_archive COPY note_no_default_stage /mnt/extra-addons/note_no_default_stage COPY private_data_group /mnt/extra-addons/private_data_group COPY queue_job_auto_requeue /mnt/extra-addons/queue_job_auto_requeue diff --git a/mail_template_archive/README.rst b/mail_template_archive/README.rst new file mode 100644 index 00000000..0b66664c --- /dev/null +++ b/mail_template_archive/README.rst @@ -0,0 +1,28 @@ +Mail Enable Archive +=================== +This module enables the 'Archive' smart button in the view form of a mail template. +Furthermore, it adds two filters in the search view: 'Archived' and 'Active'. + +.. contents:: Table of Contents + +Form View +---------- + +The 'Archive' button can be found in the view form of a mail template. + +.. image:: static/description/form_view_smart_button.png + +Search View +------------ + +The 'Archived' and 'Active' filters are in the search view. + +.. image:: static/description/search_view_filter.png + +Contributors +------------ +* Numigi (tm) and all its contributors (https://bit.ly/numigiens) + +More information +---------------- +* Meet us at https://bit.ly/numigi-com \ No newline at end of file diff --git a/mail_template_archive/__init__.py b/mail_template_archive/__init__.py new file mode 100644 index 00000000..cd055e4d --- /dev/null +++ b/mail_template_archive/__init__.py @@ -0,0 +1,4 @@ +# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import models diff --git a/mail_template_archive/__manifest__.py b/mail_template_archive/__manifest__.py new file mode 100644 index 00000000..b6d73c4c --- /dev/null +++ b/mail_template_archive/__manifest__.py @@ -0,0 +1,21 @@ +# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +{ + 'name': 'Mail Template Archive', + 'version': '1.2.0', + 'author': 'Numigi', + 'maintainer': 'Numigi', + 'website': 'https://www.numigi.com', + 'license': 'LGPL-3', + 'category': 'Base', + 'summary': 'A base module to enable mail archiving', + 'depends': [ + 'base', + 'mail', + ], + 'data': [ + 'views/mail_template.xml', + ], + 'installable': True, +} diff --git a/mail_template_archive/i18n/fr.po b/mail_template_archive/i18n/fr.po new file mode 100644 index 00000000..d00c2494 --- /dev/null +++ b/mail_template_archive/i18n/fr.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_template_archive +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-26 18:11+0000\n" +"PO-Revision-Date: 2020-08-26 14:17-0400\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 2.3\n" +"Last-Translator: \n" +"Language: fr\n" + +#. module: mail_template_archive +#: model:ir.model.fields,field_description:mail_template_archive.field_email_template_preview__active +#: model:ir.model.fields,field_description:mail_template_archive.field_mail_template__active +#: model_terms:ir.ui.view,arch_db:mail_template_archive.mail_template_tree +msgid "Active" +msgstr "Actif" + +#. module: mail_template_archive +#: model_terms:ir.ui.view,arch_db:mail_template_archive.mail_template_tree +msgid "Archived" +msgstr "Archivé" + +#. module: mail_template_archive +#: model:ir.model,name:mail_template_archive.model_mail_template +msgid "Email Templates" +msgstr "Modèles de courriel" diff --git a/mail_template_archive/models/__init__.py b/mail_template_archive/models/__init__.py new file mode 100644 index 00000000..fa990a0c --- /dev/null +++ b/mail_template_archive/models/__init__.py @@ -0,0 +1,4 @@ +# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import mail_template diff --git a/mail_template_archive/models/mail_template.py b/mail_template_archive/models/mail_template.py new file mode 100644 index 00000000..00ce59db --- /dev/null +++ b/mail_template_archive/models/mail_template.py @@ -0,0 +1,11 @@ +# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class MailTemplate(models.Model): + _inherit = 'mail.template' + + active = fields.Boolean(string='Active', default=True) + diff --git a/mail_template_archive/static/description/form_view_smart_button.png b/mail_template_archive/static/description/form_view_smart_button.png new file mode 100644 index 00000000..ad2fcca7 Binary files /dev/null and b/mail_template_archive/static/description/form_view_smart_button.png differ diff --git a/mail_template_archive/static/description/search_view_filter.png b/mail_template_archive/static/description/search_view_filter.png new file mode 100644 index 00000000..4fc4bd9c Binary files /dev/null and b/mail_template_archive/static/description/search_view_filter.png differ diff --git a/mail_template_archive/views/mail_template.xml b/mail_template_archive/views/mail_template.xml new file mode 100644 index 00000000..d3f2f34f --- /dev/null +++ b/mail_template_archive/views/mail_template.xml @@ -0,0 +1,35 @@ + + + + + Mail Template Form: Add smart button archive + mail.template + + + + + + + + + + + + Mail Template Tree: Add filter is archived + mail.template + + + + + + + + + + + + + + \ No newline at end of file