refactor(inventory): remove individual writeoff views and templates, shift to document-based writeoffs

- Remove WriteOffForm from forms.py and add comment directing to WriteOffDocumentForm
- Update navigation templates to remove writeoff links and sections
- Add 'Сумма' column to sale list with multiplication filter
- Delete writeoff-related templates (list, form, confirm delete)
- Add 'multiply' filter to inventory_filters.py for calculations
- Comment out writeoff URLs in urls.py, keeping WriteOff model for automatic creation
- Remove WriteOff views from __init__.py and delete writeoff.py view file

This change simplifies writeoff management by removing direct individual writeoff operations and enforcing use of WriteOffDocument for all writeoffs, with WriteOff records created automatically upon document processing.
This commit is contained in:
2025-12-27 01:04:41 +03:00
parent 1eaee7de5e
commit 44d115b356
11 changed files with 59 additions and 535 deletions

View File

@@ -7,7 +7,7 @@ Inventory Views Package
- incoming.py: Управление приходами товара
- sale.py: Управление продажами
- inventory_ops.py: Инвентаризация и её строки
- writeoff.py: Списания товара
- writeoff_document.py: Документы списания товара
- transfer.py: Перемещения между складами
- reservation.py: Резервирования товара (view-only)
- stock.py: Справочник остатков (view-only)
@@ -25,7 +25,6 @@ from .inventory_ops import (
InventoryLineCreateBulkView, InventoryLineAddView, InventoryLineUpdateView,
InventoryLineDeleteView, InventoryCompleteView, InventoryDeleteView
)
from .writeoff import WriteOffListView, WriteOffCreateView, WriteOffUpdateView, WriteOffDeleteView
from .writeoff_document import (
WriteOffDocumentListView, WriteOffDocumentCreateView, WriteOffDocumentDetailView,
WriteOffDocumentAddItemView, WriteOffDocumentUpdateItemView, WriteOffDocumentRemoveItemView,
@@ -61,8 +60,6 @@ __all__ = [
'InventoryListView', 'InventoryCreateView', 'InventoryDetailView', 'InventoryLineCreateBulkView',
'InventoryLineAddView', 'InventoryLineUpdateView', 'InventoryLineDeleteView',
'InventoryCompleteView', 'InventoryDeleteView',
# WriteOff
'WriteOffListView', 'WriteOffCreateView', 'WriteOffUpdateView', 'WriteOffDeleteView',
# WriteOffDocument
'WriteOffDocumentListView', 'WriteOffDocumentCreateView', 'WriteOffDocumentDetailView',
'WriteOffDocumentAddItemView', 'WriteOffDocumentUpdateItemView', 'WriteOffDocumentRemoveItemView',