erickabrego 7 місяців тому
батько
коміт
55a2a1e1a5
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      custom_sat_connection/models/ir_attachment.py

+ 1 - 0
custom_sat_connection/models/ir_attachment.py

@@ -57,6 +57,7 @@ class IrAttachment(models.Model):
             'company_id': self.env.company.id
         }
         attachment = self.env['ir.attachment'].sudo().create(data)
+        self.unlink()
         return self.download_zip(file_name_zip, attachment.id)
 
     def download_zip(self, filename, id_file):