Skip to content

Unknown element LineID when parsing Factur-X EXTENDED invoice with InvoiceReferencedDocument #113

Description

@timounger

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)
    ...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions