Changelog¶
This file contains a brief summary of new features and dependency changes or releases, in reverse chronological order.
5.0.2¶
- Moved project to GitHub (this release just updates the docs and links).
5.0.1¶
- Add templates for B and C type credit notes
5.0.0¶
- PDF rendering now relies on
django_renderpdf
, rather than in-tree code, and PDF views now subclass that package’sPDFView
, meaning that all their functionality is also available. This results in several changes:ReceiptHTMLView
has been dropped. To force a view to render as an HTML, add the querystringhtml=true
. If you want to disable this behaviour for your subclasses, add theallow_force_html = False
attribute to your subclass.ReceiptPDFView
now makes browsers render the file by default, rather than prompting to download a file.ReceiptPDFDisplayView
has been dropped in favour of the above.ReceiptPDFDownloadView
prompts users to download a receipt’s PDF. The PDF’s file name is now customizable by overridingget_download_name
.
- Allow filtering receipts [in the admin] by type.
- Allow filtering receipts [in the admin] by issued date.
- Allow searching for currencies by code, as well as name.
- Drop support for Django 1.10.
4.1.7¶
- Replace pybarcode with python-barcode, which is a fork of the former currently being maintained (we no longer depend on –pre releases).
4.1.6¶
- Fix failing tests due to refactor introduced in 4.1.5.
4.1.5¶
- The Receipt admin now includes links to each Receipt’s PDF.
- Enable editing
related_receipts
as 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
TaxPayerExtras
class for details.
4.0.0¶
- The
ReceiptPDF.save_pdf_to
method has been removed. - The
active_since
field has been moved fromTaxPayerProfile
toTaxPayer
. - Invoices in the admin will show a small asterisk if their value in the original currency doesn’t match their value in ARS.
- The
ReceiptPDF
class now has a newclient_vat_condition
field. Newly created instances must define this non-nullable field. ReceiptPDF
instances 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.vat
is now blankable, making forms and admins less confusing.- Remove old monkey-patching code for the
ssl
module. This no longer seems to be necessary. - Fix issues displaying static files in receipts when not running in development mode.
ReceiptPDF.client_address
can now be blank, given that this field may be absent for certain receipt types.- Added
total_vat
andtotal_tax
properties toReceipt
. This should be pretty self-explanatory.
3.3.0¶
- The
ReceiptPDF.save_pdf_to
method 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_validated
property to check if a single instance has been validated. - All internal errors now raise
DjangoAfipException
or 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
TaxPayer
model. 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
ReceiptBatch
model has been dropped, along withValidation
. Receipts are now validated via Receipt querysets, eg:Receipt.objects.filter(...).validate()
. The existingReceiptValidation
objects remain unchanged. - Validation of Receipts can now be done in a single action via the
Receipt
admin. Receipt
instances have a newvalidate()
method to validate that single receipt.- The
receiptnumber
tag is now deprecated. UseReceipt.formatted_number
instead.
2.7.0¶
- Drop support for Django 1.9, support Django 1.11.
- The default ordering of
Receipt
instances 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.authorize
method no longer takes asave
argument. 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
,UntrustedCertificate
orAuthenticationError
when attempting an authentication fail. - The field
ReceiptEntry.amount
has 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-py3
tosuds-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
profile
parameter has been dropped from theReceiptPDF.create_for_receipt
method. - Use PyOpenSSL to sign authentication tickets.
- Dropped runtime dependency: The
openssl
binary 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
ReceiptEntry
can now have a VAT attached to it. - Add a missing migration.
- Each
TaxPayer
instance now has anis_sandboxed
flag. 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
openssl
calls. - Add a new template tag
format_cuit
, which can be used to format numbers as CUITs.
v2.0.3¶
- Save PDF receipts into a
receipts
directory inside the media directory.
v2.0.2¶
- Only allow one
TaxPayerProfile
perTaxPayer
.
v2.0.1¶
- Tidy up exception handling and corner cases for PDF generation.
v2.0.0¶
- Only allow a single
ReceiptPDF
instance 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.