Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1b7c6b5
[ADD] attachment_delete_restrict
yostashiro Aug 28, 2021
b3db51c
[IMP] attachment_delete_restrict: black, isort, prettier
Kev-Roche May 12, 2022
e34ffbe
[MIG] attachment_delete_restrict: Migration to 14.0
Kev-Roche May 12, 2022
37b9cdd
rework module attachment_delete_restrict (to squash after review)
Kev-Roche May 19, 2022
197aa2f
attachment_delete_restrict: refactor test and improve restrict mode n…
sebastienbeau Jul 10, 2022
4d9cd25
attachment_delete_restrict: refactor code
sebastienbeau Jul 10, 2022
90229b4
[UPD] Update attachment_delete_restrict.pot
Sep 1, 2022
7d63001
[UPD] README.rst
OCA-git-bot Sep 1, 2022
5b3c742
[ADD] icon.png
OCA-git-bot Sep 1, 2022
b8ba7f7
Added translation using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2022
aa5c9d2
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2022
2ad9eea
[FIX] attachment_delete_restrict: adapt to Odoo permission change
Feb 13, 2023
58cc53a
attachment_delete_restrict 14.0.1.0.1
OCA-git-bot Feb 14, 2023
781997b
[MIG] attachment_delete_restrict: Migration to 16.0
AungKoKoLin1997 Jul 7, 2023
58f736c
[FIX] attachment_delete_restrict
AungKoKoLin1997 Jul 11, 2023
19d7512
[IMP] attachment_delete_restrict
AungKoKoLin1997 Jul 11, 2023
283be52
attachment_delete_restrict: using sudo should by pass the restriction
sebastienbeau Apr 3, 2025
09a465d
[UPD] Update attachment_delete_restrict.pot
May 28, 2025
a404df6
[BOT] post-merge updates
OCA-git-bot May 28, 2025
a18f792
Added translation using Weblate (Italian)
mymage May 28, 2025
10c4ccf
Translated using Weblate (Italian)
mymage Jun 4, 2025
09b223e
[IMP] attachment_delete_restrict: pre-commit auto fixes
AungKoKoLin1997 Jun 17, 2025
3b188a0
[MIG] attachment_delete_restrict: Migration to 18.0
AungKoKoLin1997 Jun 17, 2025
e38fba1
[ADD] sequence_python
Jan 28, 2021
28e9652
[MIG] sequence_python: Migration to 14.0
OpenCode Sep 23, 2021
cae773c
Added translation using Weblate (Catalan)
ofonseca-pyming Feb 14, 2022
4ddd6f1
Added translation using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2022
c2c5e2b
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2022
25ad8ec
[MIG] sequence_python: Migration to 15.0
epanisset Nov 30, 2022
7a53d31
[MIG] sequence_python: Migration to 16.0
ntsirintanis Jun 20, 2024
e51dd24
Added translation using Weblate (Italian)
mymage Nov 12, 2024
da518a5
Translated using Weblate (Italian)
mymage Nov 13, 2024
36949c7
[IMP] sequence_python: pre-commit auto fixes
BhaveshHeliconia Apr 8, 2025
0862996
[MIG] sequence_python: Migration to 18.0
BhaveshHeliconia Apr 8, 2025
91423c7
[IMP] attachment_delete_restrict: imp readme
AungKoKoLin1997 Aug 22, 2025
cb5ee95
[17.0][ADD] odoo_test_xmlrunner module
madecsmile May 25, 2024
5d9d85e
[BACKPORT] odoo_test_xmlrunner to 16.0
paradoxxxzero Nov 21, 2024
baff1f1
[UPD] Update odoo_test_xmlrunner.pot
Dec 27, 2024
b254366
[BOT] post-merge updates
OCA-git-bot Dec 27, 2024
398280c
[FIX] odoo_test_xmlrunner: set auto_install to False.
legalsylvain Jan 8, 2025
d368d93
[BOT] post-merge updates
OCA-git-bot Jan 8, 2025
0b103b7
Added translation using Weblate (Italian)
mymage Jan 10, 2025
f9de3de
[IMP] odoo_test_xmlrunner: pre-commit auto fixes
paradoxxxzero Sep 30, 2025
3316296
[MIG] odoo_test_xmlrunner: Migration to 18.0
paradoxxxzero Sep 30, 2025
54cd464
[FIX] odoo_test_xmlrunner: Import odoo tests only in test mode
paradoxxxzero Sep 30, 2025
b993275
[FIX] odoo_test_xmlrunner: Patch manually to avoid patch being restor…
paradoxxxzero Sep 30, 2025
5667f5e
[FIX] auditlog: ensure methods from test template are actually run
StefanRijnhart Jan 2, 2026
d9c93ff
Translated using Weblate (Turkish)
bo-eska Jan 22, 2026
fe5a61c
Translated using Weblate (Slovenian)
sysadminmatmoz Jan 22, 2026
63e753f
Translated using Weblate (Slovenian)
sysadminmatmoz Jan 22, 2026
66a8650
[FIX] fetchmail_attach_from_folder tests: mock expunge()
thomaspaulb Jan 25, 2026
61a868f
Merge PR #3485 into 18.0
OCA-git-bot Jan 25, 2026
cf777bf
[BOT] post-merge updates
OCA-git-bot Jan 25, 2026
4758ef5
Merge PR #3258 into 18.0
OCA-git-bot Jan 25, 2026
81de1d0
[UPD] Update sequence_python.pot
Jan 25, 2026
ce786c2
[BOT] post-merge updates
OCA-git-bot Jan 25, 2026
bbb4414
Merge PR #3312 into 18.0
OCA-git-bot Jan 25, 2026
7f9b9b2
[UPD] Update attachment_delete_restrict.pot
Jan 25, 2026
09180fa
[BOT] post-merge updates
OCA-git-bot Jan 25, 2026
d5c6466
[FIX] fetchmail_attach_from_folder: be able to open form view even wh…
thomaspaulb Jan 9, 2025
dc87bfc
[FIX] fetch...folder: use message uid's not sequence
NL66278 Aug 22, 2024
395a021
[FIX] fetch...folder: test message archiving
NL66278 Aug 23, 2024
eb8878e
[FIX] fetch..folder: adapt manual wizard to message_uids
NL66278 Jan 26, 2026
f6a0dd8
Merge PR #3414 into 18.0
OCA-git-bot Jan 28, 2026
a4f8700
[UPD] Update odoo_test_xmlrunner.pot
Jan 28, 2026
107beae
[BOT] post-merge updates
OCA-git-bot Jan 28, 2026
3abe879
Merge PR #3503 into 18.0
OCA-git-bot Jan 28, 2026
c1ca5e6
[UPD] Update fetchmail_attach_from_folder.pot
Jan 28, 2026
7b1952e
[BOT] post-merge updates
OCA-git-bot Jan 28, 2026
dfcf0b5
Update translation files
weblate Jan 28, 2026
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
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[attachment_delete_restrict](attachment_delete_restrict/) | 18.0.1.0.0 | <a href='https://github.com/yostashiro'><img src='https://github.com/yostashiro.png' width='32' height='32' style='border-radius:50%;' alt='yostashiro'/></a> <a href='https://github.com/Kev-Roche'><img src='https://github.com/Kev-Roche.png' width='32' height='32' style='border-radius:50%;' alt='Kev-Roche'/></a> | Restrict Deletion of Attachments
[attachment_queue](attachment_queue/) | 18.0.1.0.0 | <a href='https://github.com/florian-dacosta'><img src='https://github.com/florian-dacosta.png' width='32' height='32' style='border-radius:50%;' alt='florian-dacosta'/></a> <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 adding the concept of queue for processing files
[attachment_synchronize](attachment_synchronize/) | 18.0.1.0.0 | <a href='https://github.com/florian-dacosta'><img src='https://github.com/florian-dacosta.png' width='32' height='32' style='border-radius:50%;' alt='florian-dacosta'/></a> <a href='https://github.com/sebastienbeau'><img src='https://github.com/sebastienbeau.png' width='32' height='32' style='border-radius:50%;' alt='sebastienbeau'/></a> <a href='https://github.com/GSLabIt'><img src='https://github.com/GSLabIt.png' width='32' height='32' style='border-radius:50%;' alt='GSLabIt'/></a> <a href='https://github.com/bealdav'><img src='https://github.com/bealdav.png' width='32' height='32' style='border-radius:50%;' alt='bealdav'/></a> | Attachment Synchronize
[attachment_unindex_content](attachment_unindex_content/) | 18.0.1.0.0 | <a href='https://github.com/moylop260'><img src='https://github.com/moylop260.png' width='32' height='32' style='border-radius:50%;' alt='moylop260'/></a> <a href='https://github.com/ebirbe'><img src='https://github.com/ebirbe.png' width='32' height='32' style='border-radius:50%;' alt='ebirbe'/></a> <a href='https://github.com/luisg123v'><img src='https://github.com/luisg123v.png' width='32' height='32' style='border-radius:50%;' alt='luisg123v'/></a> | Disable indexing of attachments
[auditlog](auditlog/) | 18.0.2.0.5 | | Audit Log
[auditlog](auditlog/) | 18.0.2.0.6 | | Audit Log
[auto_backup](auto_backup/) | 18.0.1.0.1 | | Backups database
[autovacuum_message_attachment](autovacuum_message_attachment/) | 18.0.1.0.1 | <a href='https://github.com/florian-dacosta'><img src='https://github.com/florian-dacosta.png' width='32' height='32' style='border-radius:50%;' alt='florian-dacosta'/></a> | Automatically delete old mail messages and attachments
[base_cron_exclusion](base_cron_exclusion/) | 18.0.1.0.1 | <a href='https://github.com/LoisRForgeFlow'><img src='https://github.com/LoisRForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='LoisRForgeFlow'/></a> <a href='https://github.com/ChrisOForgeFlow'><img src='https://github.com/ChrisOForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='ChrisOForgeFlow'/></a> | Allow you to select scheduled actions that should not run simultaneously.
Expand All @@ -49,7 +50,7 @@ addon | version | maintainers | summary
[database_size](database_size/) | 18.0.1.0.2 | | Database Size
[dbfilter_from_header](dbfilter_from_header/) | 18.0.1.0.0 | | Filter databases with HTTP headers
[excel_import_export](excel_import_export/) | 18.0.1.0.0 | <a href='https://github.com/kittiu'><img src='https://github.com/kittiu.png' width='32' height='32' style='border-radius:50%;' alt='kittiu'/></a> | Base module for developing Excel import/export/report
[fetchmail_attach_from_folder](fetchmail_attach_from_folder/) | 18.0.1.0.0 | <a href='https://github.com/NL66278'><img src='https://github.com/NL66278.png' width='32' height='32' style='border-radius:50%;' alt='NL66278'/></a> | Attach mails in an IMAP folder to existing objects
[fetchmail_attach_from_folder](fetchmail_attach_from_folder/) | 18.0.1.1.0 | <a href='https://github.com/NL66278'><img src='https://github.com/NL66278.png' width='32' height='32' style='border-radius:50%;' alt='NL66278'/></a> | Attach mails in an IMAP folder to existing objects
[fetchmail_notify_error_to_sender](fetchmail_notify_error_to_sender/) | 18.0.1.0.0 | | If fetching mails gives error, send an email to sender
[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
Expand All @@ -58,10 +59,12 @@ addon | version | maintainers | summary
[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.0 | | Automatically update Odoo modules
[module_change_auto_install](module_change_auto_install/) | 18.0.1.0.3 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | Customize auto installables modules by configuration
[odoo_test_xmlrunner](odoo_test_xmlrunner/) | 18.0.1.0.0 | | This module override Odoo testing method to run them with xmlrunner tool.
[onchange_helper](onchange_helper/) | 18.0.1.0.1 | | Technical module that ease execution of onchange in Python code
[rpc_helper](rpc_helper/) | 18.0.1.0.1 | <a href='https://github.com/simahawk'><img src='https://github.com/simahawk.png' width='32' height='32' style='border-radius:50%;' alt='simahawk'/></a> | Helpers for disabling RPC calls
[scheduler_error_mailer](scheduler_error_mailer/) | 18.0.1.0.0 | | Scheduler Error Mailer
[sentry](sentry/) | 18.0.1.0.3 | <a href='https://github.com/barsi'><img src='https://github.com/barsi.png' width='32' height='32' style='border-radius:50%;' alt='barsi'/></a> <a href='https://github.com/naglis'><img src='https://github.com/naglis.png' width='32' height='32' style='border-radius:50%;' alt='naglis'/></a> <a href='https://github.com/versada'><img src='https://github.com/versada.png' width='32' height='32' style='border-radius:50%;' alt='versada'/></a> <a href='https://github.com/moylop260'><img src='https://github.com/moylop260.png' width='32' height='32' style='border-radius:50%;' alt='moylop260'/></a> <a href='https://github.com/fernandahf'><img src='https://github.com/fernandahf.png' width='32' height='32' style='border-radius:50%;' alt='fernandahf'/></a> | Report Odoo errors to Sentry
[sequence_python](sequence_python/) | 18.0.1.0.0 | | Calculate a sequence number from a Python expression
[session_db](session_db/) | 18.0.1.0.1 | <a href='https://github.com/sbidoul'><img src='https://github.com/sbidoul.png' width='32' height='32' style='border-radius:50%;' alt='sbidoul'/></a> | Store sessions in DB
[test_auditlog](test_auditlog/) | 18.0.1.0.3 | | Additional unit tests for Audit Log based on accounting models
[test_base_time_window](test_base_time_window/) | 18.0.1.0.0 | | Test Base model to handle time windows
Expand Down
130 changes: 130 additions & 0 deletions attachment_delete_restrict/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

================================
Restrict Deletion of Attachments
================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a4e29150a223680c72cff93c087f590c9262df96019691a8f3ee6e92b34c2fdd
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/18.0/attachment_delete_restrict
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-attachment_delete_restrict
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides the ability to restrict the deletion of the
attachments at different levels.

**Table of contents**

.. contents::
:local:

Configuration
=============

Select level:
-------------

1. Go to *Settings > General Settings> Permission section*.
2. Choose the level of *Restrict Delete Attachment* for all models by
default or for models with "default" restriction level.

Five levels:
------------

- Default : Use global configuration
- Owner : Owner and admins only
- Custom : Certain groups or users per related model.
- Owner + Custom : Owner, admins and Certain groups or users per related
model.
- None : all users can delete them

Only Custom and Owner + Custom need specific configuration on models.

For Custom and Owner + Custom levels:
-------------------------------------

1. Go to *Settings > Technical > Database Structure > Models*.
2. Open a model for which attachment deletion should be restricted.
3. Select 'Restrict Attachment Deletion', and assign 'Attachment
Deletion Groups' and/or 'Attachment Deletion Users' as necessary (if
no assignment, no one can delete the attachments of this model).

For assigning 'Attachment Deletion Groups'/'Attachment Deletion Users'
to the model, you can alternatively add the model in the 'Attachment
Deletion Models' tab in the respective group/user form.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20attachment_delete_restrict%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Quartile
* Akretion

Contributors
------------

- Yoshi Tashiro <tashiro@quartile.co>
- Kévin Roche <kevin.roche@akretion.com>
- Sébastien BEAU <sebastien.beau@akretion.com>

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.

.. |maintainer-yostashiro| image:: https://github.com/yostashiro.png?size=40px
:target: https://github.com/yostashiro
:alt: yostashiro
.. |maintainer-Kev-Roche| image:: https://github.com/Kev-Roche.png?size=40px
:target: https://github.com/Kev-Roche
:alt: Kev-Roche

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-yostashiro| |maintainer-Kev-Roche|

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/18.0/attachment_delete_restrict>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions attachment_delete_restrict/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions attachment_delete_restrict/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2021 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict Deletion of Attachments",
"version": "18.0.1.0.0",
"depends": [
"base",
"base_setup",
],
"website": "https://github.com/OCA/server-tools",
"author": "Quartile, Akretion, Odoo Community Association (OCA)",
"category": "Tools",
"license": "AGPL-3",
"maintainers": ["yostashiro", "Kev-Roche"],
"data": [
"views/ir_model_views.xml",
"views/res_groups_views.xml",
"views/res_users_views.xml",
"views/res_config_setting_views.xml",
],
"installable": True,
}
Loading