From 008fe974d2fba136c4275527f8250493bb896b29 Mon Sep 17 00:00:00 2001 From: Pedro Spoljaric Gomes Date: Thu, 1 Jun 2023 10:58:46 -0300 Subject: [PATCH] feat: properly includee volumetric weight on xml --- correios/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/correios/client.py b/correios/client.py index 7526f4a..defa878 100644 --- a/correios/client.py +++ b/correios/client.py @@ -440,7 +440,7 @@ def _get_shipping_label_element(self, shipping_label: ShippingLabel): xml_utils.SubElement(item, "numero_etiqueta", text=str(shipping_label.tracking_code)) xml_utils.SubElement(item, "codigo_objeto_cliente") xml_utils.SubElement(item, "codigo_servico_postagem", text=str(shipping_label.service)) - xml_utils.SubElement(item, "cubagem", text=str(Decimal('0.00')).replace(".", ",")) + xml_utils.SubElement(item, "cubagem", text=str(shipping_label.package.volumetric_weight).replace(".", ",")) xml_utils.SubElement(item, "peso", text=str(shipping_label.package.weight)) xml_utils.SubElement(item, "rt1") xml_utils.SubElement(item, "rt2")