Skip to content

Commit 30ccbf9

Browse files
authored
Merge pull request OCA#772 from OCA/14.0
Syncing from upstream OCA/server-tools (14.0)
2 parents 6007e64 + 3f47cac commit 30ccbf9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3568
-175
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ addon | version | maintainers | summary
2222
[attachment_unindex_content](attachment_unindex_content/) | 14.0.1.0.0 | [![moylop260](https://github.com/moylop260.png?size=30px)](https://github.com/moylop260) [![ebirbe](https://github.com/ebirbe.png?size=30px)](https://github.com/ebirbe) | Disable indexing of attachments
2323
[auditlog](auditlog/) | 14.0.1.1.1 | | Audit Log
2424
[auto_backup](auto_backup/) | 14.0.1.0.0 | | Backups database
25+
[autovacuum_message_attachment](autovacuum_message_attachment/) | 14.0.1.0.0 | | Automatically delete old mail messages and attachments
2526
[base_cron_exclusion](base_cron_exclusion/) | 14.0.1.0.0 | [![LoisRForgeFlow](https://github.com/LoisRForgeFlow.png?size=30px)](https://github.com/LoisRForgeFlow) | Allow you to select scheduled actions that should not run simultaneously.
2627
[base_exception](base_exception/) | 14.0.1.0.3 | | This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...)
2728
[base_jsonify](base_jsonify/) | 14.0.1.1.0 | | Base module that provide the jsonify method on all models
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
======================================
2+
AutoVacuum Mail Message and Attachment
3+
======================================
4+
5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Beta
13+
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
15+
:alt: License: LGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
17+
:target: https://github.com/OCA/server-tools/tree/14.0/autovacuum_message_attachment
18+
:alt: OCA/server-tools
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-autovacuum_message_attachment
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23+
:target: https://runbot.odoo-community.org/runbot/149/14.0
24+
:alt: Try me on Runbot
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
28+
Odoo create a lot of message and/or mails. With time it can slow the system or take a lot of disk space.
29+
The goal of this module is to clean these message once they are obsolete.
30+
The same may happen with attachment that we store.
31+
You can choose various criterias manage which messages you want to delete automatically.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Configuration
39+
=============
40+
41+
* Go to the menu configuration => Technical => Email => Message And Attachment Vacuum Rules
42+
* Add the adequates rules for your company. On each rule, you can indicate the models, type and subtypes for which you want to delete the messages, along with a retention time (in days). Or for attachment, you can specify a substring of the name.
43+
* Activate the cron AutoVacuum Mails and Messages and/or AutoVacuum Attachments
44+
45+
It is recommanded to run it frequently and when the system is not very loaded.
46+
(For instance : once a day, during the night.)
47+
48+
Known issues / Roadmap
49+
======================
50+
51+
You have to be careful with rules regarding attachment deletion because Odoo find the attachment to delete with their name.
52+
Odoo will find all attachments containing the substring configured on the rule, so you have to be specific enough on the other criterias (concerned models...) to avoid unwanted attachment deletion.
53+
54+
Bug Tracker
55+
===========
56+
57+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
58+
In case of trouble, please check there if your issue has already been reported.
59+
If you spotted it first, help us smashing it by providing a detailed and welcomed
60+
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20autovacuum_message_attachment%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
61+
62+
Do not contact contributors directly about support or help with technical issues.
63+
64+
Credits
65+
=======
66+
67+
Authors
68+
~~~~~~~
69+
70+
* Akretion
71+
72+
Contributors
73+
~~~~~~~~~~~~
74+
75+
* Florian da Costa <[email protected]>
76+
* Enric Tobella <[email protected]>
77+
* Helly kapatel <[email protected]>
78+
79+
Maintainers
80+
~~~~~~~~~~~
81+
82+
This module is maintained by the OCA.
83+
84+
.. image:: https://odoo-community.org/logo.png
85+
:alt: Odoo Community Association
86+
:target: https://odoo-community.org
87+
88+
OCA, or the Odoo Community Association, is a nonprofit organization whose
89+
mission is to support the collaborative development of Odoo features and
90+
promote its widespread use.
91+
92+
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/14.0/autovacuum_message_attachment>`_ project on GitHub.
93+
94+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (C) 2018 Akretion
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
3+
4+
{
5+
"name": "AutoVacuum Mail Message and Attachment",
6+
"version": "14.0.1.0.0",
7+
"category": "Tools",
8+
"website": "https://github.com/OCA/server-tools",
9+
"author": "Akretion, Odoo Community Association (OCA)",
10+
"license": "LGPL-3",
11+
"installable": True,
12+
"summary": "Automatically delete old mail messages and attachments",
13+
"depends": ["mail"],
14+
"data": ["data/data.xml", "views/rule_vacuum.xml", "security/ir.model.access.csv"],
15+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="ir_cron_vacuum_message" model="ir.cron">
4+
<field name="name">AutoVacuum Mails and Messages</field>
5+
<field eval="False" name="active" />
6+
<field name="user_id" ref="base.user_root" />
7+
<field name="interval_number">1</field>
8+
<field name="interval_type">days</field>
9+
<field name="numbercall">-1</field>
10+
<field name="state">code</field>
11+
<field name="code">model.autovacuum('message')</field>
12+
<field eval="False" name="doall" />
13+
<field name="model_id" ref="mail.model_mail_message" />
14+
</record>
15+
<record id="ir_cron_vacuum_attachment" model="ir.cron">
16+
<field name="name">AutoVacuum Attachments</field>
17+
<field eval="False" name="active" />
18+
<field name="user_id" ref="base.user_root" />
19+
<field name="interval_number">1</field>
20+
<field name="interval_type">days</field>
21+
<field name="numbercall">-1</field>
22+
<field name="state">code</field>
23+
<field name="code">model.autovacuum('attachment')</field>
24+
<field eval="False" name="doall" />
25+
<field name="model_id" ref="base.model_ir_attachment" />
26+
</record>
27+
</odoo>
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * autovacuum_mail_message
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 9.0c\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: <>\n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: autovacuum_mail_message
17+
#: selection:message.vacuum.rule,message_type:0
18+
msgid "All"
19+
msgstr ""
20+
21+
#. module: autovacuum_mail_message
22+
#: selection:message.vacuum.rule,message_type:0
23+
msgid "Comment"
24+
msgstr ""
25+
26+
#. module: autovacuum_mail_message
27+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_company_id
28+
msgid "Company"
29+
msgstr ""
30+
31+
#. module: autovacuum_mail_message
32+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_create_uid
33+
msgid "Created by"
34+
msgstr ""
35+
36+
#. module: autovacuum_mail_message
37+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_create_date
38+
msgid "Created on"
39+
msgstr ""
40+
41+
#. module: autovacuum_mail_message
42+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_display_name
43+
msgid "Display Name"
44+
msgstr ""
45+
46+
#. module: autovacuum_mail_message
47+
#: selection:message.vacuum.rule,message_type:0
48+
msgid "Email"
49+
msgstr ""
50+
51+
#. module: autovacuum_mail_message
52+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_empty_subtype
53+
msgid "Empty subtype"
54+
msgstr ""
55+
56+
#. module: autovacuum_mail_message
57+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_id
58+
msgid "ID"
59+
msgstr ""
60+
61+
#. module: autovacuum_mail_message
62+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule___last_update
63+
msgid "Last Modified on"
64+
msgstr ""
65+
66+
#. module: autovacuum_mail_message
67+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_write_uid
68+
msgid "Last Updated by"
69+
msgstr ""
70+
71+
#. module: autovacuum_mail_message
72+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_write_date
73+
msgid "Last Updated on"
74+
msgstr ""
75+
76+
#. module: autovacuum_mail_message
77+
#: model:ir.model,name:autovacuum_mail_message.model_mail_message
78+
msgid "Message"
79+
msgstr ""
80+
81+
#. module: autovacuum_mail_message
82+
#: model:ir.ui.view,arch_db:autovacuum_mail_message.message_vacuum_rule_form_view
83+
msgid "Message Models"
84+
msgstr ""
85+
86+
#. module: autovacuum_mail_message
87+
#: model:ir.ui.view,arch_db:autovacuum_mail_message.message_vacuum_rule_form_view
88+
msgid "Message Subtypes"
89+
msgstr ""
90+
91+
#. module: autovacuum_mail_message
92+
#: model:ir.actions.act_window,name:autovacuum_mail_message.action_message_vacuum_rule
93+
#: model:ir.ui.menu,name:autovacuum_mail_message.menu_action_message_vacuum_rule
94+
#: model:ir.ui.view,arch_db:autovacuum_mail_message.message_vacuum_rule_form_view
95+
msgid "Message Vacuum Rule"
96+
msgstr ""
97+
98+
#. module: autovacuum_mail_message
99+
#: model:ir.model.fields,help:autovacuum_mail_message.field_message_vacuum_rule_message_subtype_ids
100+
msgid "Message subtypes concerned by the rule. If left empty, the system won't take the subtype into account to find the messages to delete"
101+
msgstr ""
102+
103+
#. module: autovacuum_mail_message
104+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_message_type
105+
msgid "Message type"
106+
msgstr ""
107+
108+
#. module: autovacuum_mail_message
109+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_model_ids
110+
msgid "Models"
111+
msgstr ""
112+
113+
#. module: autovacuum_mail_message
114+
#: model:ir.model.fields,help:autovacuum_mail_message.field_message_vacuum_rule_model_ids
115+
msgid "Models concerned by the rule. If left empty, it will take all models into account"
116+
msgstr ""
117+
118+
#. module: autovacuum_mail_message
119+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_name
120+
msgid "Name"
121+
msgstr ""
122+
123+
#. module: autovacuum_mail_message
124+
#: model:ir.model.fields,help:autovacuum_mail_message.field_message_vacuum_rule_retention_time
125+
msgid "Number of days the messages concerned by this rule will be keeped in the database after creation. Once the delay is passed, they will be automatically deleted."
126+
msgstr ""
127+
128+
#. module: autovacuum_mail_message
129+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_retention_time
130+
msgid "Retention time"
131+
msgstr ""
132+
133+
#. module: autovacuum_mail_message
134+
#: model:ir.model,name:autovacuum_mail_message.model_message_vacuum_rule
135+
msgid "Rules Used to delete message historic"
136+
msgstr ""
137+
138+
#. module: autovacuum_mail_message
139+
#: model:ir.model.fields,field_description:autovacuum_mail_message.field_message_vacuum_rule_message_subtype_ids
140+
msgid "Subtypes"
141+
msgstr ""
142+
143+
#. module: autovacuum_mail_message
144+
#: selection:message.vacuum.rule,message_type:0
145+
msgid "System notification"
146+
msgstr ""
147+
148+
#. module: autovacuum_mail_message
149+
#: model:ir.model.fields,help:autovacuum_mail_message.field_message_vacuum_rule_empty_subtype
150+
msgid "Take also into account messages with no subtypes"
151+
msgstr ""
152+
153+
#. module: autovacuum_mail_message
154+
#: code:addons/autovacuum_mail_message/models/message_vacuum_rule.py:48
155+
#, python-format
156+
msgid "The Retention Time can't be 0 days"
157+
msgstr ""
158+

0 commit comments

Comments
 (0)