]>
git.ipfire.org Git - thirdparty/python-drafthorse.git/log
Raphael Michel [Thu, 29 May 2025 08:49:11 +0000 (10:49 +0200)]
Update README.rst
Hendrik Flamme [Fri, 16 May 2025 14:27:06 +0000 (16:27 +0200)]
fix size=0 Bytes bug (#71)
Raphael Michel [Thu, 17 Apr 2025 09:27:24 +0000 (11:27 +0200)]
Bump to 2025.1.1
Raphael Michel [Thu, 17 Apr 2025 09:26:45 +0000 (11:26 +0200)]
Add missing XML declaration
Hanno Böck [Sun, 6 Apr 2025 07:21:19 +0000 (09:21 +0200)]
Fix README example and remove unused "import os" (#76)
The example code in the README no longer works with the latest version.
A similar example in
https://github.com/pretix/python-drafthorse/blob/master/tests/conftest.py
exists, and uses a Decimal for
doc.trade.settlement.monetary_summation.tax_total
instead of a tuple.
Change README example to do that as well.
Also, remove an unused import ("import os").
Bug: https://github.com/pretix/python-drafthorse/issues/66
Raffael Meyer [Mon, 10 Feb 2025 12:02:43 +0000 (13:02 +0100)]
fix: type hint for electronic address (#65)
Resolves https://github.com/pretix/python-drafthorse/pull/48#discussion_r1929207727
Kevin Leonardic [Mon, 10 Feb 2025 11:43:34 +0000 (12:43 +0100)]
Remove logging overwrite (#72)
Raphael Michel [Wed, 22 Jan 2025 17:18:55 +0000 (18:18 +0100)]
Improve check for missing namespaces
Raphael Michel [Wed, 22 Jan 2025 16:59:48 +0000 (17:59 +0100)]
Bump to 2025.1.0
Raffael Meyer [Wed, 22 Jan 2025 16:12:14 +0000 (17:12 +0100)]
feat: strict mode for parsing (#55)
* feat: strict mode for parsing
* docs: lax and strict parsing and serialization
Raphael Michel [Wed, 22 Jan 2025 16:10:09 +0000 (17:10 +0100)]
Run black
Raphael Michel [Wed, 22 Jan 2025 16:05:00 +0000 (17:05 +0100)]
Fix #57 -- Incorrect readme example
Raphael Michel [Wed, 22 Jan 2025 16:04:12 +0000 (17:04 +0100)]
Fix #63 -- Adjust README examples
Raphael Michel [Wed, 22 Jan 2025 15:58:54 +0000 (16:58 +0100)]
Fix #42 -- Always include all namespaces
Raphael Michel [Wed, 22 Jan 2025 15:40:04 +0000 (16:40 +0100)]
Clean-up XML namespaces
Raphael Michel [Wed, 22 Jan 2025 15:32:53 +0000 (16:32 +0100)]
Install codecov on CI
Raphael Michel [Wed, 22 Jan 2025 15:30:41 +0000 (16:30 +0100)]
Install coverage on CI
Raphael Michel [Wed, 22 Jan 2025 15:27:40 +0000 (16:27 +0100)]
Fix dependencies for CI
Raphael Michel [Wed, 22 Jan 2025 15:16:10 +0000 (16:16 +0100)]
Python 3.13 is not yet ready on github actions
Tobias Gruetzmacher [Wed, 22 Jan 2025 11:00:25 +0000 (12:00 +0100)]
Replace Travis-CI badge with GitHub Actions badge (#49)
Raphael Michel [Wed, 22 Jan 2025 10:56:29 +0000 (11:56 +0100)]
Update Python versions for CI
Raphael Michel [Wed, 22 Jan 2025 10:55:29 +0000 (11:55 +0100)]
Run black
mghiglieri [Wed, 22 Jan 2025 10:55:04 +0000 (11:55 +0100)]
fix for issue #61 (#62)
* fix for issue #61
* Update drafthorse/models/trade.py
---------
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Eetu Purontaus [Wed, 22 Jan 2025 10:53:35 +0000 (12:53 +0200)]
Suppress output intent keyerror (#59)
For non-compliant PDFs, output intent structure may be missing. Rather than logging an error, just debug and return.
Also use the correct logger.exception() instead of error so
the full exception gets logged.
Raffael Meyer [Wed, 22 Jan 2025 10:53:03 +0000 (11:53 +0100)]
feat: support ReceivingAdviceReferencedDocument (#50)
* feat: support ReceivingAdviceReferencedDocument
* fix: set profile to COMFORT
Raffael Meyer [Wed, 22 Jan 2025 10:52:28 +0000 (11:52 +0100)]
fix: supported profile for TradeDelivery members (#56)
Robin Gohmert [Wed, 22 Jan 2025 10:50:30 +0000 (11:50 +0100)]
Fixed cardinality for electronic address (#48)
Raphael Michel [Wed, 22 Jan 2025 10:19:41 +0000 (11:19 +0100)]
Fix ZUGFeRD version
Raphael Michel [Sat, 14 Dec 2024 15:29:51 +0000 (16:29 +0100)]
Updates for ZUGFeRD 2.3 (some things might be missing since the spec's changelog is unclear)
Raphael Michel [Sat, 14 Dec 2024 13:59:10 +0000 (14:59 +0100)]
Fix typo in filename
SourceDoctor [Tue, 19 Nov 2024 14:55:56 +0000 (15:55 +0100)]
more configureable document properties (#41)
Kh3nsu [Tue, 19 Nov 2024 14:05:31 +0000 (15:05 +0100)]
Use https for ferd-net.de (#44)
Changed http://www.ferd-net.de/ to https://www.ferd-net.de.
You will be redirected to https anyway, but it is nicer to specify https directly
Robin Gohmert [Fri, 4 Oct 2024 13:54:23 +0000 (15:54 +0200)]
Added type hints (#36)
* Added type hints
* Run black
---------
Co-authored-by: Raphael Michel <michel@rami.io>
Raphael Michel [Fri, 4 Oct 2024 13:17:18 +0000 (15:17 +0200)]
Fix #33 -- Fix order of EffectiveSpecifiedPeriod
Raphael Michel [Fri, 4 Oct 2024 13:12:12 +0000 (15:12 +0200)]
Fix #32 -- Parsing of amount without currency
Raphael Michel [Sun, 10 Mar 2024 15:55:16 +0000 (16:55 +0100)]
Update version to 2.4.0
Raphael Michel [Sun, 10 Mar 2024 15:53:57 +0000 (16:53 +0100)]
Add statement to README
Raphael Michel [Sun, 10 Mar 2024 15:49:22 +0000 (16:49 +0100)]
Fix missing imports in README
Marko Luther [Sun, 10 Mar 2024 15:47:25 +0000 (16:47 +0100)]
Add xml info to pdf metadata2 (#15)
* Bump to 2.3.0
* PR #7 Include XML information in PDF metadata (cmcproject)
* update mustang validator
* fixes fx:DocumentFileName / fx:DocumentType order
* remove `schemas/ZUGFeRD2p2_extension_schema.xmp` (replaced by `xmp_schema.py` generator)
* removes date and seller from pdf metadata subject to simplify the code and remove hard coded English language
* removes doc type date and seller from pdf metadata subject (incl. the restriction to documents of type 380) to simplify the code and remove hard coded English language
* remove unused (now) unused constant INVOICE_TYPE_CODE and avoid the use of use bare `except`
* removes failing "Invalid doc type! XML value for TypeCode shall be 380 for an invoice." test
* allows to supply explicit profile level and extends profile auto detection to cover XRECHNUNG
* minor code style improvements like lazy % formatting in logging functions (logging-fstring-interpolation)
* fixes style (black)
* tests of auto detecting a XRechnung v2 and v3 profiles
* blacking again
* tests for en16931 auto profile recognition and auto profile recognition failure
* black again
* typo
* allow users to set custom pdf metadata and the PDF language identifier used by PDF readers for blind people
* black
* spelling
* Update drafthorse/pdf.py
* Run black
---------
Co-authored-by: Raphael Michel <michel@rami.io>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Marko Luther [Sun, 10 Mar 2024 15:33:29 +0000 (16:33 +0100)]
Add SpecifiedLegalOrganization (#28)
* adds SpecifiedLegalOrganization
* fixes typo
* adjusted the documentation of LegalOrganization fit for sellers and buyers
* LegalOrganization.id needs to be an IDField
* black
* updates descriptions
* fixes sequence order
* Update drafthorse/models/party.py
* Update drafthorse/models/party.py
---------
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Marko Luther [Sun, 10 Mar 2024 15:28:48 +0000 (16:28 +0100)]
fixes Issue #20, Issue #22, Issue #26 and Issue #29. It replaces PR #21 and PR #23 and contains alignments to the v2.2 specification (#27)
* - corrects the NS_QDT name according to the zugferd22 specification
- extends elements.py:DateTimeElement to allow the adjustment of the inner DateTimes namespace
- updates references.py:ReferencedDocument to use NS_QDT for its DateTimeElement
- corrects profiles in reference.py for various attributes according to the zugferd22 schemata
- adds test zugferd_2p2_EN16931_ElektronischeAdresse2.xml as a variation of the official zugferd22 sample EN16931_ElektronischeAdresse.xml adding a FormattedIssueDateTime to the BuyerOrderReferencedDocument
- moves SellerOrderReferencedDocument from trade.py to references.py
- fixes DateTimeField namespace of AdvancePayment.received_date
* This commit also adds the class ProductInstance (IndividualTradeProductInstance) to product.py and adds the missing fields "id" (IDField) and "instance" (ProductInstance) to product.py:TradeProduct.
This commit also adds class PayerTradeParty (PayerTradeParty) to party.py and adds the missing field "payer" (PayerTradeParty) to trade.py:TradeSettlement.
This commit also removes the unused (and not needed) party.py:LineApplicableTradeTax class.
This commit also corrects profile and required tags according to the v2.2 specification as follows:
- references.py:LineAdditionalReferencedDocument
.name profile COMFORT => BASIC (was COMFORT)
- tradelines.py:LineSettlement
.trade_tax profile COMFORT => BASIC
.period profile COMFORT => BASIC
.allowance_charge profile COMFORT => BASIC
.monetary_summation profile COMFORT => BASIC
.additional_referenced_document profile EXTENDED => COMFORT
.accounting_account profile EXTENDED => COMFORT
- product.py:ProductCharacteristic
.type_code required => optional
.description profile EXTENDED => COMFORT
.value profile EXTENDED => COMFORT
- product.py:ProductClassification
.class_code required => optional; profile EXTENDED => COMFORT
.value required => optional
- product.py:TradeProduct
.name profile COMFORT => BASIC
.characteristics EXTENDED => COMFORT
.classifications EXTENDED => COMFORT
.origins EXTENDED => COMFORT
- trade.py:TradeSettlement
.tax_currency_code profile COMFORT => BASIC
.invoicer profile COMFORT => EXTENDED
.invoicee profile COMFORT => EXTENDED
.payee profile COMFORT => BASIC
.allowance_charge profile COMFORT => BASIC
.service_charge profile COMFORT => EXTENDED
.terms profile COMFORT => BASIC
.accounting_account EXTENDED => BASIC
- accounting.py:ApplicableTradeTax
.exemption_reason COMFORT => BASIC
.category_code COMFORT => BASIC
.exemption_reason_code EXTENDED => BASIC
* fixes profile annotations in TradeAllowanceCharge
* SpecifiedTradeAllowanceCharge:ReasonCode in COMFORT
Marko Luther [Fri, 19 Jan 2024 17:12:14 +0000 (18:12 +0100)]
Corrects the attribute order of ApplicableTradeTax (#19)
* aligns the attribute order of the ApplicableTradeTax class to the TradeTaxType in FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd to fix https://github.com/pretix/python-drafthorse/issues/18
* adds test case
* fix formatting
* sync readme with test_minimal
Marko Luther [Fri, 19 Jan 2024 15:53:23 +0000 (16:53 +0100)]
Fix country_subdivision field (#25)
* fixes PostalTradeAddress
- corrects order of elements
- makes country_id required
- downgrades country_subdivision to profile BASIC
* black formatting
Marko Luther [Mon, 4 Sep 2023 11:43:32 +0000 (13:43 +0200)]
Fixes some typos (Issue #10) (#11)
* Fixes some typos (Issue #10)
* Apply suggestions from code review
---------
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Raphael Michel [Thu, 15 Jun 2023 20:30:09 +0000 (22:30 +0200)]
Fix #9 -- Encoding of Subtype with pypdf
Marius Crisan [Thu, 15 Jun 2023 20:02:20 +0000 (23:02 +0300)]
Update ZUGFeRD XML generation (#8)
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
cmcproject [Tue, 2 May 2023 08:07:52 +0000 (11:07 +0300)]
Upgrade pypdf lib and fix generation issues (#6)
Raphael Michel [Wed, 1 Feb 2023 15:38:06 +0000 (16:38 +0100)]
Bump to 2.2.1
Raphael Michel [Wed, 1 Feb 2023 15:37:53 +0000 (16:37 +0100)]
Fix PyPDF2 deprecation errors
Raphael Michel [Fri, 5 Aug 2022 08:46:10 +0000 (10:46 +0200)]
Update GitLab CI script
Raphael Michel [Fri, 5 Aug 2022 08:45:01 +0000 (10:45 +0200)]
Bump to 2.2.0
Raphael Michel [Fri, 5 Aug 2022 08:44:14 +0000 (10:44 +0200)]
Merge pull request #5 from pretix/2
Raphael Michel [Wed, 3 Aug 2022 15:56:26 +0000 (17:56 +0200)]
Run black
Raphael Michel [Wed, 3 Aug 2022 15:36:04 +0000 (17:36 +0200)]
Add GitHub Actions
Raphael Michel [Wed, 3 Aug 2022 15:33:20 +0000 (17:33 +0200)]
Run black and isort
Raphael Michel [Wed, 3 Aug 2022 15:32:41 +0000 (17:32 +0200)]
Incorporate more data model changes
Raphael Michel [Wed, 3 Aug 2022 12:44:56 +0000 (14:44 +0200)]
Fix PDF embedding
Raphael Michel [Wed, 3 Aug 2022 12:42:51 +0000 (14:42 +0200)]
Add instructions on how to validate with Mustang
Raphael Michel [Wed, 3 Aug 2022 10:55:27 +0000 (12:55 +0200)]
Make samples in README work
Raphael Michel [Wed, 3 Aug 2022 10:51:54 +0000 (12:51 +0200)]
Adjust for new PyPDF version
Raphael Michel [Wed, 3 Aug 2022 10:30:53 +0000 (12:30 +0200)]
Declare internal attributes as internal and prevent adding new attributes
Raphael Michel [Wed, 3 Aug 2022 10:28:33 +0000 (12:28 +0200)]
Fix imports
Raphael Michel [Wed, 3 Aug 2022 10:27:06 +0000 (12:27 +0200)]
Remove unused imports
Raphael Michel [Wed, 3 Aug 2022 10:26:21 +0000 (12:26 +0200)]
Fix incorrect import in tests
Raphael Michel [Wed, 3 Aug 2022 10:26:04 +0000 (12:26 +0200)]
Fix usage of CurrencyField vs DecimalField
Ben Dangelmayr [Tue, 19 Jul 2022 12:33:32 +0000 (14:33 +0200)]
Updated xmp files to zugferd2.2 requirements
Ben Dangelmayr [Tue, 19 Jul 2022 12:11:17 +0000 (14:11 +0200)]
Field correction and updated pdf.py to zugferd2.2
Ben Dangelmayr [Tue, 5 Jul 2022 13:57:24 +0000 (15:57 +0200)]
Corrected field properties
Ben Dangelmayr [Fri, 3 Jun 2022 11:38:42 +0000 (13:38 +0200)]
Added minimum and basic-wl schema,tests completing
Ben Dangelmayr [Fri, 3 Jun 2022 11:03:07 +0000 (13:03 +0200)]
All tests passing for zugferd2.2, code style
Raphael Michel [Tue, 31 May 2022 10:24:59 +0000 (12:24 +0200)]
Keep empty fields in parse/generate roundtrip
Ben Dangelmayr [Tue, 31 May 2022 09:41:48 +0000 (11:41 +0200)]
Added new fields, added XRECHNUNG samples
Raphael Michel [Wed, 18 May 2022 14:30:13 +0000 (16:30 +0200)]
Add diff output to test_roundtip
Raphael Michel [Wed, 18 May 2022 14:30:03 +0000 (16:30 +0200)]
Allow to disable validation
Ben Dangelmayr [Wed, 18 May 2022 13:08:39 +0000 (15:08 +0200)]
zugferd v2.2 partial update
Raphael Michel [Mon, 30 Nov 2020 21:59:27 +0000 (22:59 +0100)]
Fix more tests
Raphael Michel [Mon, 30 Nov 2020 21:49:57 +0000 (22:49 +0100)]
basic passing
Raphael Michel [Mon, 30 Nov 2020 17:54:10 +0000 (18:54 +0100)]
Close to first tests passing
Raphael Michel [Mon, 30 Nov 2020 17:39:42 +0000 (18:39 +0100)]
Validate against new schema
Raphael Michel [Mon, 30 Nov 2020 17:29:53 +0000 (18:29 +0100)]
Commit non working tests
Raphael Michel [Mon, 30 Nov 2020 16:55:00 +0000 (17:55 +0100)]
First version 2 changes
Raphael Michel [Wed, 12 Dec 2018 15:10:27 +0000 (16:10 +0100)]
More linting issues
Raphael Michel [Wed, 12 Dec 2018 15:04:37 +0000 (16:04 +0100)]
Fix code style issues
Raphael Michel [Wed, 12 Dec 2018 15:02:44 +0000 (16:02 +0100)]
Bump version to 1.1.1
Raphael Michel [Wed, 12 Dec 2018 15:00:30 +0000 (16:00 +0100)]
Fix validation errors in for PDF/A-3
Raphael Michel [Tue, 6 Nov 2018 17:43:13 +0000 (18:43 +0100)]
Bump version
Raphael Michel [Mon, 5 Nov 2018 14:20:09 +0000 (15:20 +0100)]
Change differences to other ZUGFerd files
Raphael Michel [Fri, 2 Nov 2018 11:35:11 +0000 (12:35 +0100)]
Add schema
Raphael Michel [Tue, 30 Oct 2018 13:37:27 +0000 (14:37 +0100)]
Bump version
Raphael Michel [Tue, 30 Oct 2018 13:37:10 +0000 (14:37 +0100)]
Return a proper bytestring
Raphael Michel [Tue, 30 Oct 2018 12:55:51 +0000 (13:55 +0100)]
Merge pull request #1 from olf42/master
fix: url in setup.py
olf [Tue, 30 Oct 2018 12:45:34 +0000 (13:45 +0100)]
fix: url in setup.py
* Fixes broken link from PyPI to github
Raphael Michel [Tue, 30 Oct 2018 10:06:05 +0000 (11:06 +0100)]
Add credits
Raphael Michel [Tue, 30 Oct 2018 10:01:16 +0000 (11:01 +0100)]
isort fixes
Raphael Michel [Sun, 28 Oct 2018 14:03:16 +0000 (15:03 +0100)]
Style fixes
Raphael Michel [Sat, 27 Oct 2018 21:25:01 +0000 (23:25 +0200)]
Bump version number
Raphael Michel [Sat, 27 Oct 2018 21:23:56 +0000 (23:23 +0200)]
Add PDF generation
Raphael Michel [Thu, 25 Oct 2018 23:24:02 +0000 (01:24 +0200)]
Fix missing UTF-8 header
Raphael Michel [Thu, 25 Oct 2018 21:49:12 +0000 (23:49 +0200)]
Fix bugs in generation
Raphael Michel [Thu, 25 Oct 2018 21:28:27 +0000 (23:28 +0200)]
Fix flake8 warning