소스 검색

Update ir_attachment.py

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):