Changelog¶
This file contains a brief summary of new features and dependency changes or releases, in reverse chronological order.
4.1.5¶
- The Receipt admin now includes links to each Receipt’s PDF.
- Enable editing
related_receiptsas auto-complete fields (Django >= 2.0 only).
4.1.4¶
- Fix stylesheets for PDFs failing to load on non-filesystem storages.
4.1.3¶
- Fix issues reading keys and certificates from non-filesystem storages.
4.1.2¶
- Fix some issues rendering PDFs when not using the default static files app.
4.1.1¶
- Fix service dates (
None) being shown for product-only receipts.
4.1.0¶
- All migrations have been squashed. Please upgrade to 4.0.0 before upgrading further. See the docs for details.
- Support for adding custom logos to printable receipts has been added. See the
new
TaxPayerExtrasclass for details.
4.0.0¶
- The
ReceiptPDF.save_pdf_tomethod has been removed. - The
active_sincefield has been moved fromTaxPayerProfiletoTaxPayer. - Invoices in the admin will show a small asterisk if their value in the original currency doesn’t match their value in ARS.
- The
ReceiptPDFclass now has a newclient_vat_conditionfield. Newly created instances must define this non-nullable field. ReceiptPDFinstances will now auto-generate the PDF file when they are saved if the receipt has been validated. Note that they are only generated ONCE, and regeneration must be done manually.- Added a new
ReceiptPDFDisplayView, that shows a PDF without prompting users to download it. - Only minimal dependencies are now specified, rather that pinned versions (this should avoid silly conflicts with other libraries requiring newer versions).
ReceiptEntry.vatis now blankable, making forms and admins less confusing.- Remove old monkey-patching code for the
sslmodule. This no longer seems to be necessary. - Fix issues displaying static files in receipts when not running in development mode.
ReceiptPDF.client_addresscan now be blank, given that this field may be absent for certain receipt types.- Added
total_vatandtotal_taxproperties toReceipt. This should be pretty self-explanatory.
3.3.0¶
- The
ReceiptPDF.save_pdf_tomethod has been deprecated and will be removed in 4.0.0. - VAT conditions in models are now limited to know types – this should very much help create UIs and forms. If you come across a missing VAT condition, please open an issue for it.
- Improved the documentation surrounding PDF generation.
3.2.1¶
- Use CAE expirations for receipt barcodes, not receipt expiration. This is the behaviour follows by AFIP’s own generators, even though the spec doesn’t explicitly state this.
3.2.0¶
- New runtime dependency: pyBarcode>=0.8b1.
- The receipt class now has a
is_validatedproperty to check if a single instance has been validated. - All internal errors now raise
DjangoAfipExceptionor a subclass of it. - Add barcodes to receipt PDFs (AFIP 1702/04).
- TaxPayer certs are now blankable, which should improve admin usability, as well as make forms for new TaxPayers friendlier. You might need to check your forms if users are expected to always provide a certificate.
- Certificate expiration dates are now stored (via a pre-save hook) and exposed
by the
TaxPayermodel. This should also make it impossible to upload garbage instead of a proper certificate file.
3.1.0¶
- Receipt entries are now shown in the Receipts admin.
- Fix receipt entries being mis-rendered (missing quantity) in PDFs.
- Allow generating PDFs for receipts via the admin.
- Use PES (ARS) as a default currency for Receipts (only if metadata is present), and ‘1’ as a currency quote.
- Customized admins are now included for a few more models.
3.0.0¶
- The entire
ReceiptBatchmodel has been dropped, along withValidation. Receipts are now validated via Receipt querysets, eg:Receipt.objects.filter(...).validate(). The existingReceiptValidationobjects remain unchanged. - Validation of Receipts can now be done in a single action via the
Receiptadmin. Receiptinstances have a newvalidate()method to validate that single receipt.- The
receiptnumbertag is now deprecated. UseReceipt.formatted_numberinstead.
2.7.0¶
- Drop support for Django 1.9, support Django 1.11.
- The default ordering of
Receiptinstances has now changed, both via querysets and in the admin. - The total amount for receipts is not shown in ARS.
- CI now run tests with all supported Python and Django versions.
- This version has experimental Django 2.0 support.
- Include a new ReceiptPDF admin.
- All exceptions now inherit from
DjangoAfipException.
2.6.1¶
- Language settings of downstream apps should no longer generate bogus
migrations for
django-afip.
2.6.0¶
- It is now possible to generate keys and CSRs for taxpayers, both programmatically, and via the admin.
- The
AuthTicket.authorizemethod no longer takes asaveargument. Authorized tickets are now always immediately saved. - Add a missing migration.
2.5.1¶
- Fix an error validating receipts with not VAT or Tax.
2.5.0¶
- We now rely on
zeep, rathersuds, update your dependencies accordingly.
2.4.0¶
- Raise
CertificateExpired,UntrustedCertificateorAuthenticationErrorwhen attempting an authentication fail. - The field
ReceiptEntry.amounthas been renamed toquantity. - Add a links to documentation on where to obtain the AFIP WS certificates.
- Introduce this changelog.
2.3.1¶
- Fix inconsistencies in the return type for
ReceiptBatch.validate(). - Fix bad file names in PDF views.
v2.3.0¶
- Switched from
suds-py3tosuds-redux. This should make installation a lot easier, since the latter is available on PyPI.
v2.2.1¶
- Fix a crash when fetching more than one point of sale.
v2.2.0¶
- Add support for Django 1.10.
- The
profileparameter has been dropped from theReceiptPDF.create_for_receiptmethod. - Use PyOpenSSL to sign authentication tickets.
- Dropped runtime dependency: The
opensslbinary is no longer required. - Added runtime dependency:
pyOpenSSL.
v2.1.2¶
- The package version is not exposed via
django_afip.__version__ - Lots of documentation improvements!
- Improve handling of some errors returned by AFIP’s WS when using invalid credentials.
v2.1.1¶
- Work around PyPI issues which resulted in failed deployments.
v2.1.0¶
- Each
ReceiptEntrycan now have a VAT attached to it. - Add a missing migration.
- Each
TaxPayerinstance now has anis_sandboxedflag. Sandboxes and non-sandboxed users can now coexist. This flag should be updated to the current value ofsettings.AFIP_DEBUG. This setting had been dropped and will no longer be used. - Include a management command
afipmetadata, to fetch all metadata from AFIP’s WS. - Make the ssl monkey-patching as least invasive as possible.
- Improve error handling for
opensslcalls. - Add a new template tag
format_cuit, which can be used to format numbers as CUITs.
v2.0.3¶
- Save PDF receipts into a
receiptsdirectory inside the media directory.
v2.0.2¶
- Only allow one
TaxPayerProfileperTaxPayer.
v2.0.1¶
- Tidy up exception handling and corner cases for PDF generation.
v2.0.0¶
- Only allow a single
ReceiptPDFinstance perReceipt. - Failed receipt validations no longer raise an exception, but rather return a list of errors (since this handles partial validations better).
- Lots of improvements to unit tests and error checking.