Created
August 22, 2021 09:13
-
-
Save skolo-online/1da438dc575559641e8e76945804d976 to your computer and use it in GitHub Desktop.
create invoice part 1 view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@login_required | |
def createInvoice(request): | |
#create a blank invoice .... | |
number = 'INV-'+str(uuid4()).split('-')[1] | |
newInvoice = Invoice.objects.create(number=number) | |
newInvoice.save() | |
inv = Invoice.objects.get(number=number) | |
return redirect('create-build-invoice', slug=inv.slug) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment