2019-04-27 12:49:16 +00:00
|
|
|
"""
|
|
|
|
URL lookup for Stock app
|
|
|
|
"""
|
|
|
|
|
2017-04-20 12:08:27 +00:00
|
|
|
from django.conf.urls import url, include
|
2017-03-27 10:04:15 +00:00
|
|
|
|
|
|
|
from . import views
|
2018-04-14 05:13:16 +00:00
|
|
|
|
|
|
|
# URL list for web interface
|
2018-04-15 10:10:49 +00:00
|
|
|
stock_location_detail_urls = [
|
|
|
|
url(r'^edit/?', views.StockLocationEdit.as_view(), name='stock-location-edit'),
|
|
|
|
url(r'^delete/?', views.StockLocationDelete.as_view(), name='stock-location-delete'),
|
2019-05-04 08:46:57 +00:00
|
|
|
url(r'^qr_code/?', views.StockLocationQRCode.as_view(), name='stock-location-qr'),
|
2018-04-15 10:10:49 +00:00
|
|
|
|
|
|
|
# Anything else
|
|
|
|
url('^.*$', views.StockLocationDetail.as_view(), name='stock-location-detail'),
|
|
|
|
]
|
|
|
|
|
|
|
|
stock_item_detail_urls = [
|
2019-08-28 11:46:26 +00:00
|
|
|
url(r'^edit/', views.StockItemEdit.as_view(), name='stock-item-edit'),
|
2020-05-25 04:24:29 +00:00
|
|
|
url(r'^convert/', views.StockItemConvert.as_view(), name='stock-item-convert'),
|
2019-08-28 11:46:26 +00:00
|
|
|
url(r'^serialize/', views.StockItemSerialize.as_view(), name='stock-item-serialize'),
|
|
|
|
url(r'^delete/', views.StockItemDelete.as_view(), name='stock-item-delete'),
|
|
|
|
url(r'^qr_code/', views.StockItemQRCode.as_view(), name='stock-item-qr'),
|
2020-05-18 04:29:35 +00:00
|
|
|
url(r'^delete_test_data/', views.StockItemDeleteTestData.as_view(), name='stock-item-delete-test-data'),
|
2020-06-04 09:45:41 +00:00
|
|
|
url(r'^assign/', views.StockItemAssignToCustomer.as_view(), name='stock-item-assign'),
|
2020-08-07 23:05:33 +00:00
|
|
|
url(r'^return/', views.StockItemReturnToStock.as_view(), name='stock-item-return'),
|
2020-10-04 09:41:28 +00:00
|
|
|
url(r'^install/', views.StockItemInstall.as_view(), name='stock-item-install'),
|
2018-04-30 11:03:25 +00:00
|
|
|
|
2019-08-28 11:46:26 +00:00
|
|
|
url(r'^add_tracking/', views.StockItemTrackingCreate.as_view(), name='stock-tracking-create'),
|
2019-07-15 14:10:24 +00:00
|
|
|
|
2020-05-22 12:25:05 +00:00
|
|
|
url(r'^test-report-select/', views.StockItemTestReportSelect.as_view(), name='stock-item-test-report-select'),
|
2020-08-16 02:10:58 +00:00
|
|
|
url(r'^label-select/', views.StockItemSelectLabels.as_view(), name='stock-item-label-select'),
|
2020-05-22 12:25:05 +00:00
|
|
|
|
2020-05-16 11:10:27 +00:00
|
|
|
url(r'^test/', views.StockItemDetail.as_view(template_name='stock/item_tests.html'), name='stock-item-test-results'),
|
2020-02-17 11:37:55 +00:00
|
|
|
url(r'^children/', views.StockItemDetail.as_view(template_name='stock/item_childs.html'), name='stock-item-children'),
|
2020-05-06 23:57:54 +00:00
|
|
|
url(r'^attachments/', views.StockItemDetail.as_view(template_name='stock/item_attachments.html'), name='stock-item-attachments'),
|
2020-09-28 10:07:25 +00:00
|
|
|
url(r'^installed/', views.StockItemDetail.as_view(template_name='stock/item_installed.html'), name='stock-item-installed'),
|
2020-02-02 01:11:18 +00:00
|
|
|
url(r'^notes/', views.StockItemNotes.as_view(), name='stock-item-notes'),
|
|
|
|
|
2018-04-15 10:10:49 +00:00
|
|
|
url('^.*$', views.StockItemDetail.as_view(), name='stock-item-detail'),
|
2018-04-14 05:13:16 +00:00
|
|
|
]
|
2018-04-15 10:10:49 +00:00
|
|
|
|
2019-07-15 14:10:24 +00:00
|
|
|
stock_tracking_urls = [
|
|
|
|
|
|
|
|
# edit
|
2019-07-17 22:55:57 +00:00
|
|
|
url(r'^(?P<pk>\d+)/edit/', views.StockItemTrackingEdit.as_view(), name='stock-tracking-edit'),
|
2019-07-15 14:10:24 +00:00
|
|
|
|
2019-07-22 00:46:42 +00:00
|
|
|
# delete
|
|
|
|
url(r'^(?P<pk>\d+)/delete', views.StockItemTrackingDelete.as_view(), name='stock-tracking-delete'),
|
|
|
|
|
2019-07-15 14:10:24 +00:00
|
|
|
# list
|
|
|
|
url('^.*$', views.StockTrackingIndex.as_view(), name='stock-tracking-list')
|
|
|
|
]
|
|
|
|
|
2018-04-14 05:13:16 +00:00
|
|
|
stock_urls = [
|
2018-04-15 10:10:49 +00:00
|
|
|
# Stock location
|
|
|
|
url(r'^location/(?P<pk>\d+)/', include(stock_location_detail_urls)),
|
|
|
|
|
|
|
|
url(r'^location/new/', views.StockLocationCreate.as_view(), name='stock-location-create'),
|
|
|
|
|
2018-04-15 13:27:56 +00:00
|
|
|
url(r'^item/new/?', views.StockItemCreate.as_view(), name='stock-item-create'),
|
|
|
|
|
2020-09-28 11:27:27 +00:00
|
|
|
url(r'^item/uninstall/', views.StockItemUninstall.as_view(), name='stock-item-uninstall'),
|
|
|
|
|
2020-05-22 12:25:05 +00:00
|
|
|
url(r'^item/test-report-download/', views.StockItemTestReportDownload.as_view(), name='stock-item-test-report-download'),
|
2020-08-16 01:12:21 +00:00
|
|
|
url(r'^item/print-stock-labels/', views.StockItemPrintLabels.as_view(), name='stock-item-print-labels'),
|
2020-05-22 12:25:05 +00:00
|
|
|
|
2020-05-16 14:26:10 +00:00
|
|
|
# URLs for StockItem attachments
|
2020-05-06 23:57:54 +00:00
|
|
|
url(r'^item/attachment/', include([
|
|
|
|
url(r'^new/', views.StockItemAttachmentCreate.as_view(), name='stock-item-attachment-create'),
|
|
|
|
url(r'^(?P<pk>\d+)/edit/', views.StockItemAttachmentEdit.as_view(), name='stock-item-attachment-edit'),
|
|
|
|
url(r'^(?P<pk>\d+)/delete/', views.StockItemAttachmentDelete.as_view(), name='stock-item-attachment-delete'),
|
|
|
|
])),
|
|
|
|
|
2020-05-16 14:26:10 +00:00
|
|
|
# URLs for StockItem tests
|
|
|
|
url(r'^item/test/', include([
|
|
|
|
url(r'^new/', views.StockItemTestResultCreate.as_view(), name='stock-item-test-create'),
|
|
|
|
url(r'^(?P<pk>\d+)/edit/', views.StockItemTestResultEdit.as_view(), name='stock-item-test-edit'),
|
|
|
|
url(r'^(?P<pk>\d+)/delete/', views.StockItemTestResultDelete.as_view(), name='stock-item-test-delete'),
|
|
|
|
])),
|
|
|
|
|
2019-07-15 14:10:24 +00:00
|
|
|
url(r'^track/', include(stock_tracking_urls)),
|
2019-04-25 12:11:10 +00:00
|
|
|
|
2019-06-02 01:37:04 +00:00
|
|
|
url(r'^adjust/?', views.StockAdjust.as_view(), name='stock-adjust'),
|
2019-05-29 12:05:13 +00:00
|
|
|
|
2019-09-08 12:37:27 +00:00
|
|
|
url(r'^export-options/?', views.StockExportOptions.as_view(), name='stock-export-options'),
|
2019-09-08 00:57:19 +00:00
|
|
|
url(r'^export/?', views.StockExport.as_view(), name='stock-export'),
|
|
|
|
|
2018-04-14 05:13:16 +00:00
|
|
|
# Individual stock items
|
2018-04-15 10:10:49 +00:00
|
|
|
url(r'^item/(?P<pk>\d+)/', include(stock_item_detail_urls)),
|
2018-04-14 05:13:16 +00:00
|
|
|
|
2018-04-15 10:10:49 +00:00
|
|
|
url(r'^.*$', views.StockIndex.as_view(), name='stock-index'),
|
2018-04-15 15:02:17 +00:00
|
|
|
]
|