Skip to content

Commit 420c268

Browse files
authored
Merge pull request #68 from gisce/78699_documents_en_emails_certificats
Comprovar documents per email certificat
2 parents 5030038 + f40f894 commit 420c268

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

poweremail_signaturit/poweremail_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ def parse_body_html(pem_body_html, pem_body_text):
100100
with open(document_path, 'w') as tmp_document:
101101
tmp_document.write(base64.b64decode(fdata))
102102
documents.append(document_path)
103-
103+
if len(documents) > 1:
104+
raise osv.except_osv("Error", _(u"No se puede envia más de un documento en un email certificado. Se estaban intentando enviar {0} documentos.").format(len(documents)))
104105
response = client.create_email(
105106
files=documents,
106107
recipients=recipients,

0 commit comments

Comments
 (0)