loko/streetup/stock/urls.py

117 lines
No EOL
11 KiB
Python

from django.urls import path
from . import views
app_name = "stock"
urlpatterns = [
path("warehouses/", views.warehouses_index, name="warehouses"),
path("warehouses_geojson/", views.warehouses_geojson, name="warehouses_geojson"),
path("warehouses/<int:warehouse_id>/", views.warehouse_detail, name="warehouse_detail"),
path("warehouse-locations/<int:location_id>/", views.warehouse_location_detail, name="warehouse_location_detail"),
path("warehouse-locations/<int:location_id>/products/new/", views.product_create_at_location, name="product_create_at_location"),
path("warehouses/<int:warehouse_id>/locations/api/", views.warehouse_locations_api, name="warehouse_locations_api"),
path("warehouses/<int:warehouse_id>/locations/new/", views.warehouse_location_create, name="warehouse_location_create"),
path("warehouse-locations/<int:location_id>/edit/", views.warehouse_location_edit, name="warehouse_location_edit"),
path("warehouse-locations/<int:location_id>/delete/", views.warehouse_location_delete, name="warehouse_location_delete"),
path("products/api/", views.products_api, name="products_api"),
path("products/autocomplete/", views.products_autocomplete_api, name="products_autocomplete_api"),
path("products/<int:product_id>/locations/", views.product_locations_api, name="product_locations_api"),
path("products/<int:product_id>/serialized-items/", views.serialized_items_for_product_api, name="serialized_items_for_product_api"),
path("products/", views.product_list, name="product_list"),
path("products/new/", views.product_create, name="product_create"),
path("products/<int:product_id>/", views.product_detail, name="product_detail"),
path("products/<int:product_id>/edit/", views.product_edit, name="product_edit"),
path("products/<int:product_id>/delete/", views.product_delete, name="product_delete"),
path("movements/", views.stock_movements, name="stock_movements"),
path("movements/new/", views.new_stock_movement, name="new_stock_movement"),
path("movements/entry/", views.new_stock_entry, name="new_stock_entry"),
path("movements/exit/", views.new_stock_exit, name="new_stock_exit"),
path("movements/transfer/", views.new_stock_transfer, name="new_stock_transfer"),
path("movements/batch/<int:pk>/", views.stock_movement_batch_detail, name="stock_movement_batch_detail"),
path("movements/batch/<int:pk>/toggle-loan-return/", views.stock_movement_batch_toggle_loan_return, name="stock_movement_batch_toggle_loan_return"),
path("movements/batch/<int:pk>/update-loan-info/", views.stock_movement_batch_update_loan_info, name="stock_movement_batch_update_loan_info"),
path("movements/<int:pk>/", views.stock_movement_detail, name="stock_movement_detail"),
path("purchases/", views.stock_purchases, name="stock_purchases"),
path("purchases/new/", views.new_purchase_order, name="purchase_order_new"),
path("purchases/<int:pk>/", views.purchase_order_detail, name="purchase_order_detail"),
path("purchases/<int:pk>/edit/", views.edit_purchase_order, name="purchase_order_edit"),
path("purchases/<int:pk>/receive/", views.receive_purchase_order, name="purchase_order_receive"),
path("purchases/<int:pk>/receive-items/", views.receive_purchase_order_items, name="purchase_order_receive_items"),
path("purchases/<int:pk>/ordered/", views.mark_purchase_order_ordered, name="purchase_order_ordered"),
path("purchases/<int:pk>/cancel/", views.purchase_order_cancel, name="purchase_order_cancel"),
path("purchases/<int:pk>/pdf/", views.purchase_order_pdf, name="purchase_order_pdf"),
path("purchases/<int:pk>/xlsx/", views.purchase_order_xlsx, name="purchase_order_xlsx"),
path("purchases/<int:pk>/documents/upload/", views.purchase_order_document_upload, name="purchase_order_document_upload"),
path("purchases/documents/<int:doc_id>/delete/", views.purchase_order_document_delete, name="purchase_order_document_delete"),
path("purchases/rfq/new/", views.new_request_for_quote, name="request_for_quote_new"),
path("purchases/rfq/<int:pk>/", views.request_for_quote_detail, name="request_for_quote_detail"),
path("purchases/rfq/<int:pk>/edit/", views.edit_request_for_quote, name="request_for_quote_edit"),
path("purchases/rfq/<int:pk>/cancel/", views.request_for_quote_cancel, name="request_for_quote_cancel"),
path("purchases/rfq/<int:pk>/sent/", views.request_for_quote_ordered, name="request_for_quote_ordered"),
path("purchases/rfq/<int:pk>/pdf/", views.request_for_quote_pdf, name="request_for_quote_pdf"),
path("purchases/rfq/<int:pk>/xlsx/", views.request_for_quote_xlsx, name="request_for_quote_xlsx"),
path("inventories/", views.inventory_list, name="inventory_list"),
path("inventories/new/", views.inventory_create, name="inventory_create"),
path("inventories/prefill/", views.inventory_prefill_api, name="inventory_prefill_api"),
path("inventories/<int:pk>/", views.inventory_detail, name="inventory_detail"),
path("inventories/<int:pk>/edit/", views.inventory_edit, name="inventory_edit"),
path("inventories/<int:pk>/validate/", views.inventory_validate, name="inventory_validate"),
path("inventories/<int:pk>/change-status/", views.inventory_change_status, name="inventory_change_status"),
path("inventories/<int:pk>/validate-items/", views.inventory_validate_items, name="inventory_validate_items"),
path("inventories/<int:pk>/validate-item/<int:item_id>/", views.inventory_validate_item, name="inventory_validate_item"),
path("inventories/<int:pk>/items/<int:item_id>/update/", views.inventory_item_update_api, name="inventory_item_update_api"),
path("inventories/<int:pk>/items/add/", views.inventory_add_item_api, name="inventory_add_item_api"),
path("inventories/<int:pk>/items/<int:item_id>/delete/", views.inventory_item_delete_api, name="inventory_item_delete_api"),
path("inventories/<int:pk>/update-validator-comment/", views.inventory_update_validator_comment, name="inventory_update_validator_comment"),
path("inventories/<int:pk>/pdf/", views.inventory_pdf, name="inventory_pdf"),
path("alerts/", views.stock_alerts, name="stock_alerts"),
path("preparation-orders/new/", views.new_preparation_order, name="new_preparation_order"),
path("preparation-orders/autocomplete/", views.preparation_orders_autocomplete_api, name="preparation_orders_autocomplete_api"),
path("preparation-orders/new-from-intervention/<int:intervention_id>/", views.new_preparation_order_from_intervention, name="new_preparation_order_from_intervention"),
path("preparation-orders/<int:pk>/", views.preparation_order_detail, name="preparation_order_detail"),
path("preparation-orders/<int:pk>/items/", views.preparation_order_items_api, name="preparation_order_items_api"),
path("preparation-orders/<int:pk>/cancel/", views.preparation_order_cancel, name="preparation_order_cancel"),
path("preparation-orders/<int:pk>/reopen/", views.preparation_order_reopen, name="preparation_order_reopen"),
path("preparation-orders/<int:pk>/edit/", views.preparation_order_edit, name="preparation_order_edit"),
path("preparation-orders/<int:pk>/process/", views.preparation_order_process, name="preparation_order_process"),
path("preparation-orders/<int:pk>/toggle-loan-return/", views.preparation_order_toggle_loan_return, name="preparation_order_toggle_loan_return"),
path("preparation-orders/<int:pk>/update-loan-info/", views.preparation_order_update_loan_info, name="preparation_order_update_loan_info"),
path("preparation-orders/<int:pk>/create-purchase/", views.preparation_order_create_purchase, name="preparation_order_create_purchase"),
path("preparation-order-items/<int:item_id>/toggle-prepared/", views.preparation_order_item_toggle_prepared, name="preparation_order_item_toggle_prepared"),
path("preparation-order-other-items/<int:item_id>/toggle-prepared/", views.preparation_order_other_item_toggle_prepared, name="preparation_order_other_item_toggle_prepared"),
path("preparation-orders/<int:pk>/documents/upload/", views.preparation_order_document_upload, name="preparation_order_document_upload"),
path("preparation-order-documents/<int:doc_id>/delete/", views.preparation_order_document_delete, name="preparation_order_document_delete"),
path("quick-stock-adjustment/", views.quick_stock_adjustment, name="quick_stock_adjustment"),
path("suppliers/", views.supplier_list, name="supplier_list"),
path("suppliers/new/", views.supplier_create, name="supplier_create"),
path("suppliers/<int:pk>/", views.supplier_detail, name="supplier_detail"),
# Conceptions de produits & Production (page unifiée)
path("conception/", views.production_center, name="production_center"),
path("designs/", views.product_design_list, name="product_design_list"),
path("designs/new/", views.product_design_create, name="product_design_create"),
path("designs/<int:pk>/", views.product_design_detail, name="product_design_detail"),
path("designs/<int:pk>/edit/", views.product_design_edit, name="product_design_edit"),
path("designs/api/", views.product_design_api, name="product_design_api"),
path("designs/autocomplete/", views.designs_autocomplete_api, name="designs_autocomplete_api"),
path("sign-panel-types/autocomplete/", views.sign_panel_types_api, name="sign_panel_types_api"),
# Ordres de production
path("production/", views.production_order_list, name="production_order_list"),
path("production/new/", views.production_order_create, name="production_order_create"),
path("production/<int:pk>/", views.production_order_detail, name="production_order_detail"),
path("production/<int:pk>/edit/", views.production_order_edit, name="production_order_edit"),
path("production/<int:pk>/start/", views.production_order_start, name="production_order_start"),
path("production/<int:pk>/complete/", views.production_order_complete, name="production_order_complete"),
path("production/<int:pk>/cancel/", views.production_order_cancel, name="production_order_cancel"),
path("production/<int:pk>/documents/upload/", views.production_order_document_upload, name="production_order_document_upload"),
path("production-documents/<int:doc_id>/delete/", views.production_order_document_delete, name="production_order_document_delete"),
# Articles tracés (numéros de série)
path("serialized/", views.serialized_items_list, name="serialized_items_list"),
path("serialized/new/", views.serialized_item_create, name="serialized_item_create"),
path("serialized/new/<int:product_id>/", views.serialized_item_create, name="serialized_item_create_for_product"),
path("serialized/<int:pk>/", views.serialized_item_detail, name="serialized_item_detail"),
path("serialized/<int:pk>/event/", views.serialized_item_event_create, name="serialized_item_event_create"),
path("serialized/<int:pk>/delete/", views.serialized_item_delete, name="serialized_item_delete"),
]