Fix Product filtering and add kit disassembly functionality
Fixed: - Replace is_active with status='active' for Product filtering in IncomingModelForm - Product model uses status field instead of is_active Added: - Showcase field to ProductKit for tracking showcase placement - product_kit field to Reservation for tracking kit-specific reservations - Disassemble button in POS terminal for showcase kits - API endpoint for kit disassembly (release reservations, mark discontinued) - Improved reservation filtering when dismantling specific kits Changes: - ShowcaseManager now links reservations to specific kit instances - POS terminal modal shows disassemble button in edit mode - Kit disassembly properly updates stock aggregates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -104,12 +104,23 @@ class ProductKit(BaseProductEntity):
|
||||
help_text="Заказ, для которого создан временный комплект"
|
||||
)
|
||||
|
||||
showcase = models.ForeignKey(
|
||||
'inventory.Showcase',
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
blank=True,
|
||||
related_name='temporary_kits',
|
||||
verbose_name="Витрина",
|
||||
help_text="Витрина, на которой выложен временный комплект"
|
||||
)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Комплект"
|
||||
verbose_name_plural = "Комплекты"
|
||||
indexes = [
|
||||
models.Index(fields=['is_temporary']),
|
||||
models.Index(fields=['order']),
|
||||
models.Index(fields=['showcase']),
|
||||
]
|
||||
constraints = [
|
||||
# Уникальное имя для активных комплектов (исключаем архивированные и снятые)
|
||||
|
||||
Reference in New Issue
Block a user