Odoo18-Base/addons/portal/controllers/attachment.py

11 lines
404 B
Python
Raw Permalink Normal View History

2025-01-06 10:57:38 +07:00
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mail.controllers.attachment import AttachmentController
class PortalAttachmentController(AttachmentController):
def _is_allowed_to_delete(self, message, **kwargs):
if message._is_editable_in_portal(**kwargs):
return True
return super()._is_allowed_to_delete(message, **kwargs)