From 62700a58d53e0144dd8f20aea8a9486d997f6dd6 Mon Sep 17 00:00:00 2001 From: Flavyo Henrique Date: Tue, 25 Aug 2020 13:27:28 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20na=20serializacao=20da=20t?= =?UTF-8?q?ag=20esp=20em=20volumes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pynfe/processamento/serializacao.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pynfe/processamento/serializacao.py b/pynfe/processamento/serializacao.py index 62bee0f..8cc4a88 100644 --- a/pynfe/processamento/serializacao.py +++ b/pynfe/processamento/serializacao.py @@ -641,7 +641,8 @@ class SerializacaoXML(Serializacao): vol = etree.SubElement(transp, 'vol') if volume.quantidade: etree.SubElement(vol, 'qVol').text = str(volume.quantidade) - etree.SubElement(vol, 'esp').text = volume.especie + if volume.especie: + etree.SubElement(vol, 'esp').text = volume.especie if volume.marca: etree.SubElement(vol, 'marca').text = volume.marca if volume.numeracao: