Files
Tim Hadwen 2477fd1539 Initial release: RMA Automation plugin with repair parts tracking
Features:
- Automatic stock status updates based on return order outcomes
- Repair parts allocation and consumption tracking
- Configurable status mappings for each outcome type
- React-based UI panel for managing repair parts
- Location display for easy part retrieval
- Available stock filtering (excludes allocated items)
2026-01-18 20:56:07 +10:00

34 lines
1.7 KiB
Python

# Generated by Django 4.2.26 on 2026-01-18 09:34
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('order', '0114_purchaseorderextraline_project_code_and_more'),
('stock', '0116_alter_stockitem_link'),
]
operations = [
migrations.CreateModel(
name='RepairStockAllocation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('quantity', models.DecimalField(decimal_places=5, default=1, help_text='Quantity of stock allocated', max_digits=15)),
('consumed', models.BooleanField(default=False, help_text='Whether this allocation has been consumed')),
('created', models.DateTimeField(auto_now_add=True, help_text='When this allocation was created')),
('notes', models.CharField(blank=True, default='', help_text='Optional notes about this allocation', max_length=500)),
('return_order_line', models.ForeignKey(help_text='The return order line item this allocation is for', on_delete=django.db.models.deletion.CASCADE, related_name='repair_allocations', to='order.returnorderlineitem')),
('stock_item', models.ForeignKey(help_text='The stock item being allocated for repair', on_delete=django.db.models.deletion.CASCADE, related_name='repair_allocations', to='stock.stockitem')),
],
options={
'verbose_name': 'Repair Stock Allocation',
'verbose_name_plural': 'Repair Stock Allocations',
},
),
]