2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-05 14:58:50 +00:00
InvenTree/InvenTree/company/migrations/0044_auto_20220607_2204.py
Oliver 258957c14c
SupplierPart availability (#3148)
* Adds new fields to the SupplierPart model:

- available
- availability_updated

* Allow availability_updated field to be blank

* Revert "Remove stat context variables"

This reverts commit 0989c308d0cea9b9405a1338d257b542c6d33d73.

* Increment API version

* Adds availability information to the SupplierPart API serializer

- If the 'available' field is updated, the current date is added to the availability_updated field

* Add 'available' field to SupplierPart table

* More JS refactoring

* Add unit testing for specifying availability via the API

* Display availability data on the SupplierPart detail page

* Add ability to set 'available' quantity from the SupplierPart detail page

* Revert "Revert "Remove stat context variables""

This reverts commit 3f98037f7947aa4c85cf4008c2d216d034987f2e.
2022-06-08 21:49:07 +10:00

25 lines
868 B
Python

# Generated by Django 3.2.13 on 2022-06-07 22:04
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('company', '0043_manufacturerpartattachment'),
]
operations = [
migrations.AddField(
model_name='supplierpart',
name='availability_updated',
field=models.DateTimeField(blank=True, help_text='Date of last update of availability data', null=True, verbose_name='Availability Updated'),
),
migrations.AddField(
model_name='supplierpart',
name='available',
field=models.DecimalField(decimal_places=3, default=0, help_text='Quantity available from supplier', max_digits=10, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Available'),
),
]