add - org quota stat to inventory_entry / inventory_balance to org_quota_stat
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Generated by Django 5.0 on 2025-11-19 13:16
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0097_organizationquotastats_inventory_entry_balance'),
|
||||
('warehouse', '0043_inventoryentry_quota'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='inventoryentry',
|
||||
name='org_quota_stat',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inventory_entry', to='product.organizationquotastats'),
|
||||
),
|
||||
]
|
||||
@@ -31,6 +31,12 @@ class InventoryEntry(BaseModel):
|
||||
related_name="inventory",
|
||||
null=True
|
||||
)
|
||||
org_quota_stat = models.ForeignKey(
|
||||
product_models.OrganizationQuotaStats,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='inventory_entry',
|
||||
null=True
|
||||
)
|
||||
weight = models.PositiveBigIntegerField(default=0)
|
||||
balance = models.PositiveBigIntegerField(default=0)
|
||||
lading_number = models.CharField(max_length=50, null=True)
|
||||
|
||||
@@ -15,6 +15,7 @@ class InventoryEntrySerializer(serializers.ModelSerializer):
|
||||
"modify_date",
|
||||
"organization",
|
||||
"quota",
|
||||
'org_quota_stat',
|
||||
"weight",
|
||||
"balance",
|
||||
"lading_number",
|
||||
|
||||
Reference in New Issue
Block a user