mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
[FR] Add last updated column for supplier parts (#4214)
* Move to updated Meta mixin * [FR] Add last updated column for supplier parts Fixes #3327 * add updated to table * bump API version * add missing migration * incremetn api ;-)
This commit is contained in:
18
InvenTree/stock/migrations/0092_alter_stockitem_updated.py
Normal file
18
InvenTree/stock/migrations/0092_alter_stockitem_updated.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.16 on 2023-01-15 14:04
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0091_alter_stockitem_delete_on_deplete'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stockitem',
|
||||
name='updated',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp of last update', null=True, verbose_name='Updated'),
|
||||
),
|
||||
]
|
@ -266,7 +266,7 @@ def default_delete_on_deplete():
|
||||
return True
|
||||
|
||||
|
||||
class StockItem(InvenTreeBarcodeMixin, MetadataMixin, MPTTModel):
|
||||
class StockItem(InvenTreeBarcodeMixin, MetadataMixin, common.models.MetaMixin, MPTTModel):
|
||||
"""A StockItem object represents a quantity of physical instances of a part.
|
||||
|
||||
Attributes:
|
||||
@ -729,8 +729,6 @@ class StockItem(InvenTreeBarcodeMixin, MetadataMixin, MPTTModel):
|
||||
default=1
|
||||
)
|
||||
|
||||
updated = models.DateField(auto_now=True, null=True)
|
||||
|
||||
build = models.ForeignKey(
|
||||
'build.Build', on_delete=models.SET_NULL,
|
||||
verbose_name=_('Source Build'),
|
||||
|
Reference in New Issue
Block a user