Unknown element LineID when parsing Factur-X EXTENDED invoice with InvoiceReferencedDocument
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in drafthorse/models/references.py, reading InvoiceReferencedDocument and InvoiceSpecifiedReferencedDocument alongside LineBuyerOrderReferencedDocument and the other Line*ReferencedDocument classes. Run the project’s existing tests, then verify that the supplied Factur-X EXTENDED example parses without an unknown LineID error and that existing reference-document behavior remains intact.
Written by the indexing model from the issue text.
Description
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:
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)
...
- Dominant language
- Python
- Stars
- 178
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pretix/python-drafthorse
-
Difficulty 5/5 Over a week Newbie friendliness 1/100
pretix/python-drafthorse#112 · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 50/100
pretix/python-drafthorse#108 ·
-
help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pretix/python-drafthorse#78 · 3 comments ·
-
help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pretix/python-drafthorse#31 · 1 comment ·
All issues in pretix/python-drafthorse
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100