refactor: стандартизация моделей документов перемещения

Приведение к единому паттерну именования документов:
- TransferBatch → TransferDocument
- TransferItem → TransferDocumentItem
- Удалена устаревшая модель Transfer (одиночные перемещения)
- Удалена неиспользуемая модель StockMovement

Изменения:
- models.py: переименование классов, обновление related_names
- admin.py: удаление регистраций Transfer/StockMovement
- forms.py: обновление TransferHeaderForm
- views/transfer.py: обновление всех view классов
- templates: замена transfer_batch → transfer_document
- urls.py: удаление путей для movements
- views/__init__.py: удаление импорта StockMovementListView
- views/movements.py: удален файл

Миграция: 0005_refactor_transfer_models
- RenameModel операции для сохранения данных
- DeleteModel для Transfer и StockMovement

Единый паттерн: *Document + *DocumentItem
(WriteOffDocument, IncomingDocument, TransferDocument)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-26 20:29:11 +03:00
parent c534e27c41
commit 08bae834c8
9 changed files with 84 additions and 170 deletions

View File

@@ -13,7 +13,6 @@ Inventory Views Package
- stock.py: Справочник остатков (view-only)
- batch.py: Справочник партий товара (view-only)
- allocation.py: Распределение продаж по партиям (view-only)
- movements.py: Журнал складских операций (view-only)
"""
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
@@ -41,7 +40,6 @@ from .transfer import TransferListView, TransferBulkCreateView, TransferDetailVi
from .reservation import ReservationListView
from .stock import StockListView, StockDetailView
from .allocation import SaleBatchAllocationListView
from .movements import StockMovementListView
@login_required