diff --git a/odex25_transactions/exp_transaction_documents/models/configuration.py b/odex25_transactions/exp_transaction_documents/models/configuration.py index a57ee94b4..54d67aa28 100644 --- a/odex25_transactions/exp_transaction_documents/models/configuration.py +++ b/odex25_transactions/exp_transaction_documents/models/configuration.py @@ -98,15 +98,15 @@ class AttachmentRule(models.Model): # if file_size > max_size: # raise ValidationError(_('Attachment %s exceeds the maximum allowed size of 4 MB.') % record.attachment_filename) - @api.onchange('file_save') - def _onchange_file_save(self): - max_size = 4 * 1024 * 1024 # 4 MB - for record in self: - if record.file_save: - file_size = len(base64.b64decode(record.file_save)) - if file_size > max_size: - record.file_save = False - raise UserError(_('Attachment %s exceeds the maximum allowed size of 4 MB.') % record.attachment_filename) + # @api.onchange('file_save') + # def _onchange_file_save(self): + # max_size = 4 * 1024 * 1024 # 4 MB + # for record in self: + # if record.file_save: + # file_size = len(base64.b64decode(record.file_save)) + # if file_size > max_size: + # record.file_save = False + # raise UserError(_('Attachment %s exceeds the maximum allowed size of 4 MB.') % record.attachment_filename) class TransactionTrace(models.Model): _name = 'cm.transaction.trace'