Description
When parsing a valid Factur-X EXTENDED invoice with Document.parse(), the following error is raised:
TypeError: Unknown element {urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100}LineID
The XML is valid against the official Factur-X 1.0.8 EXTENDED XSD schema FACTUR-X_EXTENDED.xsd.
Example:
factur-x.xml
Root cause
In drafthorse/models/references.py, the classes InvoiceReferencedDocument (line 59) and InvoiceSpecifiedReferencedDocument (line 67) are missing the line_id field, although LineID is a valid optional sub-element according to the Factur-X EXTENDED specification.
All other Line*ReferencedDocument classes in the same file already define this field, e.g. LineBuyerOrderReferencedDocument (line 95):
class LineBuyerOrderReferencedDocument(ReferencedDocument):
line_id = StringField(NS_RAM, "LineID", required=False, profile=COMFORT)
...
Description
When parsing a valid Factur-X EXTENDED invoice with
Document.parse(), the following error is raised:The XML is valid against the official Factur-X 1.0.8 EXTENDED XSD schema
FACTUR-X_EXTENDED.xsd.Example:
factur-x.xml
Root cause
In
drafthorse/models/references.py, the classesInvoiceReferencedDocument(line 59) andInvoiceSpecifiedReferencedDocument(line 67) are missing theline_idfield, althoughLineIDis a valid optional sub-element according to the Factur-X EXTENDED specification.All other
Line*ReferencedDocumentclasses in the same file already define this field, e.g.LineBuyerOrderReferencedDocument(line 95):