se adiciona MACHETE para eliminar namespace fe.
* facho/fe/fe.py (FeXML.tostring): Machete. FossilOrigin-Name: eac21dca33c07b1a4973826f0e1e22eaf46f00fdbef9e47c459996ef37e0556e
This commit is contained in:
		| @@ -46,7 +46,13 @@ class FeXML(FachoXML): | ||||
|         self._cn = root.rstrip('/') | ||||
|         #self.find_or_create_element(self._cn) | ||||
|  | ||||
|     # MACHETE se elimina xml namespace fe | ||||
|     def tostring(self, **kw): | ||||
|         return super().tostring(**kw)\ | ||||
|             .replace("fe:", "")\ | ||||
|             .replace("xmlns:fe", "xmlns") | ||||
|  | ||||
|      | ||||
| class DianXMLExtensionCUFE(FachoXMLExtension): | ||||
|     AMBIENTE_PRUEBAS = codelist.TipoAmbiente.by_name('Pruebas')['code'] | ||||
|     AMBIENTE_PRODUCCION = codelist.TipoAmbiente.by_name('Producción')['code'] | ||||
|   | ||||
| @@ -298,8 +298,7 @@ class DIANInvoiceXML(fe.FeXML): | ||||
|     def __init__(self, invoice): | ||||
|         super().__init__('Invoice', 'http://www.dian.gov.co/contratos/facturaelectronica/v1') | ||||
|         self.attach_invoice(invoice) | ||||
|  | ||||
|  | ||||
|      | ||||
|     def set_supplier(fexml, invoice): | ||||
|         fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cbc:AdditionalAccountID', | ||||
|                           invoice.invoice_supplier.organization_code) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user