-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TA#26490 Add archive button in mail template (#55)
* TA#26490 Add archive button in mail template * TA#26490 Fix codacy issues * Add correct translate file
- Loading branch information
Showing
11 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
|
||
<record id="mail_template_form" model="ir.ui.view"> | ||
<field name="name">Mail Template Form: Add smart button archive</field> | ||
<field name="model">mail.template</field> | ||
<field name="inherit_id" ref="mail.email_template_form"/> | ||
<field name="priority" eval="1"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//div[@class='oe_button_box']/field[@name='ref_ir_act_window']" position="before"> | ||
<button class="oe_stat_button" type="object" name="toggle_active" icon="fa-archive" groups="base.group_system"> | ||
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/> | ||
</button> | ||
</xpath> | ||
|
||
</field> | ||
</record> | ||
|
||
<record id="mail_template_tree" model="ir.ui.view"> | ||
<field name="name">Mail Template Tree: Add filter is archived</field> | ||
<field name="model">mail.template</field> | ||
<field name="inherit_id" ref="mail.view_email_template_search"/> | ||
<field name="priority" eval="1"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='name']" position="before"> | ||
<filter string="Archived" name="filter_archived" domain="[('active', '=', False)]"/> | ||
<filter string="Active" name="filter_active" domain="[('active', '=', True)]"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
|
||
|
||
|
||
</odoo> |