Invoices generation for Django Oscar
Project description
# django-oscar-invoices
How invoices are generated?
---------------------------
In order to generate invoice it's required to create two model records:
* Merchant account, :class:`~oscar_invoices.abstract_models.AbstractLegalEntity`.
In contains shop name, seller's business name, website, email, VAT number etc.
* Merchant address, :class:`~oscar_invoices.abstract_models.AbstractLegalEntityAddress`. It's
quite similar to the order shipping or billing address.
By default, we generate only HTML invoice document and allow user to decide how to
generate PDF documents. You can integrate `python-pdfkit`_, `WeasyPrint`_, `xhtml2pdf`_,
`reportlab`_ or another library of your choice.
.. _`python-pdfkit`: https://github.com/JazzCore/python-pdfkit
.. _`WeasyPrint`: https://github.com/Kozea/WeasyPrint
.. _`xhtml2pdf`: https://github.com/xhtml2pdf/xhtml2pdf
.. _`reportlab`: https://www.reportlab.com/
Since documents contains sensitive data, we store them out of the media folder and
do not provide public access via URL. For this purpose, we use custom storage class
:class:`oscar_invoices.storages.DocumentsStorage`, invoice documents placed into the
nested folder ``settings.OSCAR_INVOICES_UPLOAD_FOLDER`` and available for the admin users via
dashboard order list.
How invoices are generated?
---------------------------
In order to generate invoice it's required to create two model records:
* Merchant account, :class:`~oscar_invoices.abstract_models.AbstractLegalEntity`.
In contains shop name, seller's business name, website, email, VAT number etc.
* Merchant address, :class:`~oscar_invoices.abstract_models.AbstractLegalEntityAddress`. It's
quite similar to the order shipping or billing address.
By default, we generate only HTML invoice document and allow user to decide how to
generate PDF documents. You can integrate `python-pdfkit`_, `WeasyPrint`_, `xhtml2pdf`_,
`reportlab`_ or another library of your choice.
.. _`python-pdfkit`: https://github.com/JazzCore/python-pdfkit
.. _`WeasyPrint`: https://github.com/Kozea/WeasyPrint
.. _`xhtml2pdf`: https://github.com/xhtml2pdf/xhtml2pdf
.. _`reportlab`: https://www.reportlab.com/
Since documents contains sensitive data, we store them out of the media folder and
do not provide public access via URL. For this purpose, we use custom storage class
:class:`oscar_invoices.storages.DocumentsStorage`, invoice documents placed into the
nested folder ``settings.OSCAR_INVOICES_UPLOAD_FOLDER`` and available for the admin users via
dashboard order list.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for django_oscar_invoices-0.0.0-py3.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | edb85c781cd16ee02889b58a294a950500fca6a7e203d55bfe3c3ea57c817248 |
|
MD5 | 556286abd4a82f9877936230060a04b7 |
|
BLAKE2b-256 | ee7cce8e55bf1623ef85fe2d3f169026e811e973eac2c72c9e6695ec84e77d05 |