mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add page for displaying all sales orders
This commit is contained in:
parent
627c50e465
commit
1ebf26ab7c
@ -27,7 +27,10 @@
|
||||
{{ block.super }}
|
||||
|
||||
loadPurchaseOrderTable("#purchase-order-table", {
|
||||
url: "{% url 'api-po-list' %}?supplier={{ company.id }}",
|
||||
url: "{% url 'api-po-list' %}",
|
||||
params: {
|
||||
supplier: company.id,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
@ -27,7 +27,10 @@
|
||||
{{ block.super }}
|
||||
|
||||
loadSalesOrderTable("#sales-order-table", {
|
||||
url: "{% url 'api-so-list' %}?customer={{ company.id }}",
|
||||
url: "{% url 'api-so-list' %}",
|
||||
params: {
|
||||
customer: {{ company.id }},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
@ -4,17 +4,17 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
InvenTree | Purchase Orders
|
||||
InvenTree | {% trans "Purchase Orders" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>Purchase Orders</h3>
|
||||
<h3>{% trans "Purchase Orders" %}</h3>
|
||||
<hr>
|
||||
|
||||
<div id='table-buttons'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
<button class='btn btn-primary' type='button' id='po-create' title='Create new purchase order'>New Purchase Order</button>
|
||||
<button class='btn btn-primary' type='button' id='po-create' title='{% trans "Create new purchase order" %}'>{% trans "New Purchase Order" %}</button>
|
||||
<div class='filter-list' id='filter-list-order'>
|
||||
<!-- An empty div in which the filter list will be constructed -->
|
||||
</div>
|
||||
|
36
InvenTree/order/templates/order/sales_orders.html
Normal file
36
InvenTree/order/templates/order/sales_orders.html
Normal file
@ -0,0 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
InvenTree | {% trans "Sales Orders" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>{% trans "Sales Orders" %}</h3>
|
||||
<hr>
|
||||
|
||||
<div id='table-buttons'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
<button class='btn btn-primary' type='button' id='so-create' title='{% trans "Create new sales order" %}'>{% trans "New Sales Order" %}</button>
|
||||
<div class='filter-list' id='filter-list-order'>
|
||||
<!-- An empty div in which the filter list will be constructed -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class='table table-striped table-condensed po-table' data-toolbar='#table-buttons' id='sales-order-table'>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
loadSalesOrderTable("#sales-order-table", {
|
||||
url: "{% url 'api-so-list' %}",
|
||||
});
|
||||
|
||||
{% endblock %}
|
@ -61,6 +61,11 @@ purchase_order_urls = [
|
||||
url(r'^.*$', views.PurchaseOrderIndex.as_view(), name='po-index'),
|
||||
]
|
||||
|
||||
sales_order_urls = [
|
||||
url(r'^.*$', views.SalesOrderIndex.as_view(), name='so-index'),
|
||||
]
|
||||
|
||||
order_urls = [
|
||||
url(r'^purchase-order/', include(purchase_order_urls)),
|
||||
url(r'^sales-order/', include(sales_order_urls)),
|
||||
]
|
||||
|
@ -16,6 +16,7 @@ import logging
|
||||
from decimal import Decimal, InvalidOperation
|
||||
|
||||
from .models import PurchaseOrder, PurchaseOrderLineItem, PurchaseOrderAttachment
|
||||
from .models import SalesOrder, SalesOrderLineItem, SalesOrderAttachment
|
||||
from .admin import POLineItemResource
|
||||
from build.models import Build
|
||||
from company.models import Company, SupplierPart
|
||||
@ -55,6 +56,13 @@ class PurchaseOrderIndex(ListView):
|
||||
return ctx
|
||||
|
||||
|
||||
class SalesOrderIndex(ListView):
|
||||
|
||||
model = SalesOrder
|
||||
template_name = 'order/sales_orders.html'
|
||||
context_object_name = 'orders'
|
||||
|
||||
|
||||
class PurchaseOrderDetail(DetailView):
|
||||
""" Detail view for a PurchaseOrder object """
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user