Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ addon | version | maintainers | summary
[html_text](html_text/) | 18.0.1.0.0 | | Generate excerpts from any HTML field
[iap_alternative_provider](iap_alternative_provider/) | 18.0.1.0.0 | <a href='https://github.com/sebastienbeau'><img src='https://github.com/sebastienbeau.png' width='32' height='32' style='border-radius:50%;' alt='sebastienbeau'/></a> | Base module for providing alternative provider for iap apps
[jsonifier](jsonifier/) | 18.0.1.1.1 | | JSON-ify data for all models
[mail_cleanup](mail_cleanup/) | 18.0.1.0.1 | | Mark as read or delete mails after a set time
[mail_cleanup](mail_cleanup/) | 18.0.1.0.2 | | Mark as read or delete mails after a set time
[mail_template_attachment_per_lang](mail_template_attachment_per_lang/) | 18.0.1.0.0 | | Set language specific attachments on mail templates.
[module_analysis](module_analysis/) | 18.0.1.0.0 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | Add analysis tools regarding installed modules to know which installed modules comes from Odoo Core, OCA, or are custom modules
[module_auto_update](module_auto_update/) | 18.0.1.0.1 | | Automatically update Odoo modules
Expand Down
2 changes: 1 addition & 1 deletion mail_cleanup/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Mail cleanup
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1c8f7c5378b459f9a9fcf644ee4a95a4bc193225e58b73502defbedc4c2d6bf6
!! source digest: sha256:b67f9f7207a78cd4df55008d31ccfb9f7b3d260bd4cccd2fbf2d0ae99fd6a749
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion mail_cleanup/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Mail cleanup",
"version": "18.0.1.0.1",
"version": "18.0.1.0.2",
"category": "Tools",
"summary": "Mark as read or delete mails after a set time",
"author": "Camptocamp, " "Odoo Community Association (OCA)",
Expand Down
3 changes: 1 addition & 2 deletions mail_cleanup/models/fetchmail_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def _cleanup_fetchmail_server(self, server, imap_server):
expiration_date = datetime.date.today()
expiration_date -= relativedelta(days=server.cleanup_days)
search_text = expiration_date.strftime("(UNSEEN BEFORE %d-%b-%Y)")
imap_server.select()
result, data = imap_server.search(None, search_text)
for num in data[0].split():
try:
Expand Down Expand Up @@ -86,7 +85,6 @@ def _purge_fetchmail_server(self, server, imap_server):
purge_date = datetime.date.today()
purge_date -= relativedelta(days=server.purge_days)
search_text = purge_date.strftime("(BEFORE %d-%b-%Y)")
imap_server.select()
result, data = imap_server.search(None, search_text)
for num in data[0].split():
try:
Expand Down Expand Up @@ -122,6 +120,7 @@ def fetch_mail(self, raise_exception=True):
if server.server_type == "imap":
try:
imap_server = server.connect()
imap_server.select()
if server.cleanup_days > 0:
self._cleanup_fetchmail_server(server, imap_server)
if server.purge_days > 0:
Expand Down
2 changes: 1 addition & 1 deletion mail_cleanup/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Mail cleanup</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1c8f7c5378b459f9a9fcf644ee4a95a4bc193225e58b73502defbedc4c2d6bf6
!! source digest: sha256:b67f9f7207a78cd4df55008d31ccfb9f7b3d260bd4cccd2fbf2d0ae99fd6a749
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/18.0/mail_cleanup"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-mail_cleanup"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<div class="section" id="this-module-allows-to">
Expand Down
Loading