ricco386 / django-faktura Goto Github PK
View Code? Open in Web Editor NEWSimple django app for invoice generation.
License: MIT License
Simple django app for invoice generation.
License: MIT License
Admin list invoices total amount is rounding differently than front end. Update logic to round the same way.
If multiple invoices for the same buyer are issued, it will be handy to have them stored in the database.
The same is true for seller which will most probably will usually be the only one.
These models can be separate and inherited from common abstract InvoiceUserModel, but this can be discussed (we can only use a single model)
Add counter that will log who has downloaded the invoice and how many times the invoice has been downloaded.
Update the code so we display frontend views only for logged in users.
Once #1 is implemented check for permissions as well.
KeyError at /admin/faktura/invoice/***/change/
"Key 'number' not found in 'InvoiceForm'. Choices are: status."
Since wkhtmltopdf to not actively developed and has issues after update to Django 4.0 try to explore another way how to generate PDF files.
For example the official way: https://docs.djangoproject.com/en/4.0/howto/outputting-pdf/
When changing invoice state from Final to Draft system throws an exception.
Add button next to generate PDF that will generate PDF and upload it to Google Drive.
Login credentials for google drive can be defined in settings.
Add ability to use the app for simple accounting:
Admin has dropdown actions, add new one for generating invoice (in DRAFT state) from existing pro forma invoice.
Make sure if action is called on other type than pro forma invoice nothing will happen (or message will be shown).
Make sure if user click on button with year to filter invoices the button is highlighted.
Add permission:
So far we do not have frontend for creating and editing invoices, but we can be prepared with permissions when we are creating them... Pre generate groups with "all" invoicing permissions and "view" invoicing permissions. Look at the admin interface if the groups can be used there as well...
We need to create invoices in Slovak language, so add Slovak translation.
After click on download PDF i've received
`
Request Method: | GET |
---|---|
http://127.0.0.1:8000/invoices/1786f85d-47d9-4a08-8852-3104227ba7bb/download/ | |
3.1 | |
AttributeError | |
'NoneType' object has no attribute 'endswith' | |
/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/wkhtmltopdf/utils.py, line 296, in make_absolute_paths | |
/home/m/Desktop/localhost/django-tt/venv/bin/python3 | |
3.8.2 | |
['/home/m/Desktop/localhost/django-tt/project', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages'] | |
Thu, 27 Aug 2020 12:11:58 +0000 | |
` |
Request Method: GET
Request URL: http://127.0.0.1:8000/invoices/1786f85d-47d9-4a08-8852-3104227ba7bb/download/
Django Version: 3.1
Python Version: 3.8.2
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'faktura']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback (most recent call last):
File "/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 202, in _get_response
response = response.render()
File "/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
File "/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/wkhtmltopdf/views.py", line 73, in rendered_content
return render_pdf_from_template(
File "/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/wkhtmltopdf/utils.py", line 201, in render_pdf_from_template
input_file = RenderedFile(
File "/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/wkhtmltopdf/utils.py", line 178, in __init__
self.temporary_file = render_to_temporary_file(
File "/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/wkhtmltopdf/utils.py", line 331, in render_to_temporary_file
content = make_absolute_paths(content)
File "/home/m/Desktop/localhost/django-tt/venv/lib/python3.8/site-packages/wkhtmltopdf/utils.py", line 296, in make_absolute_paths
if not x['root'].endswith('/'):
Exception Type: AttributeError at /invoices/1786f85d-47d9-4a08-8852-3104227ba7bb/download/
Exception Value: 'NoneType' object has no attribute 'endswith'
In TiTo we have some old invoices, we need a way how to import them into django-faktura. Write a command line terminal script to migrate invoices from tito via their API: https://ti.to/docs/api/
Create invoice from pro forma command doesnt works
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.