Browse Source

Jan 27: [FIX] Bug Fixed 'size_restriction_for_attachments'

pull/309/head
Cybrosys Technologies 3 months ago
parent
commit
4a728669fe
  1. 2
      size_restriction_for_attachments/__manifest__.py
  2. 5
      size_restriction_for_attachments/controllers/discuss.py
  3. 5
      size_restriction_for_attachments/doc/RELEASE_NOTES.md

2
size_restriction_for_attachments/__manifest__.py

@ -21,7 +21,7 @@
###############################################################################
{
'name': 'Size Restriction for Attachments',
'version': '17.0.1.0.0',
'version': '17.0.1.0.1',
'category': 'Document Management',
'summary': 'Shows an error message if attachment greater '
'than users maximum attachment size.',

5
size_restriction_for_attachments/controllers/discuss.py

@ -21,15 +21,16 @@
###############################################################################
from odoo.exceptions import AccessError
from odoo.http import request
from odoo import _
from odoo import _, http
from odoo.addons.mail.controllers.attachment import AttachmentController
from werkzeug.exceptions import NotFound
class DiscussController(AttachmentController):
@http.route("/mail/attachment/upload", methods=["POST"], type="http", auth="public")
def mail_attachment_upload(self, ufile, thread_id, thread_model,
is_pending=False, **kwargs):
print('super')
thread = request.env[thread_model].search([("id", "=", thread_id)])
if not thread:
raise NotFound()

5
size_restriction_for_attachments/doc/RELEASE_NOTES.md

@ -5,3 +5,8 @@
#### ADD
- Initial commit for Size Restriction For Attachments
#### 24.01.2025
#### Version 17.0.1.0.1
#### BUG FIX
- Fix the warning in the V17 log.
Loading…
Cancel
Save