-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(sage_invoice): Add the new jinja 2 template, Change the models n…
…ame add note opition
- Loading branch information
1 parent
05582eb
commit 28125e2
Showing
33 changed files
with
1,484 additions
and
358 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .category import InvoiceCategoryAdmin | ||
from .category import CategoryAdmin | ||
from .invoice import InvoiceAdmin | ||
|
||
__all__ = ["InvoiceAdmin", "InvoiceCategoryAdmin"] | ||
__all__ = ["InvoiceAdmin", "CategoryAdmin"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .show import show_invoice | ||
from .download_pdf import export_pdf | ||
|
||
__all__ = ["show_invoice"] | ||
__all__ = ["export_pdf"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from django.contrib import admin | ||
from django.shortcuts import redirect | ||
from django.urls import reverse | ||
|
||
|
||
@admin.action(description="Download selected invoice as PDF") | ||
def export_pdf(modeladmin, request, queryset): | ||
invoice_ids = queryset.values_list("id", flat=True) | ||
invoice_ids_str = ",".join(map(str, invoice_ids)) | ||
url = f"{reverse('download_invoices')}?invoice_ids={invoice_ids_str}" | ||
return redirect(url) |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from .category import Category | ||
from .column import Column | ||
from .expense import Expense | ||
from .invoice import Invoice | ||
from .invoice_category import InvoiceCategory | ||
from .invoice_column import InvoiceColumn | ||
from .invoice_item import InvoiceItem | ||
from .invoice_total import Expense | ||
from .item import Item | ||
|
||
__all__ = ["Invoice", "InvoiceColumn", "InvoiceItem", "Expense", "InvoiceCategory"] | ||
__all__ = ["Invoice", "Column", "Item", "Expense", "Category"] |
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
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
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
Oops, something went wrong.