Skip to content

Commit

Permalink
Add child product description
Browse files Browse the repository at this point in the history
  • Loading branch information
didrikmunther committed Aug 12, 2023
1 parent 7661a8f commit 0db73af
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions accounting/migrations/0025_add_child_product_descriptoin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 2.2.24 on 2023-08-12 14:13

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('accounting', '0024_add_child_product_model'),
]

operations = [
migrations.AddField(
model_name='childproduct',
name='description',
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name='product',
name='revenue',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounting.Revenue'),
),
]
1 change: 1 addition & 0 deletions accounting/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __str__(self):

class ChildProduct(models.Model):
quantity = models.PositiveIntegerField(blank=False)
description = models.TextField(blank=True, null=True)
child_product = models.ForeignKey("Product", blank=False, on_delete=models.CASCADE)

def __str__(self):
Expand Down

0 comments on commit 0db73af

Please sign in to comment.